st/mesa: only enable ARB_enhanced_layouts if there are xfb buffers
authorIlia Mirkin <imirkin@alum.mit.edu>
Fri, 4 Feb 2022 05:08:59 +0000 (00:08 -0500)
committerMarge Bot <emma+marge@anholt.net>
Wed, 9 Feb 2022 03:31:16 +0000 (03:31 +0000)
It really doesn't make sense without any xfb support. One could limp
along, but our validation does not work as-is. Doesn't seem important to
support this use-case.

This disables GL_ARB_enhanced_layouts on crocus with gen4/5.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14869>

src/mesa/state_tracker/st_extensions.c

index b9dee08..f9dd228 100644 (file)
@@ -1199,7 +1199,8 @@ void st_init_extensions(struct pipe_screen *screen,
       extensions->EXT_gpu_shader4 = GL_TRUE;
       extensions->EXT_texture_buffer_object = GL_TRUE;
 
-      if (screen->get_param(screen, PIPE_CAP_TGSI_ARRAY_COMPONENTS))
+      if (consts->MaxTransformFeedbackBuffers &&
+          screen->get_param(screen, PIPE_CAP_TGSI_ARRAY_COMPONENTS))
          extensions->ARB_enhanced_layouts = GL_TRUE;
    }