From 9777a9119367e409a33a37d097c5d56d5979907d Mon Sep 17 00:00:00 2001 From: Vadim Girlin Date: Mon, 13 Jun 2011 05:43:47 +0400 Subject: [PATCH] r600g: skip SPI setup for position and face inputs fixes fdo bug 38145 Signed-off-by: Vadim Girlin --- src/gallium/drivers/r600/r600_shader.c | 4 ---- src/gallium/drivers/r600/r600_state_common.c | 2 ++ 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c index 39e6d85..ee4d7b4 100644 --- a/src/gallium/drivers/r600/r600_shader.c +++ b/src/gallium/drivers/r600/r600_shader.c @@ -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) { diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c index 1eb9389..5aae81b 100644 --- a/src/gallium/drivers/r600/r600_state_common.c +++ b/src/gallium/drivers/r600/r600_state_common.c @@ -358,6 +358,8 @@ 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 || -- 1.7.5.2