summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortstellar <tstellar@91177308-0d34-0410-b5e6-96231b3b80d8>2012-11-13 15:22:15 +0000
committertstellar <tstellar@91177308-0d34-0410-b5e6-96231b3b80d8>2012-11-13 15:22:15 +0000
commitdca75e6619ed9262936a233deb03de9da897aa93 (patch)
tree03cd0d637cc1be890ea29b69a38c99dd6f7d0016
parente38dbfa286da9aa57187d6d7e373e706e2f33df7 (diff)
R600: Fix sampler->resource_id mapping
Patch by: Vadim Girlin Reviewed-by: Tom Stellard <thomas.stellard@amd.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/R600/@167844 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/AMDGPU/MCTargetDesc/R600MCCodeEmitter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Target/AMDGPU/MCTargetDesc/R600MCCodeEmitter.cpp b/lib/Target/AMDGPU/MCTargetDesc/R600MCCodeEmitter.cpp
index 5178157d6b..e1d3f7bf65 100644
--- a/lib/Target/AMDGPU/MCTargetDesc/R600MCCodeEmitter.cpp
+++ b/lib/Target/AMDGPU/MCTargetDesc/R600MCCodeEmitter.cpp
@@ -349,8 +349,8 @@ void R600MCCodeEmitter::EmitTexInstr(const MCInst &MI,
// Emit instruction
EmitByte(getBinaryCodeForInstr(MI, Fixups), OS);
- // XXX: Emit resource id r600_shader.c uses sampler + 1. Why?
- EmitByte(sampler + 1 + 1, OS);
+ // XXX: Emit resource id (sampler + 3 (R600_MAX_CONST_BUFFERS) )
+ EmitByte(sampler + 3, OS);
// Emit source register
EmitByte(getHWReg(MI.getOperand(1).getReg()), OS);