summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/radeonsi/si_shader.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index 450676c597f..0e89ccac09d 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -1851,10 +1851,11 @@ static LLVMValueRef fetch_constant(
return lp_build_gather_values(&ctx->gallivm, values, 4);
}
- buf = reg->Register.Dimension ? reg->Dimension.Index : 0;
+ assert(reg->Register.Dimension);
+ buf = reg->Dimension.Index;
idx = reg->Register.Index * 4 + swizzle;
- if (reg->Register.Dimension && reg->Dimension.Indirect) {
+ if (reg->Dimension.Indirect) {
LLVMValueRef ptr = LLVMGetParam(ctx->main_fn, ctx->param_const_and_shader_buffers);
LLVMValueRef index;
index = si_get_bounded_indirect_index(ctx, &reg->DimIndirect,