aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_state_shaders.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2016-11-13 19:54:13 +0100
committerMarek Olšák <[email protected]>2016-11-21 21:44:35 +0100
commitc7f3e5c647cce64899ed464755ce69a7d2226eca (patch)
tree1839ccd75ae52dfce21b0ab55139faab597fc5f5 /src/gallium/drivers/radeonsi/si_state_shaders.c
parented3190b3f3a776fc8c75b1e6130a88079166d115 (diff)
radeonsi: make si_shader_io_get_unique_index stricter
Tested-by: Edmondo Tommasina <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_state_shaders.c')
-rw-r--r--src/gallium/drivers/radeonsi/si_state_shaders.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c
index 1d116f6b00b..d10084dfe4e 100644
--- a/src/gallium/drivers/radeonsi/si_state_shaders.c
+++ b/src/gallium/drivers/radeonsi/si_state_shaders.c
@@ -1425,9 +1425,18 @@ static void *si_create_shader_selector(struct pipe_context *ctx,
sel->patch_outputs_written |=
1llu << si_shader_io_get_unique_index(name, index);
break;
- default:
+
+ case TGSI_SEMANTIC_GENERIC:
+ /* don't process indices the function can't handle */
+ if (index >= 60)
+ break;
+ /* fall through */
+ case TGSI_SEMANTIC_POSITION:
+ case TGSI_SEMANTIC_PSIZE:
+ case TGSI_SEMANTIC_CLIPDIST:
sel->outputs_written |=
1llu << si_shader_io_get_unique_index(name, index);
+ break;
}
}
sel->esgs_itemsize = util_last_bit64(sel->outputs_written) * 16;