r600g: fixup sprite coord enable.
authorDave Airlie <airlied@redhat.com>
Fri, 24 Sep 2010 06:36:16 +0000 (16:36 +1000)
committerDave Airlie <airlied@redhat.com>
Fri, 24 Sep 2010 06:36:54 +0000 (16:36 +1000)
this fixes piglit glsl-fs-pointcoord

src/gallium/drivers/r600/r600_hw_states.c

index 9cbf12008b78f619bba88a806bc59931662c6a36..892666b00b684582ad3be731a403a130db3ffcc0 100644 (file)
@@ -1019,7 +1019,8 @@ static int r600_ps_shader(struct r600_context *rctx, struct r600_context_state *
                if (rshader->input[i].name == TGSI_SEMANTIC_FACE)
                        have_face = TRUE;
 
-               if (rasterizer->sprite_coord_enable & (1 << i)) {
+               if (rshader->input[i].name == TGSI_SEMANTIC_GENERIC &&
+                   rasterizer->sprite_coord_enable & (1 << rshader->input[i].sid)) {
                        tmp |= S_028644_PT_SPRITE_TEX(1);
                }
                state->states[R600_PS_SHADER__SPI_PS_INPUT_CNTL_0 + i] = tmp;