anv: remove multiple push descriptors

VUID-VkPipelineLayoutCreateInfo-pSetLayouts-00293

   pSetLayouts must not contain more than one descriptor set layout
   that was created with
   VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR set

There is only one push descriptor set with all the descriptor sets, so
no need to have an array.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19050>
This commit is contained in:
Lionel Landwerlin
2022-10-02 19:17:14 +03:00
committed by Marge Bot
parent 803f438d85
commit 06d955ab21
2 changed files with 6 additions and 8 deletions

View File

@@ -57,12 +57,10 @@ static void
anv_cmd_pipeline_state_finish(struct anv_cmd_buffer *cmd_buffer,
struct anv_cmd_pipeline_state *pipe_state)
{
for (uint32_t i = 0; i < ARRAY_SIZE(pipe_state->push_descriptors); i++) {
if (pipe_state->push_descriptors[i]) {
if (pipe_state->push_descriptor) {
anv_descriptor_set_layout_unref(cmd_buffer->device,
pipe_state->push_descriptors[i]->set.layout);
vk_free(&cmd_buffer->vk.pool->alloc, pipe_state->push_descriptors[i]);
}
pipe_state->push_descriptor->set.layout);
vk_free(&cmd_buffer->vk.pool->alloc, pipe_state->push_descriptor);
}
}
@@ -877,7 +875,7 @@ anv_cmd_buffer_push_descriptor_set(struct anv_cmd_buffer *cmd_buffer,
}
struct anv_push_descriptor_set **push_set =
&pipe_state->push_descriptors[_set];
&pipe_state->push_descriptor;
if (*push_set == NULL) {
*push_set = vk_zalloc(&cmd_buffer->vk.pool->alloc,

View File

@@ -2433,7 +2433,7 @@ anv_gfx8_9_vb_cache_range_needs_workaround(struct anv_vb_cache_range *bound,
*/
struct anv_cmd_pipeline_state {
struct anv_descriptor_set *descriptors[MAX_SETS];
struct anv_push_descriptor_set *push_descriptors[MAX_SETS];
struct anv_push_descriptor_set *push_descriptor;
struct anv_push_constants push_constants;