[Mesa-dev] [PATCH 2/2] virgl: use bits in caps set v2
gurchetansingh at chromium.org
gurchetansingh at chromium.org
Mon Jun 4 17:25:20 UTC 2018
Let's add another field to caps v2, that can help report boolean
values.
Suggested-by: Gert Wollny <gert.wollny at collabora.com>
Suggested-by: Dave Airlie <airlied at redhat.com>
---
src/gallium/drivers/virgl/virgl_hw.h | 5 +++++
src/gallium/drivers/virgl/virgl_winsys.h | 1 +
2 files changed, 6 insertions(+)
diff --git a/src/gallium/drivers/virgl/virgl_hw.h b/src/gallium/drivers/virgl/virgl_hw.h
index a2c70bf86b..ee58520f9b 100644
--- a/src/gallium/drivers/virgl/virgl_hw.h
+++ b/src/gallium/drivers/virgl/virgl_hw.h
@@ -197,6 +197,10 @@ enum virgl_formats {
VIRGL_FORMAT_MAX,
};
+/* These are used by the capability_bits field in virgl_caps_v2. */
+#define VIRGL_CAP_NONE 0
+#define VIRGL_CAP_TGSI_INVARIANT (1 << 0)
+
#define VIRGL_BIND_DEPTH_STENCIL (1 << 0)
#define VIRGL_BIND_RENDER_TARGET (1 << 1)
#define VIRGL_BIND_SAMPLER_VIEW (1 << 3)
@@ -293,6 +297,7 @@ struct virgl_caps_v2 {
uint32_t texture_buffer_offset_alignment;
uint32_t uniform_buffer_offset_alignment;
uint32_t shader_buffer_offset_alignment;
+ uint32_t capability_bits;
};
union virgl_caps {
diff --git a/src/gallium/drivers/virgl/virgl_winsys.h b/src/gallium/drivers/virgl/virgl_winsys.h
index 83cb93138a..9ebb31a1e4 100644
--- a/src/gallium/drivers/virgl/virgl_winsys.h
+++ b/src/gallium/drivers/virgl/virgl_winsys.h
@@ -135,5 +135,6 @@ static inline void virgl_ws_fill_new_caps_defaults(struct virgl_drm_caps *caps)
caps->caps.v2.texture_buffer_offset_alignment = 0;
caps->caps.v2.uniform_buffer_offset_alignment = 256;
caps->caps.v2.shader_buffer_offset_alignment = 32;
+ caps->caps.v2.capability_bits = 0;
}
#endif
--
2.13.5
More information about the mesa-dev
mailing list