[Mesa-dev] [PATCH 3/5] st/mesa: enable ARB_shader_viewport_layer_array

Nicolai Hähnle nhaehnle at gmail.com
Thu Apr 13 20:30:47 UTC 2017


From: Nicolai Hähnle <nicolai.haehnle at amd.com>

---
 src/mesa/state_tracker/st_extensions.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index 8b62360..1df2ba7 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -1122,20 +1122,25 @@ void st_init_extensions(struct pipe_screen *screen,
       } else {
          consts->ViewportBounds.Min = -16384.0;
          consts->ViewportBounds.Max = 16383.0;
       }
       extensions->ARB_viewport_array = GL_TRUE;
       extensions->ARB_fragment_layer_viewport = GL_TRUE;
       if (extensions->AMD_vertex_shader_layer)
          extensions->AMD_vertex_shader_viewport_index = GL_TRUE;
    }
 
+   if (extensions->AMD_vertex_shader_layer &&
+       extensions->AMD_vertex_shader_viewport_index &&
+       screen->get_param(screen, PIPE_CAP_TGSI_TES_LAYER_VIEWPORT))
+      extensions->ARB_shader_viewport_layer_array = GL_TRUE;
+
    /* ARB_framebuffer_no_attachments */
    if (screen->get_param(screen, PIPE_CAP_FRAMEBUFFER_NO_ATTACHMENT) &&
        ((consts->MaxSamples >= 4 && consts->MaxFramebufferLayers >= 2048) ||
         (consts->MaxFramebufferSamples >= consts->MaxSamples &&
          consts->MaxFramebufferLayers >= consts->MaxArrayTextureLayers)))
       extensions->ARB_framebuffer_no_attachments = GL_TRUE;
 
    /* GL_ARB_ES3_compatibility.
     *
     * Assume that ES3 is supported if GLSL 3.30 is supported.
-- 
2.9.3



More information about the mesa-dev mailing list