-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Import rutabaga_gfx+virtio_gpu from crosvm #144
Conversation
74a58d5
to
d62d0f7
Compare
Is vendoring these libs necessary? Any way to pull them in as external dependencies for easier tracking of upstream? or is that a no-go for upstream? |
@alyssarosenzweig The case of |
@slp Is there any docs showing how I could I try this for myself, to test? |
ah, entirely reasonable. 👍 |
@tylerfanelli To test it you need a image with sommelier. I've just added a sommelier package to this COPR repo so you can take it from there if you don't want to build it yourself. Something like this should do the trick:
|
For anyone else wants to try this, note that you have to enable virtio-gpu for libkrufw:
|
ac21cbf
to
df102b0
Compare
Import rutabaga_gfx from crosvm as of commit 081bca1c136ff745c0fd5f0dda7be37693ec01af ("Rename struct Window to GuiWindow.") The only change from the original sources is in build.rs, which was simplified to avoid trying to build static versions of minigbm and virglrenderer, dynamically linking with system libraries instead. Signed-off-by: Sergio Lopez <[email protected]>
Sources as came from crosvm contain some minor aesthetic clippy errors. Fix them to satisfy CI. Signed-off-by: Sergio Lopez <[email protected]>
Extend the API with the public set_use_drm method to allow users to set the use of drm in virglrenderer. Signed-off-by: Sergio Lopez <[email protected]>
Refactor descriptor utils to be shared with virtio-gpu implementation. Signed-off-by: Sergio Lopez <[email protected]>
Import virtio-gpu from crosvm as of commit 081bca1c136ff745c0fd5f0dda7be37693ec01af ("Rename struct Window to GuiWindow.") This import tries to make just the minimum amount of changes needed to work in libkrun, so we can easily track future improvements made in crosvm. For the time being, the code will be gated behind the "gpu" feature. Signed-off-by: Sergio Lopez <[email protected]>
Apply minor changes to rutabaga to ensure it builds properly on macOS. Signed-off-by: Sergio Lopez <[email protected]>
Reserve a region of shared memory on macOS, just as we do on Linux. This region will be used for the virtio-gpu device. Signed-off-by: Sergio Lopez <[email protected]>
virtio-gpu requires a larger shared memory region to be able to interact with the host's GPU. Signed-off-by: Sergio Lopez <[email protected]>
Add a step to install the packages required for the gpu feature, and rework clippy tests to reflect the most common combinations we'll be offering. Signed-off-by: Sergio Lopez <[email protected]>
Refresh Cargo.lock after adding rutabaga and virtio-gpu. Signed-off-by: Sergio Lopez <[email protected]>
Crates are loaded even when they are optional and not actually used, which means that "rutabaga_gfx/build.rs" is executed even when not enabling the "gpu" feature. This would force us to install epoxy and virglrenderer in contexts where we don't really need them. Instead, let's gate the pkg_config checks behind the "gpu" feature. Signed-off-by: Sergio Lopez <[email protected]>
7533c6a
to
56d0c6e
Compare
Export virgl flags all the way from RutabagaBuilder to the consumers of the library so they can freely set the options they need for their usecase. Signed-off-by: Sergio Lopez <[email protected]>
The code is gated behind the "gpu" feature.