summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_llvm.c
diff options
context:
space:
mode:
authorVincent Lejeune <[email protected]>2013-05-21 16:34:52 +0200
committerVincent Lejeune <[email protected]>2013-10-02 17:30:07 +0200
commit9f183eb7deb2bd40e9717deb723e4976f443fb88 (patch)
tree99cec6555e2d50a2c45b37ced5e9de9beb7c7d31 /src/gallium/drivers/r600/r600_llvm.c
parent848c0e72f36d0e1e460193a2d30b2f631529156f (diff)
r600g/llvm: fix txq for texture buffer
Diffstat (limited to 'src/gallium/drivers/r600/r600_llvm.c')
-rw-r--r--src/gallium/drivers/r600/r600_llvm.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gallium/drivers/r600/r600_llvm.c b/src/gallium/drivers/r600/r600_llvm.c
index 03a68e4648f..3fe6a81a540 100644
--- a/src/gallium/drivers/r600/r600_llvm.c
+++ b/src/gallium/drivers/r600/r600_llvm.c
@@ -23,6 +23,8 @@
#define CONSTANT_BUFFER_0_ADDR_SPACE 8
#define CONSTANT_BUFFER_1_ADDR_SPACE (CONSTANT_BUFFER_0_ADDR_SPACE + R600_UCP_CONST_BUFFER)
#define CONSTANT_TXQ_BUFFER (CONSTANT_BUFFER_0_ADDR_SPACE + R600_TXQ_CONST_BUFFER)
+#define LLVM_R600_BUFFER_INFO_CONST_BUFFER \
+ (CONSTANT_BUFFER_0_ADDR_SPACE + R600_BUFFER_INFO_CONST_BUFFER)
static LLVMValueRef llvm_load_const_buffer(
struct lp_build_tgsi_context * bld_base,
@@ -410,8 +412,11 @@ static void llvm_emit_tex(
if (emit_data->inst->Texture.Texture == TGSI_TEXTURE_BUFFER) {
switch (emit_data->inst->Instruction.Opcode) {
case TGSI_OPCODE_TXQ: {
- LLVMValueRef offset = lp_build_const_int32(bld_base->base.gallivm, 1);
- LLVMValueRef cvecval = llvm_load_const_buffer(bld_base, offset, R600_BUFFER_INFO_CONST_BUFFER);
+ struct radeon_llvm_context * ctx = radeon_llvm_context(bld_base);
+ ctx->uses_tex_buffers = true;
+ LLVMValueRef offset = lp_build_const_int32(bld_base->base.gallivm, 0);
+ LLVMValueRef cvecval = llvm_load_const_buffer(bld_base, offset,
+ LLVM_R600_BUFFER_INFO_CONST_BUFFER);
emit_data->output[0] = cvecval;
return;
}