r600g: skip SPI setup for position and face inputs
authorVadim Girlin <vadimgirlin@gmail.com>
Mon, 13 Jun 2011 01:43:47 +0000 (05:43 +0400)
committerDave Airlie <airlied@redhat.com>
Mon, 13 Jun 2011 23:17:16 +0000 (09:17 +1000)
fixes fdo bug 38145

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/gallium/drivers/r600/r600_shader.c
src/gallium/drivers/r600/r600_state_common.c

index d111caa64493833cd5191a42faeba9d843407c28..1b9f66318e14363bdd4478e43fe3b5521be87b89 100644 (file)
@@ -63,10 +63,6 @@ int r600_find_vs_semantic_index(struct r600_shader *vs,
 {
        struct r600_shader_io *input = &ps->input[id];
 
-       /* position/face doesn't get/need a semantic index */
-       if (input->name == TGSI_SEMANTIC_POSITION || input->name == TGSI_SEMANTIC_FACE)
-               return 0;
-
        for (int i = 0; i < vs->noutput; i++) {
                if (input->name == vs->output[i].name &&
                        input->sid == vs->output[i].sid) {
index d58c1f0656ca79767cd29a9509713b78a664fccf..fa0c5cb89d79873d2606adb407a86c860ef4ea3a 100644 (file)
@@ -358,6 +358,10 @@ static void r600_spi_update(struct r600_pipe_context *rctx)
 
        rstate->nregs = 0;
        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 (rshader->input[i].name == TGSI_SEMANTIC_COLOR ||