From 1deb2be2b7887d7435e103fdb042857e745ff08d Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Mon, 14 May 2012 16:26:19 +0200 Subject: radeonsi: Flesh out shader interpolation related code. Handle perspective interpolation and ceontroid vs. center. --- src/gallium/drivers/radeon/SIInstructions.td | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/gallium/drivers/radeon/SIInstructions.td') diff --git a/src/gallium/drivers/radeon/SIInstructions.td b/src/gallium/drivers/radeon/SIInstructions.td index 57bbc7a5d5a..313728f044f 100644 --- a/src/gallium/drivers/radeon/SIInstructions.td +++ b/src/gallium/drivers/radeon/SIInstructions.td @@ -934,6 +934,24 @@ def : Pat < imm:$attr, SReg_32:$params) >; +def : Pat < + (int_SI_fs_interp_linear_centroid imm:$attr_chan, imm:$attr, SReg_32:$params), + (SI_INTERP (f32 LINEAR_CENTROID_I), (f32 LINEAR_CENTROID_J), imm:$attr_chan, + imm:$attr, SReg_32:$params) +>; + +def : Pat < + (int_SI_fs_interp_persp_center imm:$attr_chan, imm:$attr, SReg_32:$params), + (SI_INTERP (f32 PERSP_CENTER_I), (f32 PERSP_CENTER_J), imm:$attr_chan, + imm:$attr, SReg_32:$params) +>; + +def : Pat < + (int_SI_fs_interp_persp_centroid imm:$attr_chan, imm:$attr, SReg_32:$params), + (SI_INTERP (f32 PERSP_CENTROID_I), (f32 PERSP_CENTROID_J), imm:$attr_chan, + imm:$attr, SReg_32:$params) +>; + /********** ================== **********/ /********** Intrinsic Patterns **********/ /********** ================== **********/ -- cgit v1.2.3