-
Notifications
You must be signed in to change notification settings - Fork 49
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
vhost-device-gpu: Expose more options as CLI flags #797
base: main
Are you sure you want to change the base?
Conversation
.set_use_glx(gpu_config.flags().use_glx) | ||
.set_use_gles(gpu_config.flags().use_gles) | ||
.set_use_surfaceless(gpu_config.flags().use_surfaceless) | ||
.set_use_render_server(gpu_config.requires_render_server()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to add an option for this set_use_vulkan(true)
and also make it default for the gfxstream mode to set it automatically if vulkan usage hasn't been set. also I think we should set this set_use_vulkan(true)
for the virglrenderer venus capset.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless something changes in Rutabaga, we don't really enable this manually, this is already enabled automatically by Rutabaga here:
https://github.com/google/crosvm/blob/078ef31b7a8c04529dcdfcb1badefea6f5245d9e/rutabaga_gfx/src/rutabaga_core.rs#L1327-L1336
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, I didn't see that before. since it's already enabled by rutabaga we can leave it as it is.
Possible values: | ||
- virgl: [virglrenderer] OpenGL implementation, superseded by Virgl2 | ||
- virgl2: [virglrenderer] OpenGL implementation | ||
- venus: [virglrenderer] Vulkan implementation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the ResourceCreate2D and other gpu commands fails with Rutabaga component error
when the venus
capset is explicitly set, have you tried it with the resource_blob PR? maybe it needs it to function properly?
Add command line arguments for configuring which capsets and features are enabled when configuring Rutabaga. Since we now specify the capsets explicitly we can drop the MAX_NUM_CAPSETS constant and fix the TODO. If the user selects virglrender the capsets are configured the default capset configuration is suitable for running virgl/venus guests. If the user select gfxstream, by default vulkan is enabled, this is suitable for running Android with gfxstream. Signed-off-by: Matej Hrica <[email protected]>
Signed-off-by: Matej Hrica <[email protected]>
The name of the project/backend is "virglrenderer", the dash was added by clap. Adding the dash seems confusing to the user, the old name is kept as a hidden alias. Signed-off-by: Matej Hrica <[email protected]>
This was an oversight, for the user to be able to use the crate as a library, the start_backend should be part of the public API. Signed-off-by: Matej Hrica <[email protected]>
Summary of the PR
This PR allows the user to configure more flags, that are passed to
Rutabaga
. By specifying the individual capsets explicitly this also fixes a TODO, which hard-coded the number of enabled capsets.Note: While you can enable some features using this, such as Venus or gfxstream-vulkan, these capsets are not really useful without blob resource support (to be added in other PR, depends on changes to QEMU) - you can enable the capsets, but not anything useful using them. This has been the case prior to this PR, but the capsets were just enabled implicitly.
Requirements
Before submitting your PR, please make sure you addressed the following
requirements:
git commit -s
), and the commit message has max 60 characters for thesummary and max 75 characters for each description line.
test.
Release" section of CHANGELOG.md (if no such section exists, please create one).
unsafe
code is properly documented.