summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2017-02-01 10:43:36 +1000
committerDave Airlie <[email protected]>2017-02-02 08:25:04 +1000
commit230e308ff9a1d6ac6519db70d4e3038c2c948088 (patch)
treea09764ac94395e2018d8c4c1c34d78402efc39b6
parentdc68b920dfd1adf2616dda99da730e6412fe2e6e (diff)
radv/ac: add const_index to fetch index for gs inputs
This fixes clip distance fetches as they are single item loads with a const_index like float[1]. Fixes: dEQP-VK.clipping.user_defined.*.vert_geom.[0-6] Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
-rw-r--r--src/amd/common/ac_nir_to_llvm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index 67c5c0618c6..8075eda4100 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -2316,7 +2316,7 @@ load_gs_input(struct nir_to_llvm_context *ctx,
param = shader_io_get_unique_index(instr->variables[0]->var->data.location);
args[0] = ctx->esgs_ring;
args[1] = vtx_offset;
- args[2] = LLVMConstInt(ctx->i32, (param * 4 + i) * 256, false);
+ args[2] = LLVMConstInt(ctx->i32, (param * 4 + i + const_index) * 256, false);
args[3] = ctx->i32zero;
args[4] = ctx->i32one; /* OFFEN */
args[5] = ctx->i32zero; /* IDXEN */