anv: handle null push descriptors in deferred optimization

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: b49b18f0 ("anv: reduce BT emissions & surface state writes with push descriptors")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20410>
This commit is contained in:
Lionel Landwerlin 2022-12-21 22:39:29 +02:00 committed by Marge Bot
parent c52b7aa732
commit 739a08ad23

View file

@ -2362,9 +2362,11 @@ flush_push_descriptor_set(struct anv_cmd_buffer *cmd_buffer,
struct anv_descriptor *desc = &set->descriptors[desc_idx];
struct anv_buffer_view *bview = desc->set_buffer_view;
bview->surface_state = anv_cmd_buffer_alloc_surface_state(cmd_buffer);
anv_descriptor_write_surface_state(cmd_buffer->device, desc,
bview->surface_state);
if (bview != NULL) {
bview->surface_state = anv_cmd_buffer_alloc_surface_state(cmd_buffer);
anv_descriptor_write_surface_state(cmd_buffer->device, desc,
bview->surface_state);
}
}
}