[virglrenderer-devel] [PATCH 6/8] renderer: expose TXQS capability to guest.

Dave Airlie airlied at gmail.com
Mon Jul 30 04:56:17 UTC 2018


From: Dave Airlie <airlied at redhat.com>

This lets the guest know it can use the TXQS opcode

Reviewed-by: Gert Wollny <gert.wollny at collabora.com>
---
 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 1fee9a9..52f1d5a 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 0a5ab04..242fc57 100644
--- a/src/vrend_renderer.c
+++ b/src/vrend_renderer.c
@@ -129,6 +129,7 @@ enum features_id
    feat_transform_feedback2,
    feat_transform_feedback3,
    feat_transform_feedback_overflow_query,
+   feat_txqs,
    feat_ubo,
    feat_viewport_array,
    feat_last,
@@ -182,6 +183,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" } },
 };
@@ -7984,6 +7986,9 @@ void vrend_renderer_fill_caps(uint32_t set, UNUSED 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