anv: simplify dynamic buffer count in pipeline layout

anv_descriptor_set_layout already has the information we're gather
here.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17601>
This commit is contained in:
Lionel Landwerlin 2022-03-23 17:05:15 +02:00 committed by Marge Bot
parent 5b561b501a
commit c806d1e5ed
1 changed files with 1 additions and 6 deletions

View File

@ -800,12 +800,7 @@ VkResult anv_CreatePipelineLayout(
anv_descriptor_set_layout_ref(set_layout);
layout->set[set].dynamic_offset_start = dynamic_offset_count;
for (uint32_t b = 0; b < set_layout->binding_count; b++) {
if (set_layout->binding[b].dynamic_offset_index < 0)
continue;
dynamic_offset_count += set_layout->binding[b].array_size;
}
dynamic_offset_count += set_layout->dynamic_offset_count;
}
assert(dynamic_offset_count < MAX_DYNAMIC_BUFFERS);