aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw/draw_llvm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_llvm.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_llvm.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/draw/draw_llvm.c b/src/gallium/auxiliary/draw/draw_llvm.c
index 4a3bada06e0..2c78e4709d9 100644
--- a/src/gallium/auxiliary/draw/draw_llvm.c
+++ b/src/gallium/auxiliary/draw/draw_llvm.c
@@ -1622,7 +1622,7 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant)
struct gallivm_state *gallivm = variant->gallivm;
LLVMContextRef context = gallivm->context;
LLVMTypeRef int32_type = LLVMInt32TypeInContext(context);
- LLVMTypeRef arg_types[11];
+ LLVMTypeRef arg_types[12];
unsigned num_arg_types = ARRAY_SIZE(arg_types);
LLVMTypeRef func_type;
LLVMValueRef context_ptr;
@@ -1689,6 +1689,7 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant)
arg_types[i++] = int32_type; /* vertex_id_offset */
arg_types[i++] = int32_type; /* start_instance */
arg_types[i++] = LLVMPointerType(int32_type, 0); /* fetch_elts */
+ arg_types[i++] = int32_type; /* draw_id */
func_type = LLVMFunctionType(LLVMInt8TypeInContext(context),
arg_types, num_arg_types, 0);
@@ -1723,6 +1724,7 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant)
vertex_id_offset = LLVMGetParam(variant_func, 8);
system_values.base_instance = LLVMGetParam(variant_func, 9);
fetch_elts = LLVMGetParam(variant_func, 10);
+ system_values.draw_id = LLVMGetParam(variant_func, 11);
lp_build_name(context_ptr, "context");
lp_build_name(io_ptr, "io");
@@ -1735,6 +1737,7 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant)
lp_build_name(vertex_id_offset, "vertex_id_offset");
lp_build_name(system_values.base_instance, "start_instance");
lp_build_name(fetch_elts, "fetch_elts");
+ lp_build_name(system_values.draw_id, "draw_id");
/*
* Function body