R600: Fix regression with shadow array sampler on pre-SI GPUs.
authorMichel Danzer <michel.daenzer@amd.com>
Tue, 12 Feb 2013 12:11:23 +0000 (12:11 +0000)
committerMichel Danzer <michel.daenzer@amd.com>
Tue, 12 Feb 2013 12:11:23 +0000 (12:11 +0000)
'R600/SI: Use proper instructions for array/shadow samplers.' removed two
cases from TEX_SHADOW. Vincent Lejeune reported on IRC that this broke some
shadow array piglit tests with the r600g driver. Reinstating the removed
cases should fix this, and still works with radeonsi as well.

I will follow up with some lit tests which would have caught the regression.

NOTE: This is a candidate for the Mesa stable branch.

Tested-by: Vincent Lejeune <vljn@ovi.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174963 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/R600/R600Instructions.td

index 591f66d2c16b1fa5a2e63189e448f9896d4f73e3..373a793c80d1c6dbe7e177af3e25d8ee5b40febe 100644 (file)
@@ -399,7 +399,7 @@ class R600_TEX <bits<11> inst, string opName, list<dag> pattern,
 def TEX_SHADOW : PatLeaf<
   (imm),
   [{uint32_t TType = (uint32_t)N->getZExtValue();
-    return (TType >= 6 && TType <= 8) || TType == 13;
+    return (TType >= 6 && TType <= 8) || (TType >= 11 && TType <= 13);
   }]
 >;