[Mesa-dev] [PATCH 1/5] st/glsl: set req_local_mem earlier for compute shaders

Timothy Arceri tarceri at itsqueeze.com
Fri Feb 9 01:48:01 UTC 2018


Without this is will never be set for backends using nir.
---
 src/mesa/state_tracker/st_program.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
index d9b7155a91..145a070573 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/src/mesa/state_tracker/st_program.c
@@ -1654,6 +1654,8 @@ st_translate_compute_program(struct st_context *st,
    struct ureg_program *ureg;
    struct pipe_shader_state prog;
 
+   stcp->tgsi.req_local_mem = stcp->Base.info.cs.shared_size;
+
    if (stcp->shader_program) {
       /* no compute variants: */
       st_finalize_nir(st, &stcp->Base, stcp->shader_program,
@@ -1670,7 +1672,6 @@ st_translate_compute_program(struct st_context *st,
                                PIPE_SHADER_COMPUTE, &prog);
 
    stcp->tgsi.ir_type = PIPE_SHADER_IR_TGSI;
-   stcp->tgsi.req_local_mem = stcp->Base.info.cs.shared_size;
    stcp->tgsi.req_private_mem = 0;
    stcp->tgsi.req_input_mem = 0;
 
-- 
2.14.3



More information about the mesa-dev mailing list