Skip to content

layers: Validate 06616/06617 with independent sets - #13208

Merged
spencer-lunarg merged 1 commit into
KhronosGroup:mainfrom
apollo-2006:vl-06617-independent-sets
Sep 24, 2026
Merged

spencer-lunarg merged 1 commit into
KhronosGroup:mainfrom
apollo-2006:vl-06617-independent-sets

Conversation

@apollo-2006

@apollo-2006 apollo-2006 commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

With VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT, the pre-rasterization and fragment shader libraries may leave a set VK_NULL_HANDLE on one side, but set layouts that are non-null in both must still be identically defined (VUID-VkGraphicsPipelineCreateInfo-pLibraries-06617 / flags-06616). The comparison only ran without independent sets, so this was never reported.

This runs the same comparison for independent sets and reports 06617/06616. The 06612/06613 message is unchanged apart from a missing . in pSetLayouts[i].pBindings[j]. The message header is only chosen when an error is reported.

Test changes: NegativeGpuAVDescriptorClassGeneralBuffer.GPLIndependentSetsUnusedSets linked a storage buffer set against an unused sampler set at index 1, which lavapipe asserts on in merge_layouts. Its unused set is now VK_NULL_HANDLE, which is what the test intended. Adds NegativeGraphicsLibrary.IndependentSetsDifferentSetLayout (06617, linking both libraries) and NegativeGraphicsLibrary.IndependentSetsDifferentSetLayoutFlags (06616, the fragment shader library links the pre-raster one while it is created).

Found by running the test suite on lavapipe.

New message:

vkCreateGraphicsPipelines(): pCreateInfos[0] the graphics pipeline libraries have differently defined VkPipelineLayout at the same pSetLayouts index (with VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT one of them may be VK_NULL_HANDLE, but two non-null set layouts must be identically defined):
|Pre-Raster State| VkPipelineLayout 0x130000000013 at pSetLayouts[1].pBindings[0] of:
	binding: 0
	descriptorType: VK_DESCRIPTOR_TYPE_STORAGE_BUFFER
	descriptorCount: 1
	stageFlags: VK_SHADER_STAGE_VERTEX_BIT
	pImmutableSamplers: (nil)
|Fragment Shader State| VkPipelineLayout 0x140000000014 at pSetLayouts[1].pBindings[0] of:
	binding: 0
	descriptorType: VK_DESCRIPTOR_TYPE_SAMPLER
	descriptorCount: 1
	stageFlags: VK_SHADER_STAGE_FRAGMENT_BIT
	pImmutableSamplers: (nil)

Tested: full suite with the mock ICD and max_profile.json, no failures. All graphics pipeline library tests on lavapipe and RADV (RX 9070 XT), apart from PositiveGraphicsLibrary.DescriptorHeapPushConstantStages, which segfaults on RADV on main as well.

@apollo-2006
apollo-2006 requested a review from a team as a code owner September 23, 2026 16:28
@ci-tester-lunarg

Copy link
Copy Markdown
Collaborator

Author apollo-2006 not on autobuild list. Waiting for curator authorization before starting CI build.

@apollo-2006
apollo-2006 force-pushed the vl-06617-independent-sets branch from 36ed45c to 89c3175 Compare September 23, 2026 16:38
@ci-tester-lunarg

Copy link
Copy Markdown
Collaborator

Author apollo-2006 not on autobuild list. Waiting for curator authorization before starting CI build.

link_info.libraryCount = size32(libraries);
link_info.pLibraries = libraries;

m_errorMonitor->SetDesiredError("VUID-VkGraphicsPipelineCreateInfo-pLibraries-06617");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add a test for 06616 as well

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added IndependentSetsDifferentSetLayoutFlags, which creates the fragment shader library while linking the pre-raster one.

: "VUID-VkGraphicsPipelineCreateInfo-flags-06612")
: (only_libs ? "VUID-VkGraphicsPipelineCreateInfo-pLibraries-06617"
: "VUID-VkGraphicsPipelineCreateInfo-flags-06616");
const char* header_str =

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I rather not allocate this string every pipeline creation and defer this to only when things actually fail (the worse case)

@apollo-2006 apollo-2006 Sep 23, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was a pointer to a string literal, but it's now a lambda that only runs when an error is reported (better this way, I think)

@apollo-2006
apollo-2006 force-pushed the vl-06617-independent-sets branch from 89c3175 to 815ea4a Compare September 23, 2026 18:13
@ci-tester-lunarg

Copy link
Copy Markdown
Collaborator

Author apollo-2006 not on autobuild list. Waiting for curator authorization before starting CI build.


vkt::Buffer uniform_texel_buffer(*m_device, 16, VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT, kHostVisibleMemProps);
vkt::BufferView uniform_buffer_view(*m_device, uniform_texel_buffer, VK_FORMAT_R32_SFLOAT);
vkt::Sampler sampler(*m_device, SafeSaneSamplerCreateInfo());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so GPLIndependentSetsUnusedSets runs on the latest Lavapipe with latest validation with no issue, what was the original test that was failing for Lavapipe?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, I should have said: it's a debug-build assert. merge_layouts compares the set layouts inside #ifndef NDEBUG (lvp_pipeline.c:866), so release lavapipe passes and my debugoptimized build aborted with merge_layouts: Assertion ... layouts_equal(...) failed. The two layouts at index 1 do differ, which is what I understood 06617 to cover.

@spencer-lunarg
spencer-lunarg force-pushed the vl-06617-independent-sets branch from 815ea4a to c6bcb88 Compare September 24, 2026 13:34
@ci-tester-lunarg

Copy link
Copy Markdown
Collaborator

Author apollo-2006 not on autobuild list. Waiting for curator authorization before starting CI build.

@ci-tester-lunarg

Copy link
Copy Markdown
Collaborator

CI Vulkan-ValidationLayers build queued with queue ID 131553.

@ci-tester-lunarg

Copy link
Copy Markdown
Collaborator

CI Vulkan-ValidationLayers build # 24635 running.

@ci-tester-lunarg

Copy link
Copy Markdown
Collaborator

CI Vulkan-ValidationLayers build # 24635 passed.

@spencer-lunarg
spencer-lunarg merged commit f902154 into KhronosGroup:main Sep 24, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants