gallium: add PIPE_CAP_PACKED_STREAM_OUTPUT
authorLouis-Francis Ratté-Boulianne <lfrb@collabora.com>
Sat, 12 Oct 2019 06:46:48 +0000 (02:46 -0400)
committerMarge Bot <eric+marge@anholt.net>
Tue, 3 Mar 2020 12:28:23 +0000 (12:28 +0000)
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 <lfrb@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2433>

src/gallium/auxiliary/util/u_screen.c
src/gallium/include/pipe/p_defines.h
src/mesa/state_tracker/st_extensions.c

index 372094f77e69dea5b3dee8fb46f173777c2c9d89..510c46aca5fa0fd2dfbfb1db8fdf8802add08df2 100644 (file)
@@ -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_*");
    }
index 3b1d93528b573f1ac7231a67011a39f939ba71a7..aad67725f36ba0ee4071bbc93a7e345d1f77cb3a 100644 (file)
@@ -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,
 };
 
 /**
index 2d946b5a358694ebf783e23c5764b798f660a78f..d44c2c4ee9d2a51c375822807cbaed2416ddbc68 100644 (file)
@@ -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);