anv: Flatten descriptor bindings in anv_nir_apply_pipeline_layout

This lets us stop tracking the pipeline layout.  It also means less
indirection on a very hot path.  As an extra bonus, we can make some of
our data structures smaller.  No measurable CPU overhead improvement.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
This commit is contained in:
Jason Ekstrand
2019-10-31 14:09:39 -05:00
parent fa120cb31c
commit 0709c0f6b4
6 changed files with 54 additions and 76 deletions

View File

@@ -614,14 +614,6 @@ anv_cmd_buffer_bind_descriptor_set(struct anv_cmd_buffer *cmd_buffer,
cmd_buffer->state.descriptors_dirty |=
set_layout->shader_stages & VK_SHADER_STAGE_ALL_GRAPHICS;
}
/* Pipeline layout objects are required to live at least while any command
* buffers that use them are in recording state. We need to grab a reference
* to the pipeline layout being bound here so we can compute correct dynamic
* offsets for VK_DESCRIPTOR_TYPE_*_DYNAMIC in dynamic_offset_for_binding()
* when we record draw commands that come after this.
*/
pipe_state->layout = layout;
}
void anv_CmdBindDescriptorSets(