From 4ce339e74118786893b5138db37c09c4f2d830fd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Louis-Francis=20Ratt=C3=A9-Boulianne?= Date: Sat, 12 Oct 2019 02:46:48 -0400 Subject: [PATCH] gallium: add PIPE_CAP_PACKED_STREAM_OUTPUT MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Setting this cap to 0 (default is 1) should disable packing optimization for stream output (e.g. GL transform feedback captured variables). Signed-off-by: Louis-Francis Ratté-Boulianne Reviewed-by: Alyssa Rosenzweig Acked-by: Daniel Stone Part-of: --- src/gallium/auxiliary/util/u_screen.c | 3 +++ src/gallium/include/pipe/p_defines.h | 1 + src/mesa/state_tracker/st_extensions.c | 3 +++ 3 files changed, 7 insertions(+) diff --git a/src/gallium/auxiliary/util/u_screen.c b/src/gallium/auxiliary/util/u_screen.c index 372094f77e6..510c46aca5f 100644 --- a/src/gallium/auxiliary/util/u_screen.c +++ b/src/gallium/auxiliary/util/u_screen.c @@ -414,6 +414,9 @@ u_pipe_screen_get_param_defaults(struct pipe_screen *pscreen, /* Enables INTEL_blackhole_render */ return 0; + case PIPE_CAP_PACKED_STREAM_OUTPUT: + return 1; + default: unreachable("bad PIPE_CAP_*"); } diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h index 3b1d93528b5..aad67725f36 100644 --- a/src/gallium/include/pipe/p_defines.h +++ b/src/gallium/include/pipe/p_defines.h @@ -915,6 +915,7 @@ enum pipe_cap /* Turn draw, dispatch, blit into NOOP */ PIPE_CAP_FRONTEND_NOOP, PIPE_CAP_NIR_IMAGES_AS_DEREF, + PIPE_CAP_PACKED_STREAM_OUTPUT, }; /** diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index 2d946b5a358..d44c2c4ee9d 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -1420,6 +1420,9 @@ void st_init_extensions(struct pipe_screen *screen, consts->DisableVaryingPacking = GL_TRUE; } + if (!screen->get_param(screen, PIPE_CAP_PACKED_STREAM_OUTPUT)) + consts->DisableTransformFeedbackPacking = GL_TRUE; + unsigned max_fb_fetch_rts = screen->get_param(screen, PIPE_CAP_FBFETCH); bool coherent_fb_fetch = screen->get_param(screen, PIPE_CAP_FBFETCH_COHERENT); -- 2.30.2