From 44067d6f0d3822bfe7cef449bb5920a986a66cdc Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Fri, 15 Dec 2017 14:16:01 +1100 Subject: [PATCH] radeonsi: pass input_idx to declare_nir_input_vs() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This make it consistent with declare_nir_input_fs() and will allow us to support doubles. Reviewed-by: Marek Olšák --- src/gallium/drivers/radeonsi/si_shader_nir.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c b/src/gallium/drivers/radeonsi/si_shader_nir.c index e05548c1b88..94d8def8141 100644 --- a/src/gallium/drivers/radeonsi/si_shader_nir.c +++ b/src/gallium/drivers/radeonsi/si_shader_nir.c @@ -554,9 +554,10 @@ si_lower_nir(struct si_shader_selector* sel) static void declare_nir_input_vs(struct si_shader_context *ctx, struct nir_variable *variable, + unsigned input_index, LLVMValueRef out[4]) { - si_llvm_load_input_vs(ctx, variable->data.driver_location / 4, out); + si_llvm_load_input_vs(ctx, input_index, out); } static void declare_nir_input_fs(struct si_shader_context *ctx, @@ -678,7 +679,7 @@ bool si_nir_build_llvm(struct si_shader_context *ctx, struct nir_shader *nir) continue; if (nir->info.stage == MESA_SHADER_VERTEX) { - declare_nir_input_vs(ctx, variable, data); + declare_nir_input_vs(ctx, variable, input_idx / 4, data); bitcast_inputs(ctx, data, input_idx); } else if (nir->info.stage == MESA_SHADER_FRAGMENT) { declare_nir_input_fs(ctx, variable, input_idx / 4, data); -- 2.30.2