Commit 80dc7840 authored by Lionel Landwerlin's avatar Lionel Landwerlin

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: default avatarLionel Landwerlin <>
Reviewed-by: default avatarJason Ekstrand <>
parent e68d7bec
......@@ -797,7 +797,7 @@ anv_cmd_buffer_push_constants(struct anv_cmd_buffer *cmd_buffer,
/* 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 =
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment