diff options
author | Lionel Landwerlin <lionel.g.landwerlin@intel.com> | 2023-10-30 17:57:32 +0200 |
---|---|---|
committer | Eric Engestrom <eric@engestrom.ch> | 2023-10-31 14:33:13 +0000 |
commit | d282666f96abf36f81443ed170799f8890b96c63 (patch) | |
tree | 5d781dc85de61f93d3b1b88b5824d03833aacf28 | |
parent | 7b81db9f37f6842436ce25045bbec9c858df353d (diff) |
anv: fix corner case of mutable descriptor pool creation
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 63e91148b7 ("anv: Enable VK_VALVE_mutable_descriptor_type")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10065
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25958>
(cherry picked from commit cdca0b2ce4d603d4f5914d7a1e37923a6a959541)
-rw-r--r-- | .pick_status.json | 2 | ||||
-rw-r--r-- | src/intel/vulkan/anv_descriptor_set.c | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/.pick_status.json b/.pick_status.json index 025a230228a..5d1da6d1c4b 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -304,7 +304,7 @@ "description": "anv: fix corner case of mutable descriptor pool creation", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "63e91148b7fe777b6ad7bfdb6b02d167c151dd55", "notes": null diff --git a/src/intel/vulkan/anv_descriptor_set.c b/src/intel/vulkan/anv_descriptor_set.c index 0d335b806f3..123894dfa43 100644 --- a/src/intel/vulkan/anv_descriptor_set.c +++ b/src/intel/vulkan/anv_descriptor_set.c @@ -280,7 +280,9 @@ anv_descriptor_size_for_mutable_type(const struct anv_physical_device *device, { unsigned size = 0; - if (!mutable_info || mutable_info->mutableDescriptorTypeListCount == 0) { + if (!mutable_info || + mutable_info->mutableDescriptorTypeListCount == 0 || + binding >= mutable_info->mutableDescriptorTypeListCount) { for(VkDescriptorType i = 0; i <= VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT; i++) { if (i == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC || |