Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing swapchain maintenance validation #9107

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ziga-lunarg
Copy link
Contributor

Closes #9099

@ziga-lunarg ziga-lunarg requested a review from a team as a code owner December 28, 2024 21:48
@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build queued with queue ID 333769.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build # 18467 running.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build queued with queue ID 333786.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build # 18468 running.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build # 18468 failed.

@@ -883,7 +885,24 @@ bool CoreChecks::PreCallValidateQueuePresentKHR(VkQueue queue, const VkPresentIn
"image on queue that cannot present to this surface.");
}
}

const auto *present_modes = vku::FindStructInPNextChain<VkSwapchainPresentModesCreateInfoEXT>(swapchain_data->create_info.pNext);
if (present_modes) {
Copy link
Contributor

@spencer-lunarg spencer-lunarg Dec 29, 2024

Choose a reason for hiding this comment

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

Suggested change
if (present_modes) {
if (vku::FindStructInPNextChain<VkSwapchainPresentModesCreateInfoEXT>(swapchain_data->create_info.pNext)) {

@@ -118,6 +118,56 @@ bool StatelessValidation::ValidateSwapchainCreateInfo(const VkSwapchainCreateInf
}
}
}

if (vku::FindStructInPNextChain<VkSwapchainPresentModesCreateInfoEXT>(create_info.pNext) &&
Copy link
Contributor

Choose a reason for hiding this comment

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

make a new function (ValidateSwapchainCreateInfoMaintenance1) for these (to better group them together) and inside you can just go

if (!enabled_features.swapchainMaintenance1) return skip;

once

Copy link
Contributor

@spencer-lunarg spencer-lunarg left a comment

Choose a reason for hiding this comment

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

LGTM with nits

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build queued with queue ID 336756.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build # 18499 running.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build # 18499 failed.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build queued with queue ID 336815.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build # 18502 running.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build # 18502 failed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing VK_EXT_swapchain_maintenance1
3 participants