From ed88b0ef5eff1845fe266b620b1866fe85ba2532 Mon Sep 17 00:00:00 2001 From: Gurchetan Singh Date: Thu, 6 Jun 2019 17:34:07 -0700 Subject: devices: gpu: advertise support for capset 3 Useful for prototyping new features. BUG=chromium:924405 TEST=compile Change-Id: Ibdc4a70761493939ca96b92540b9e0cca88c17a8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1650290 Tested-by: Gurchetan Singh Tested-by: kokoro Reviewed-by: Zach Reizner Commit-Queue: Gurchetan Singh Auto-Submit: Gurchetan Singh --- gpu_renderer/src/lib.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gpu_renderer/src') diff --git a/gpu_renderer/src/lib.rs b/gpu_renderer/src/lib.rs index 726f912..270dc93 100644 --- a/gpu_renderer/src/lib.rs +++ b/gpu_renderer/src/lib.rs @@ -41,6 +41,7 @@ pub use crate::generated::virglrenderer::{ virgl_renderer_resource_create_args, virgl_renderer_resource_info, VIRGL_RES_BIND_SCANOUT, VIRGL_RES_BIND_SHARED, }; +pub use crate::generated::virtgpu_hw::virtgpu_caps; pub use crate::pipe_format_fourcc::pipe_format_fourcc as format_fourcc; /// Arguments used in `Renderer::create_resource`.. @@ -421,6 +422,10 @@ impl Renderer { /// Gets the version and size for the given capability set ID. pub fn get_cap_set_info(&self, id: u32) -> (u32, u32) { + if id == 3 { + return (0 as u32, size_of::() as u32); + } + let mut version = 0; let mut size = 0; // Safe because virglrenderer is initialized by now and properly size stack variables are -- cgit 1.4.1