anv: don't use pipeline layout at descriptor bind

An application is allowed to bind an empty descriptor set in a place
where a pipeline layout has no descriptor set layout. For example :

  pipeline_layout_A :
     set0 : NULL
     set1 : descriptor_set_layout_A

  vkCmdBindDescriptor :
     set0 : descriptor_set_B (with layout bindingCount=0)
     set1 : descriptor_set_C (compatible with descriptor_set_layout_A)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13227
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35125>
(cherry picked from commit 39f55541a3)
This commit is contained in:
Lionel Landwerlin 2025-05-23 09:08:54 +03:00 committed by Eric Engestrom
parent 7e4f9ab45d
commit bb12110359
2 changed files with 2 additions and 3 deletions

View file

@ -4894,7 +4894,7 @@
"description": "anv: don't use pipeline layout at descriptor bind",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -786,8 +786,7 @@ anv_cmd_buffer_bind_descriptor_set(struct anv_cmd_buffer *cmd_buffer,
*/
assert(!set->pool || !set->pool->host_only);
struct anv_descriptor_set_layout *set_layout =
layout ? layout->set[set_index].layout: set->layout;
struct anv_descriptor_set_layout *set_layout = set->layout;
anv_cmd_buffer_maybe_dirty_descriptor_mode(
cmd_buffer,