From 7cbc5fde1350e5d883b5943965038ee2b7600fc9 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Wed, 25 Mar 2020 00:29:31 -0500 Subject: [PATCH] anv: Assert surface states are valid Reviewed-by: Rafael Antognolli Part-of: --- src/intel/vulkan/genX_cmd_buffer.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c index ea5696bfd84..02513dae1df 100644 --- a/src/intel/vulkan/genX_cmd_buffer.c +++ b/src/intel/vulkan/genX_cmd_buffer.c @@ -2549,6 +2549,7 @@ emit_binding_table(struct anv_cmd_buffer *cmd_buffer, surface_state = cmd_buffer->state.null_surface_state; } + assert(surface_state.map); bt_map[s] = surface_state.offset + state_offset; break; @@ -2568,6 +2569,7 @@ emit_binding_table(struct anv_cmd_buffer *cmd_buffer, surface_state, format, constant_data, constant_data_size, 1); + assert(surface_state.map); bt_map[s] = surface_state.offset + state_offset; add_surface_reloc(cmd_buffer, surface_state, constant_data); break; @@ -2586,6 +2588,8 @@ emit_binding_table(struct anv_cmd_buffer *cmd_buffer, format, cmd_buffer->state.compute.num_workgroups, 12, 1); + + assert(surface_state.map); bt_map[s] = surface_state.offset + state_offset; if (need_client_mem_relocs) { add_surface_reloc(cmd_buffer, surface_state, @@ -2727,6 +2731,7 @@ emit_binding_table(struct anv_cmd_buffer *cmd_buffer, assert(!"Invalid descriptor type"); continue; } + assert(surface_state.map); bt_map[s] = surface_state.offset + state_offset; break; } -- 2.30.2