r600: fix SPI inputs setup on r600/r700
authorVadim Girlin <vadimgirlin@gmail.com>
Tue, 14 Jun 2011 17:11:04 +0000 (21:11 +0400)
committerDave Airlie <airlied@redhat.com>
Thu, 16 Jun 2011 05:23:06 +0000 (15:23 +1000)
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/gallium/drivers/r600/r600_state_common.c

index fa0c5cb89d79873d2606adb407a86c860ef4ea3a..5f9f398bf25ecaf26944b5100ad7c38e893c9af3 100644 (file)
@@ -351,7 +351,7 @@ static void r600_spi_update(struct r600_pipe_context *rctx)
        struct r600_pipe_shader *shader = rctx->ps_shader;
        struct r600_pipe_state *rstate = &rctx->spi;
        struct r600_shader *rshader = &shader->shader;
-       unsigned i, tmp;
+       unsigned i, tmp, sid;
 
        if (rctx->spi.id == 0)
                r600_spi_block_init(rctx, &rctx->spi);
@@ -360,9 +360,14 @@ static void r600_spi_update(struct r600_pipe_context *rctx)
        for (i = 0; i < rshader->ninput; i++) {
                if (rshader->input[i].name == TGSI_SEMANTIC_POSITION ||
                    rshader->input[i].name == TGSI_SEMANTIC_FACE)
-                       continue;
-
-               tmp = S_028644_SEMANTIC(r600_find_vs_semantic_index(&rctx->vs_shader->shader, rshader, i));
+                       if (rctx->family >= CHIP_CEDAR)
+                               continue;
+                       else
+                               sid=0;
+               else
+                       sid=r600_find_vs_semantic_index(&rctx->vs_shader->shader, rshader, i);
+
+               tmp = S_028644_SEMANTIC(sid);
 
                if (rshader->input[i].name == TGSI_SEMANTIC_COLOR ||
                    rshader->input[i].name == TGSI_SEMANTIC_BCOLOR ||