mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 22:10:10 +01:00
anv: fix crash when application does not provide push constants
Found while running Talos Principle. As far as I can tell running a draw call with a pipeline having push constants without the application having called vkCmdPushConstants gives undefined push constant values. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Cc: mesa-stable@lists.freedesktop.org
This commit is contained in:
parent
e68d7bec67
commit
80dc78407d
1 changed files with 1 additions and 1 deletions
|
|
@ -797,7 +797,7 @@ anv_cmd_buffer_push_constants(struct anv_cmd_buffer *cmd_buffer,
|
|||
pipeline->shaders[stage]->prog_data;
|
||||
|
||||
/* If we don't actually have any push constants, bail. */
|
||||
if (prog_data == NULL || prog_data->nr_params == 0)
|
||||
if (prog_data == NULL || prog_data->nr_params == 0 || data == NULL)
|
||||
return (struct anv_state) { .offset = 0 };
|
||||
|
||||
struct anv_state state =
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue