From f3257d80b0e3885607afda642d326e47db48ed62 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michel=20D=C3=A4nzer?= Date: Tue, 25 Sep 2012 12:40:49 +0200 Subject: [PATCH] radeon/llvm: Add intrinsic for reading SI FRONT_FACE VGPR in the pixel shader. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Michel Dänzer Reviewed-by: Tom Stellard --- src/gallium/drivers/radeon/SIInstructions.td | 5 +++++ src/gallium/drivers/radeon/SIIntrinsics.td | 1 + 2 files changed, 6 insertions(+) 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]>; } -- 2.30.2