summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_cmd_buffer.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-06-15 14:30:33 -0700
committerJason Ekstrand <[email protected]>2016-06-20 12:03:02 -0700
commitb65f2e4163c9180e6a022c0afec018b08e4c5aa5 (patch)
treefb81036d91a8c717c943a0f30a05908fe8b81053 /src/intel/vulkan/anv_cmd_buffer.c
parente6c2fe451962e364f30f689dc48c34e2b6161b25 (diff)
anv/cmd_buffer: Don't crash if push constants are provided for missing stages
Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "12.0" <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_cmd_buffer.c')
-rw-r--r--src/intel/vulkan/anv_cmd_buffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/intel/vulkan/anv_cmd_buffer.c b/src/intel/vulkan/anv_cmd_buffer.c
index 5be5f3e5ee3..24c18fec4ec 100644
--- a/src/intel/vulkan/anv_cmd_buffer.c
+++ b/src/intel/vulkan/anv_cmd_buffer.c
@@ -1038,7 +1038,7 @@ anv_cmd_buffer_push_constants(struct anv_cmd_buffer *cmd_buffer,
cmd_buffer->state.pipeline->prog_data[stage];
/* If we don't actually have any push constants, bail. */
- if (data == NULL || prog_data->nr_params == 0)
+ if (data == NULL || prog_data == NULL || prog_data->nr_params == 0)
return (struct anv_state) { .offset = 0 };
struct anv_state state =