From 94fa090fada8394c8569191b5ebfc46c037f20ba Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Mon, 5 Feb 2018 15:45:32 +1100 Subject: [PATCH] st/glsl: set req_local_mem earlier for compute shaders MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Without this change it will never be set for backends using nir. Reviewed-by: Marek Olšák --- 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 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; -- 2.30.2