[virglrenderer-devel] [PATCH 6/6] expose ARB_texture_view support to guest

Dave Airlie airlied at gmail.com
Fri Jun 8 01:18:55 UTC 2018


From: Dave Airlie <airlied at redhat.com>

---
 src/virgl_hw.h       | 1 +
 src/vrend_renderer.c | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/src/virgl_hw.h b/src/virgl_hw.h
index ba0f758..589cd73 100644
--- a/src/virgl_hw.h
+++ b/src/virgl_hw.h
@@ -214,6 +214,7 @@ enum virgl_formats {
 /* 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_CAP_TEXTURE_VIEW         (1 << 1)
 
 struct virgl_caps_bool_set1 {
         unsigned indep_blend_enable:1;
diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c
index 10aafdc..ff3c803 100644
--- a/src/vrend_renderer.c
+++ b/src/vrend_renderer.c
@@ -7177,6 +7177,9 @@ void vrend_renderer_fill_caps(uint32_t set, uint32_t version,
    }
 
    caps->v2.capability_bits |= VIRGL_CAP_TGSI_INVARIANT;
+
+   if (gl_ver >= 43 || epoxy_has_gl_extension("GL_ARB_texture_view"))
+      caps->v2.capability_bits |= VIRGL_CAP_TEXTURE_VIEW;
 }
 
 GLint64 vrend_renderer_get_timestamp(void)
-- 
2.14.3



More information about the virglrenderer-devel mailing list