[virglrenderer-devel] [PATCH 09/10] renderer: expose TXQS capability to guest.

Dave Airlie airlied at gmail.com
Tue Jul 24 23:01:00 UTC 2018


From: Dave Airlie <airlied at redhat.com>

This lets the guest know it can use the TXQS opcode
---
 src/virgl_hw.h       | 1 +
 src/vrend_renderer.c | 5 +++++
 2 files changed, 6 insertions(+)

diff --git a/src/virgl_hw.h b/src/virgl_hw.h
index bba622f..81193e7 100644
--- a/src/virgl_hw.h
+++ b/src/virgl_hw.h
@@ -222,6 +222,7 @@ enum virgl_formats {
 #define VIRGL_CAP_SET_MIN_SAMPLES      (1 << 2)
 #define VIRGL_CAP_COPY_IMAGE           (1 << 3)
 #define VIRGL_CAP_TGSI_PRECISE         (1 << 4)
+#define VIRGL_CAP_TXQS                 (1 << 5)
 
 /* virgl bind flags - these are compatible with mesa 10.5 gallium.
  * but are fixed, no other should be passed to virgl either.
diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c
index a2042a4..e9a5d38 100644
--- a/src/vrend_renderer.c
+++ b/src/vrend_renderer.c
@@ -128,6 +128,7 @@ enum features_id
    feat_transform_feedback2,
    feat_transform_feedback3,
    feat_transform_feedback_overflow_query,
+   feat_txqs,
    feat_ubo,
    feat_viewport_array,
    feat_last,
@@ -180,6 +181,7 @@ static const  struct {
    [feat_transform_feedback2] = { 40, 30, { "GL_ARB_transform_feedback2" } },
    [feat_transform_feedback3] = { 40, UNAVAIL, { "GL_ARB_transform_feedback3" } },
    [feat_transform_feedback_overflow_query] = { 46, UNAVAIL, { "GL_ARB_transform_feedback_overflow_query" } },
+   [feat_txqs] = { 45, UNAVAIL, { "GL_ARB_shader_texture_image_samples" } },
    [feat_ubo] = { 31, 30, { "GL_ARB_uniform_buffer_object" } },
    [feat_viewport_array] = { 41, UNAVAIL, { "GL_ARB_viewport_array" } },
 };
@@ -8023,6 +8025,9 @@ void vrend_renderer_fill_caps(uint32_t set, uint32_t version,
    if (has_feature(feat_texture_view))
       caps->v2.capability_bits |= VIRGL_CAP_TEXTURE_VIEW;
 
+   if (has_feature(feat_txqs))
+      caps->v2.capability_bits |= VIRGL_CAP_TXQS;
+
    if (has_feature(feat_copy_image))
       caps->v2.capability_bits |= VIRGL_CAP_COPY_IMAGE;
 }
-- 
2.14.3



More information about the virglrenderer-devel mailing list