[virglrenderer-devel] [PATCH 19/19] tessellation: expose ARB_tessellation_shader to the guest.

Dave Airlie airlied at gmail.com
Fri Jun 8 05:14:23 UTC 2018


From: Dave Airlie <airlied at redhat.com>

This also exposes patches as a primitive type
---
 src/vrend_renderer.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c
index 6d352d2..009708d 100644
--- a/src/vrend_renderer.c
+++ b/src/vrend_renderer.c
@@ -6886,6 +6886,8 @@ static bool vrend_renderer_fill_caps_common(uint32_t set, uint32_t version,
          (1 << PIPE_PRIM_TRIANGLES_ADJACENCY) |
          (1 << PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY);
    }
+   if (!vrend_state.use_gles && caps->v1.glsl_level >= 400)
+      caps->v1.prim_mask |= (1 << PIPE_PRIM_PATCHES);
 
 
    /* Common limits for all backends. */
@@ -7127,6 +7129,7 @@ void vrend_renderer_fill_caps(uint32_t set, uint32_t version,
       caps->v1.bset.texture_query_lod = 1;
       caps->v1.bset.has_indirect_draw = 1;
       caps->v1.bset.has_sample_shading = 1;
+      caps->v1.bset.has_tessellation_shaders = 1;
    } else {
       if (epoxy_has_gl_extension("GL_ARB_draw_buffers_blend"))
          caps->v1.bset.indep_blend_func = 1;
@@ -7138,6 +7141,8 @@ void vrend_renderer_fill_caps(uint32_t set, uint32_t version,
          caps->v1.bset.has_indirect_draw = 1;
       if (epoxy_has_gl_extension("GL_ARB_sample_shading"))
          caps->v1.bset.has_sample_shading = 1;
+      if (epoxy_has_gl_extension("GL_ARB_tessellation_shader"))
+         caps->v1.bset.has_tessellation_shaders = 1;
    }
 
    if (gl_ver >= 42) {
-- 
2.14.3



More information about the virglrenderer-devel mailing list