From 4592b39498d37aa17bc17803c2c997daa82add00 Mon Sep 17 00:00:00 2001 From: Vadim Girlin Date: Wed, 2 Nov 2011 08:46:09 +0400 Subject: [PATCH] r600g: take into account PSIZE output for spi mapping Skip PSIZE and POSITION when counting VS outputs. Tested without regressions on evergreen. Signed-off-by: Vadim Girlin --- src/gallium/drivers/r600/r600_shader.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c index e193996..350ba3c 100644 --- a/src/gallium/drivers/r600/r600_shader.c +++ b/src/gallium/drivers/r600/r600_shader.c @@ -62,12 +62,15 @@ int r600_find_vs_semantic_index(struct r600_shader *vs, struct r600_shader *ps, int id) { struct r600_shader_io *input = &ps->input[id]; + int index = 0; for (int i = 0; i < vs->noutput; i++) { if (input->name == vs->output[i].name && - input->sid == vs->output[i].sid) { - return i - 1; - } + input->sid == vs->output[i].sid) + return index; + else if (vs->output[i].name != TGSI_SEMANTIC_POSITION && + vs->output[i].name != TGSI_SEMANTIC_PSIZE) + index++; } return 0; } -- 1.7.7