diff options
author | Marek Olšák <[email protected]> | 2020-01-07 18:16:59 -0500 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2020-01-13 15:57:07 -0500 |
commit | 312e04689a9d8d4f9c319e69c61220e10653cfcd (patch) | |
tree | 42ccc991fccaa0d820a67e6d59ad9035acd608b0 /src/gallium/drivers/radeonsi/si_state_shaders.c | |
parent | c278c73f135e3b6c89253ffe34ad18147097e9d0 (diff) |
radeonsi: don't allow draw calls with uninitialized VS inputs
These always hang, because vertex buffer descriptors are not set up.
Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_state_shaders.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state_shaders.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c index 151085b781a..18015bbec48 100644 --- a/src/gallium/drivers/radeonsi/si_state_shaders.c +++ b/src/gallium/drivers/radeonsi/si_state_shaders.c @@ -2714,6 +2714,10 @@ static void *si_create_shader_selector(struct pipe_context *ctx, (sel->so.output[i].stream * 4); } + sel->num_vs_inputs = sel->type == PIPE_SHADER_VERTEX && + !sel->info.properties[TGSI_PROPERTY_VS_BLIT_SGPRS_AMD] ? + sel->info.num_inputs : 0; + /* The prolog is a no-op if there are no inputs. */ sel->vs_needs_prolog = sel->type == PIPE_SHADER_VERTEX && sel->info.num_inputs && |