radeon/llvm: Add intrinsic for reading SI FRONT_FACE VGPR in the pixel shader.
authorMichel Dänzer <michel.daenzer@amd.com>
Tue, 25 Sep 2012 10:40:49 +0000 (12:40 +0200)
committerMichel Dänzer <michel@daenzer.net>
Fri, 26 Oct 2012 13:51:17 +0000 (15:51 +0200)
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
src/gallium/drivers/radeon/SIInstructions.td
src/gallium/drivers/radeon/SIIntrinsics.td

index 3dc0954a75de9e836f776c70e6fe32fa8a314f9b..f9bdc63e3e5236f83d92f225af7e517d92e8a2c5 100644 (file)
@@ -1131,6 +1131,11 @@ def : Pat <
              imm:$attr, SReg_32:$params)
 >;
 
+def : Pat <
+  (int_SI_fs_read_face),
+  (f32 FRONT_FACE)
+>;
+
 def : Pat <
   (int_SI_fs_read_pos 0),
   (f32 POS_X_FLOAT)
index f5c3f76fe279d4cae83a6f0f95a4513467593ee0..b3ecba3e2d08c424512d4f7a11478e0b916dc3ee 100644 (file)
@@ -35,5 +35,6 @@ let TargetPrefix = "SI", isTarget = 1 in {
   def int_SI_fs_interp_persp_centroid : Interp;
   def int_SI_fs_interp_constant : Interp;
 
+  def int_SI_fs_read_face : Intrinsic <[llvm_float_ty], [], [IntrNoMem]>;
   def int_SI_fs_read_pos : Intrinsic <[llvm_float_ty], [llvm_i32_ty], [IntrNoMem]>;
 }