aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorVincent Lejeune <[email protected]>2013-01-19 22:27:16 +0100
committerVincent Lejeune <[email protected]>2013-01-19 22:28:13 +0100
commitf9f5c92f734c517c1bd486f5a3b1931ea6f871a5 (patch)
tree6e0a9d7b6eb44ba39cc003ddf287fb5cd4ca29b1 /src/gallium
parente264b8ef4138fb874bcf3f82cfd7468ee27768da (diff)
r600g/llvm: Fixes addressspace of basevectors for clipvertex
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/r600/r600_llvm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/r600/r600_llvm.c b/src/gallium/drivers/r600/r600_llvm.c
index 0f0eb84557e..276ef5fe39f 100644
--- a/src/gallium/drivers/r600/r600_llvm.c
+++ b/src/gallium/drivers/r600/r600_llvm.c
@@ -21,6 +21,7 @@
#if defined R600_USE_LLVM || defined HAVE_OPENCL
#define CONSTANT_BUFFER_0_ADDR_SPACE 9
+#define CONSTANT_BUFFER_1_ADDR_SPACE (CONSTANT_BUFFER_0_ADDR_SPACE + R600_UCP_CONST_BUFFER)
static LLVMValueRef llvm_fetch_const(
struct lp_build_tgsi_context * bld_base,
@@ -316,7 +317,7 @@ static void llvm_emit_epilogue(struct lp_build_tgsi_context * bld_base)
LLVMConstInt(LLVMInt64TypeInContext(bld_base->base.gallivm->context), 0, false),
lp_build_const_int32(bld_base->base.gallivm, reg_index * 4 + chan)
};
- LLVMTypeRef const_ptr_type = LLVMPointerType(LLVMArrayType(LLVMVectorType(bld_base->base.elem_type, 4), 1024), 9);
+ LLVMTypeRef const_ptr_type = LLVMPointerType(LLVMArrayType(LLVMVectorType(bld_base->base.elem_type, 4), 1024), CONSTANT_BUFFER_1_ADDR_SPACE);
LLVMValueRef const_ptr = LLVMBuildIntToPtr(bld_base->base.gallivm->builder, lp_build_const_int32(bld_base->base.gallivm, 0), const_ptr_type, "");
LLVMValueRef ptr = LLVMBuildGEP(bld_base->base.gallivm->builder, const_ptr, offset, 2, "");
LLVMValueRef base_vector = LLVMBuildLoad(bld_base->base.gallivm->builder, ptr, "");