Mesa (main): st/mesa: only enable ARB_enhanced_layouts if there are xfb buffers

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Feb 9 04:08:32 UTC 2022


Module: Mesa
Branch: main
Commit: 86eaff29c0b118e0892b18089784fed02435bbf2
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=86eaff29c0b118e0892b18089784fed02435bbf2

Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date:   Fri Feb  4 00:08:59 2022 -0500

st/mesa: only enable ARB_enhanced_layouts if there are xfb buffers

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 at alum.mit.edu>
Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14869>

---

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

diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index b9dee08d2bf..f9dd228b8ba 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -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;
    }
 



More information about the mesa-commit mailing list