From: Michel Dänzer Date: Tue, 25 Sep 2012 10:40:49 +0000 (+0200) Subject: radeon/llvm: Add intrinsic for reading SI FRONT_FACE VGPR in the pixel shader. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f3257d80b0e3885607afda642d326e47db48ed62;p=mesa.git radeon/llvm: Add intrinsic for reading SI FRONT_FACE VGPR in the pixel shader. Signed-off-by: Michel Dänzer Reviewed-by: Tom Stellard --- diff --git a/src/gallium/drivers/radeon/SIInstructions.td b/src/gallium/drivers/radeon/SIInstructions.td index 3dc0954a75d..f9bdc63e3e5 100644 --- a/src/gallium/drivers/radeon/SIInstructions.td +++ b/src/gallium/drivers/radeon/SIInstructions.td @@ -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) diff --git a/src/gallium/drivers/radeon/SIIntrinsics.td b/src/gallium/drivers/radeon/SIIntrinsics.td index f5c3f76fe27..b3ecba3e2d0 100644 --- a/src/gallium/drivers/radeon/SIIntrinsics.td +++ b/src/gallium/drivers/radeon/SIIntrinsics.td @@ -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]>; }