diff options
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_state_shaders.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state_shaders.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c index 8193fe041dd..6020bec9c0f 100644 --- a/src/gallium/drivers/radeonsi/si_state_shaders.c +++ b/src/gallium/drivers/radeonsi/si_state_shaders.c @@ -2032,8 +2032,12 @@ static void *si_create_shader_selector(struct pipe_context *ctx, unsigned index = sel->info.input_semantic_index[i]; switch (name) { - case TGSI_SEMANTIC_CLIPDIST: case TGSI_SEMANTIC_GENERIC: + /* don't process indices the function can't handle */ + if (index >= SI_MAX_IO_GENERIC) + break; + /* fall through */ + case TGSI_SEMANTIC_CLIPDIST: sel->inputs_read |= 1llu << si_shader_io_get_unique_index(name, index); break; |