mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-24 20:48:55 +00:00
devices: gpu: fallback to 2d rendering if virgl is not enabled
The virgl renderer was unconditionally selected as the default backend for crosvm, even if the "virgl_renderer" feature is not enabled. This forces the user to explicitly specify the 2d backend with the --gpu option, which can be confusing for new users. Simplify things a bit by using the 2D renderer as default if the "virgl_renderer" feature is not enabled - that way the GPU can be used without having to specify a backend explicitly. BUG=b:213532598 TEST=successfully run crosvm without the "virgl_renderer" feature and without specifying the "backend" GPU option. Change-Id: Ib36b7d92cef62d9dd91b0a41051362d1c57e0536 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3528233 Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org> Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
This commit is contained in:
parent
0550775207
commit
104b471578
1 changed files with 5 additions and 1 deletions
|
@ -119,7 +119,11 @@ impl Default for GpuParameters {
|
|||
gfxstream_use_guest_angle: false,
|
||||
gfxstream_use_syncfd: true,
|
||||
use_vulkan: false,
|
||||
mode: GpuMode::ModeVirglRenderer,
|
||||
mode: if cfg!(feature = "virgl_renderer") {
|
||||
GpuMode::ModeVirglRenderer
|
||||
} else {
|
||||
GpuMode::Mode2D
|
||||
},
|
||||
cache_path: None,
|
||||
cache_size: None,
|
||||
udmabuf: false,
|
||||
|
|
Loading…
Reference in a new issue