anv: Assert surface states are valid

Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4393>
This commit is contained in:
Jason Ekstrand
2020-03-25 00:29:31 -05:00
committed by Marge Bot
parent eaa8f043cd
commit 7cbc5fde13
+5
View File
@@ -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;
}