vk: Add anv_format reference t anv_surface_view
Change type of anv_surface_view::format from VkFormat to const struct anv_format*. This reduces the number of lookups in the VkFormat -> anv_format table.
This commit is contained in:
@@ -506,9 +506,6 @@ cmd_buffer_emit_binding_table(struct anv_cmd_buffer *cmd_buffer,
|
||||
if (!view)
|
||||
continue;
|
||||
|
||||
const struct anv_format *format =
|
||||
anv_format_for_vk_format(view->format);
|
||||
|
||||
struct anv_state state =
|
||||
anv_cmd_buffer_alloc_surface_state(cmd_buffer, 64, 64);
|
||||
|
||||
@@ -521,7 +518,7 @@ cmd_buffer_emit_binding_table(struct anv_cmd_buffer *cmd_buffer,
|
||||
d->dynamic_offsets[surface_slots[b].dynamic_slot];
|
||||
|
||||
offset = view->offset + dynamic_offset;
|
||||
anv_fill_buffer_surface_state(state.map, format, offset,
|
||||
anv_fill_buffer_surface_state(state.map, view->format, offset,
|
||||
view->range - dynamic_offset);
|
||||
} else {
|
||||
offset = view->offset;
|
||||
|
Reference in New Issue
Block a user