summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Girlin <[email protected]>2011-11-02 11:50:59 +0400
committerAlex Deucher <[email protected]>2011-11-02 09:47:10 -0400
commit16c0a3a9720c03c3d5cbfd66e2db63014dfc4f19 (patch)
treea0345c18dab9d521b72ba49baeb809ec4a2b8f2e
parente8f646fa7e9cf6f6793864384128157735aa03b3 (diff)
r600g: take into account PSIZE output for spi mapping
Skip PSIZE and POSITION when counting VS outputs. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=42435 Tested without regressions on evergreen. NOTE: this is a candidate for the 7.11 branch. Signed-off-by: Vadim Girlin <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
-rw-r--r--src/gallium/drivers/r600/r600_shader.c9
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 e1939966216..350ba3cb332 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;
}