diff options
author | Timothy Arceri <[email protected]> | 2017-12-15 14:16:01 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2018-01-30 09:08:47 +1100 |
commit | 44067d6f0d3822bfe7cef449bb5920a986a66cdc (patch) | |
tree | 52454954c1aa6e5f7f0629b1bf626531f9b1b2bb /src | |
parent | cf75ee3ab1cf95cb19d925821f71b353d394956d (diff) |
radeonsi: pass input_idx to declare_nir_input_vs()
This make it consistent with declare_nir_input_fs() and will allow
us to support doubles.
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader_nir.c | 5 |
1 files 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); |