[virglrenderer-devel] [PATCH v3 3/3] virgl-caps: Report support for GL_ARB_copy_image to the guest

Gert Wollny gert.wollny at collabora.com
Thu Jul 12 10:37:01 UTC 2018


Signed-off-by: Gert Wollny <gert.wollny at collabora.com>
---
 src/virgl_hw.h       | 1 +
 src/vrend_renderer.c | 7 ++++++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/virgl_hw.h b/src/virgl_hw.h
index 738ed54..958c90b 100644
--- a/src/virgl_hw.h
+++ b/src/virgl_hw.h
@@ -220,6 +220,7 @@ enum virgl_formats {
 #define VIRGL_CAP_NONE 0
 #define VIRGL_CAP_TGSI_INVARIANT       (1 << 0)
 #define VIRGL_CAP_TEXTURE_VIEW         (1 << 1)
+#define VIRGL_CAP_COPY_IMAGE           (1 << 3)
 
 struct virgl_caps_bool_set1 {
         unsigned indep_blend_enable:1;
diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c
index e659318..9475fc4 100644
--- a/src/vrend_renderer.c
+++ b/src/vrend_renderer.c
@@ -7373,6 +7373,9 @@ static void vrend_renderer_fill_caps_gles(uint32_t set, UNUSED uint32_t version,
    caps->v2.texture_buffer_offset_alignment = 0;
 
    caps->v1.max_samples = vrend_renderer_query_multisample_caps(max, &caps->v2);
+
+   if (vrend_state.have_copy_image)
+      caps->v2.capability_bits |= VIRGL_CAP_COPY_IMAGE;
 }
 
 void vrend_renderer_fill_caps(uint32_t set, uint32_t version,
@@ -7549,7 +7552,6 @@ void vrend_renderer_fill_caps(uint32_t set, uint32_t version,
       caps->v1.max_viewports = 1;
    }
 
-
    if (!fill_capset2)
       return;
 
@@ -7605,6 +7607,9 @@ void vrend_renderer_fill_caps(uint32_t set, uint32_t version,
 
    if (gl_ver >= 43 || epoxy_has_gl_extension("GL_ARB_texture_view"))
       caps->v2.capability_bits |= VIRGL_CAP_TEXTURE_VIEW;
+
+   if (vrend_state.have_copy_image)
+      caps->v2.capability_bits |= VIRGL_CAP_COPY_IMAGE;
 }
 
 GLint64 vrend_renderer_get_timestamp(void)
-- 
2.17.1



More information about the virglrenderer-devel mailing list