summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2012-09-25 12:40:49 +0200
committerMichel Dänzer <[email protected]>2012-10-26 15:51:17 +0200
commitf3257d80b0e3885607afda642d326e47db48ed62 (patch)
treefc6755aed06829757a6e62f86b5bf10a8418d8d1 /src/gallium/drivers
parentbd274eb8f4bcc6aeb561d60ffac89dbe8e504d9f (diff)
radeon/llvm: Add intrinsic for reading SI FRONT_FACE VGPR in the pixel shader.
Signed-off-by: Michel Dänzer <[email protected]> Reviewed-by: Tom Stellard <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/radeon/SIInstructions.td5
-rw-r--r--src/gallium/drivers/radeon/SIIntrinsics.td1
2 files changed, 6 insertions, 0 deletions
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
@@ -1132,6 +1132,11 @@ def : Pat <
>;
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]>;
}