mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 23:30:10 +01:00
tu: Fix indexing with variable descriptor count
Based on RADV.
The Vulkan spec says:
"If bindingCount is zero or if this structure is not included in
the pNext chain, the VkDescriptorBindingFlags for each descriptor
set layout binding is considered to be zero. Otherwise, the
descriptor set layout binding at
VkDescriptorSetLayoutCreateInfo::pBindings[i] uses the flags in
pBindingFlags[i]."
Fixes dEQP-VK.api.maintenance3_check.* in VKCTS 1.4.4.0.
Cc: mesa-stable
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
(cherry picked from commit 17e25b4983)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38167>
This commit is contained in:
parent
fe3a3b08c9
commit
2c1c52a8c8
2 changed files with 5 additions and 5 deletions
|
|
@ -1044,7 +1044,7 @@
|
|||
"description": "tu: Fix indexing with variable descriptor count",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -208,8 +208,8 @@ tu_CreateDescriptorSetLayout(
|
|||
if (binding->descriptorType == VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK)
|
||||
set_layout->has_inline_uniforms = true;
|
||||
|
||||
if (variable_flags && binding->binding < variable_flags->bindingCount &&
|
||||
(variable_flags->pBindingFlags[binding->binding] &
|
||||
if (variable_flags && j < variable_flags->bindingCount &&
|
||||
(variable_flags->pBindingFlags[j] &
|
||||
VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT)) {
|
||||
assert(!binding->pImmutableSamplers); /* Terribly ill defined how
|
||||
many samplers are valid */
|
||||
|
|
@ -388,9 +388,9 @@ tu_GetDescriptorSetLayoutSupport(
|
|||
supported = false;
|
||||
}
|
||||
|
||||
if (variable_flags && binding->binding < variable_flags->bindingCount &&
|
||||
if (variable_flags && i < variable_flags->bindingCount &&
|
||||
variable_count &&
|
||||
(variable_flags->pBindingFlags[binding->binding] &
|
||||
(variable_flags->pBindingFlags[i] &
|
||||
VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT)) {
|
||||
variable_count->maxVariableDescriptorCount =
|
||||
MIN2(UINT32_MAX, max_count);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue