radv: allow null descriptor set layouts in pipeline layouts
This is allowed by the Vulkan spec when GPL is used. Fixes dEQP-VK.pipeline.pipeline_library.graphics_library.misc.other.null_descriptor_set_in_monolithic_pipeline Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18313>
This commit is contained in:
committed by
Marge Bot
parent
ca33c319e5
commit
4406905600
@@ -5081,16 +5081,8 @@ radv_CmdBindDescriptorSets(VkCommandBuffer commandBuffer, VkPipelineBindPoint pi
|
||||
unsigned set_idx = i + firstSet;
|
||||
RADV_FROM_HANDLE(radv_descriptor_set, set, pDescriptorSets[i]);
|
||||
|
||||
if (!set) {
|
||||
/* From the Vulkan spec 1.3.211:
|
||||
*
|
||||
* "VUID-vkCmdBindDescriptorSets-layout-06564
|
||||
* If layout was not created with VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT, each
|
||||
* element of pDescriptorSets must be a valid VkDescriptorSet"
|
||||
*/
|
||||
assert(layout->independent_sets);
|
||||
if (!set)
|
||||
continue;
|
||||
}
|
||||
|
||||
/* If the set is already bound we only need to update the
|
||||
* (potentially changed) dynamic offsets. */
|
||||
|
||||
@@ -564,14 +564,8 @@ radv_CreatePipelineLayout(VkDevice _device, const VkPipelineLayoutCreateInfo *pC
|
||||
for (uint32_t set = 0; set < pCreateInfo->setLayoutCount; set++) {
|
||||
RADV_FROM_HANDLE(radv_descriptor_set_layout, set_layout, pCreateInfo->pSetLayouts[set]);
|
||||
|
||||
/* From the Vulkan spec 1.3.211:
|
||||
*
|
||||
* "VUID-VkPipelineLayoutCreateInfo-flags-06562
|
||||
* If flags: does not include VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT, elements of
|
||||
* pSetLayouts must be valid VkDescriptorSetLayout objects"
|
||||
*/
|
||||
if (set_layout == NULL) {
|
||||
assert(layout->independent_sets);
|
||||
layout->set[set].layout = NULL;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user