summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2017-03-30 14:14:27 +0200
committerNicolai Hähnle <[email protected]>2017-04-05 15:29:42 +0200
commit1ee57b16beec5a9128c75a3191eed051317e9836 (patch)
treefb572d214f0cc2961f80625e1a87ea65a550653a
parentee2d93eb928fcdc43b2f15b32f90de497bd7bb2d (diff)
radeonsi: bump RADEON_LLVM_MAX_SYSTEM_VALUES
ARB_shader_ballot introduces 7 new system values that can be used in all shader stages. Reviewed-by: Marek Olšák <[email protected]>
-rw-r--r--src/gallium/drivers/radeonsi/si_shader.c2
-rw-r--r--src/gallium/drivers/radeonsi/si_shader_internal.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index 29d3dd4578d..600f2e31029 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -1376,6 +1376,8 @@ static void declare_system_value(struct si_shader_context *ctx,
struct gallivm_state *gallivm = &ctx->gallivm;
LLVMValueRef value = 0;
+ assert(index < RADEON_LLVM_MAX_SYSTEM_VALUES);
+
switch (decl->Semantic.Name) {
case TGSI_SEMANTIC_INSTANCEID:
value = LLVMGetParam(ctx->main_fn,
diff --git a/src/gallium/drivers/radeonsi/si_shader_internal.h b/src/gallium/drivers/radeonsi/si_shader_internal.h
index 47aeb5d3b82..fd7deec49bf 100644
--- a/src/gallium/drivers/radeonsi/si_shader_internal.h
+++ b/src/gallium/drivers/radeonsi/si_shader_internal.h
@@ -43,7 +43,7 @@ struct ac_shader_binary;
#define RADEON_LLVM_INITIAL_CF_DEPTH 4
-#define RADEON_LLVM_MAX_SYSTEM_VALUES 4
+#define RADEON_LLVM_MAX_SYSTEM_VALUES 11
#define RADEON_LLVM_MAX_ADDRS 16
struct si_llvm_flow;