radeonsi: bump RADEON_LLVM_MAX_SYSTEM_VALUES
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Thu, 30 Mar 2017 12:14:27 +0000 (14:14 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 5 Apr 2017 13:29:42 +0000 (15:29 +0200)
ARB_shader_ballot introduces 7 new system values that can be used
in all shader stages.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/si_shader.c
src/gallium/drivers/radeonsi/si_shader_internal.h

index 29d3dd4..600f2e3 100644 (file)
@@ -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,
index 47aeb5d..fd7deec 100644 (file)
@@ -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;