[llvm-commits] [llvm] r173053 - in /llvm/trunk/lib/Target/R600: R600Instructions.td SIInstructions.td
Tom Stellard
thomas.stellard at amd.com
Mon Jan 21 07:40:49 PST 2013
Author: tstellar
Date: Mon Jan 21 09:40:48 2013
New Revision: 173053
URL: http://llvm.org/viewvc/llvm-project?rev=173053&view=rev
Log:
R600/SI: Use unnormalized coordinates for sampling with the RECT target.
Patch by: Michel Dänzer
Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
Reviewed-by: Christian König <christian.koenig at amd.com>
Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
Modified:
llvm/trunk/lib/Target/R600/R600Instructions.td
llvm/trunk/lib/Target/R600/SIInstructions.td
Modified: llvm/trunk/lib/Target/R600/R600Instructions.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/R600Instructions.td?rev=173053&r1=173052&r2=173053&view=diff
==============================================================================
--- llvm/trunk/lib/Target/R600/R600Instructions.td (original)
+++ llvm/trunk/lib/Target/R600/R600Instructions.td Mon Jan 21 09:40:48 2013
@@ -342,6 +342,13 @@
}]
>;
+def TEX_RECT : PatLeaf<
+ (imm),
+ [{uint32_t TType = (uint32_t)N->getZExtValue();
+ return TType == 5;
+ }]
+>;
+
class EG_CF_RAT <bits <8> cf_inst, bits <6> rat_inst, bits<4> rat_id, dag outs,
dag ins, string asm, list<dag> pattern> :
InstR600ISA <outs, ins, asm, pattern> {
Modified: llvm/trunk/lib/Target/R600/SIInstructions.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/SIInstructions.td?rev=173053&r1=173052&r2=173053&view=diff
==============================================================================
--- llvm/trunk/lib/Target/R600/SIInstructions.td (original)
+++ llvm/trunk/lib/Target/R600/SIInstructions.td Mon Jan 21 09:40:48 2013
@@ -1191,6 +1191,12 @@
SReg_256:$rsrc, SReg_128:$sampler)
>;
+def : Pat <
+ (int_SI_sample imm:$writemask, VReg_128:$coord, SReg_256:$rsrc, SReg_128:$sampler, TEX_RECT),
+ (IMAGE_SAMPLE imm:$writemask, 1, 0, 0, 0, 0, 0, 0, VReg_128:$coord,
+ SReg_256:$rsrc, SReg_128:$sampler)
+>;
+
/* int_SI_sample_lod */
def : Pat <
(int_SI_sample_lod imm:$writemask, VReg_128:$coord, SReg_256:$rsrc, SReg_128:$sampler, imm),
More information about the llvm-commits
mailing list