diff options
author | Andre Maasikas <amaasikas@gmail.com> | 2010-04-26 12:36:39 +0300 |
---|---|---|
committer | Tom Fogal <tfogal@alumni.unh.edu> | 2010-08-03 12:03:57 -0600 |
commit | 43f332e6fc51126f9ae1daa472318b414a64c29e (patch) | |
tree | be92cd9a916725809ff4ea0c6759ab68fcccc142 | |
parent | 12df872f8c38e5a0d69b27fe3f0b94446d76299a (diff) |
r600: adjust point sprites after 911fa4a4a1
there's no more vp results for point coords so we cannot iterate
over vp outputs. Use only Point.CoordReplace[i]
(cherry picked from commit 04a148629f565f556d0b6e7465f8a19921eed7af)
-rw-r--r-- | src/mesa/drivers/dri/r600/r700_fragprog.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/mesa/drivers/dri/r600/r700_fragprog.c b/src/mesa/drivers/dri/r600/r700_fragprog.c index 84d51e66069..ee4d2828cff 100644 --- a/src/mesa/drivers/dri/r600/r700_fragprog.c +++ b/src/mesa/drivers/dri/r600/r700_fragprog.c @@ -560,21 +560,22 @@ GLboolean r700SetupFragmentProgram(GLcontext * ctx) CLEARbit(r700->SPI_PS_IN_CONTROL_1.u32All, FRONT_FACE_ENA_bit); } - /* see if we need any point_sprite replacements */ - for (i = VERT_RESULT_TEX0; i<= VERT_RESULT_TEX7; i++) + /* see if we need any point_sprite replacements, also increase num_interp + * as there's no vp output for them */ + for (i = FRAG_ATTRIB_TEX0; i<= FRAG_ATTRIB_TEX7; i++) { - if(ctx->Point.CoordReplace[i - VERT_RESULT_TEX0] == GL_TRUE) + if(ctx->Point.CoordReplace[i - FRAG_ATTRIB_TEX0] == GL_TRUE) { + ui++; point_sprite = GL_TRUE; + } } + if( mesa_fp->Base.InputsRead & (1 << FRAG_ATTRIB_PNTC)) + ui++; + if ((mesa_fp->Base.InputsRead & (1 << FRAG_ATTRIB_PNTC)) || point_sprite) { - /* for FRAG_ATTRIB_PNTC we need to increase num_interp */ - if(mesa_fp->Base.InputsRead & (1 << FRAG_ATTRIB_PNTC)) - { - ui++; - SETfield(r700->SPI_PS_IN_CONTROL_0.u32All, ui, NUM_INTERP_shift, NUM_INTERP_mask); - } + SETfield(r700->SPI_PS_IN_CONTROL_0.u32All, ui, NUM_INTERP_shift, NUM_INTERP_mask); SETbit(r700->SPI_INTERP_CONTROL_0.u32All, PNT_SPRITE_ENA_bit); SETfield(r700->SPI_INTERP_CONTROL_0.u32All, SPI_PNT_SPRITE_SEL_S, PNT_SPRITE_OVRD_X_shift, PNT_SPRITE_OVRD_X_mask); SETfield(r700->SPI_INTERP_CONTROL_0.u32All, SPI_PNT_SPRITE_SEL_T, PNT_SPRITE_OVRD_Y_shift, PNT_SPRITE_OVRD_Y_mask); @@ -669,7 +670,7 @@ GLboolean r700SetupFragmentProgram(GLcontext * ctx) for(i=0; i<8; i++) { unBit = 1 << (VERT_RESULT_TEX0 + i); - if(OutputsWritten & unBit) + if((OutputsWritten & unBit) || (ctx->Point.CoordReplace[i] == GL_TRUE)) { ui = pAsm->uiFP_AttributeMap[FRAG_ATTRIB_TEX0 + i]; SETbit(r700->SPI_PS_INPUT_CNTL[ui].u32All, SEL_CENTROID_bit); |