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:
Chad Versace
2015-08-17 13:26:28 -07:00
parent c11094ec9a
commit 60c4ac57f2
5 changed files with 10 additions and 19 deletions

View File

@@ -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;