diff options
author | Tom Stellard <[email protected]> | 2012-09-06 16:18:11 -0400 |
---|---|---|
committer | Tom Stellard <[email protected]> | 2012-09-11 14:53:47 -0400 |
commit | 0fb1e68a0ba0dc58e0b97f5bb3f7a46d9b3eae29 (patch) | |
tree | bf10d38d850cd44c688f7534b487e7a4f0fe5f87 /src/gallium/drivers/radeon | |
parent | 0410e9e8c7d3d91b62d970ca2a3f6ae400272c5f (diff) |
radeonsi: Handle position input parameter for pixel shaders v2
v2:
- Don't increment ninterp or set any of the have_* flags for
TGSI_SEMANTIC_POSITION
Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon')
-rw-r--r-- | src/gallium/drivers/radeon/SIInstructions.td | 20 | ||||
-rw-r--r-- | src/gallium/drivers/radeon/SIIntrinsics.td | 2 |
2 files changed, 22 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeon/SIInstructions.td b/src/gallium/drivers/radeon/SIInstructions.td index 8f9de525340..ffc9537ea70 100644 --- a/src/gallium/drivers/radeon/SIInstructions.td +++ b/src/gallium/drivers/radeon/SIInstructions.td @@ -1102,6 +1102,26 @@ def : Pat < imm:$attr, SReg_32:$params) >; +def : Pat < + (int_SI_fs_read_pos 0), + (f32 POS_X_FLOAT) +>; + +def : Pat < + (int_SI_fs_read_pos 1), + (f32 POS_Y_FLOAT) +>; + +def : Pat < + (int_SI_fs_read_pos 2), + (f32 POS_Z_FLOAT) +>; + +def : Pat < + (int_SI_fs_read_pos 3), + (f32 POS_W_FLOAT) +>; + /********** ================== **********/ /********** Intrinsic Patterns **********/ /********** ================== **********/ diff --git a/src/gallium/drivers/radeon/SIIntrinsics.td b/src/gallium/drivers/radeon/SIIntrinsics.td index fbb8dc90fbe..f5c3f76fe27 100644 --- a/src/gallium/drivers/radeon/SIIntrinsics.td +++ b/src/gallium/drivers/radeon/SIIntrinsics.td @@ -34,4 +34,6 @@ let TargetPrefix = "SI", isTarget = 1 in { def int_SI_fs_interp_persp_center : Interp; def int_SI_fs_interp_persp_centroid : Interp; def int_SI_fs_interp_constant : Interp; + + def int_SI_fs_read_pos : Intrinsic <[llvm_float_ty], [llvm_i32_ty], [IntrNoMem]>; } |