summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2018-02-05 15:45:32 +1100
committerTimothy Arceri <[email protected]>2018-02-13 14:43:05 +1100
commit94fa090fada8394c8569191b5ebfc46c037f20ba (patch)
tree3ef630d85045a63e06515a24976c3f3706b60ce7
parent6b1e26e181fbe7fd64b42a0b77f80535be4d7690 (diff)
st/glsl: set req_local_mem earlier for compute shaders
Without this change it will never be set for backends using nir. Reviewed-by: Marek Olšák <[email protected]>
-rw-r--r--src/mesa/state_tracker/st_program.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
index 03f5ce4753b..5bf76e1b888 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;