You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GPU and driver version: NVIDIA GeForce RTX 4090 550.54.14.0
SDK or header version if building from repo: 1.3.283
Options enabled (synchronization, best practices, etc.): defaults
Describe the Issue
Steps to reproduce:
Create a std::vector<uint32_t> queueFamilyIndices holding some indices of queue families
Create a VkSwapchain swapchain with VkSwapchainCreateInfoKHR::pQueueFamilyIndices set to queueFamilyIndices.data()
Call vkCreateImage() with:
A. VkImageCreateInfo::pQueueFamilyIndices also set to queueFamilyIndices.data()
B. VkImageCreateInfo::pNext pointing to a VkImageSwapchainCreateInfoKHR whose swapchain field is set to swapchain
Expected behavior
This alone should not cause a validation error.
Actual behavior
(VUID-VkImageSwapchainCreateInfoKHR-swapchain-00995) Validation Error: [ VUID-VkImageSwapchainCreateInfoKHR-swapchain-00995 ] | MessageID = 0x53c85abf | vkCreateImage(): pCreateInfo->pNext.swapchain was created with pQueueFamilyIndices containing index 0 which is not included in pCreateInfo->pQueueFamilyIndices. The Vulkan spec states: If swapchain is not VK_NULL_HANDLE, the fields of VkImageCreateInfo must match the implied image creation parameters of the swapchain (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkImageSwapchainCreateInfoKHR-swapchain-00995)
Additional context
This is caused by an erroneous check in cc_image.cpp. That code says:
for (uint32_t i = 0; i < pCreateInfo->queueFamilyIndexCount; ++i) {
bool found = false;
for (uint32_t j = 0; j < pCreateInfo->queueFamilyIndexCount; ++j) {
if (i != j && pCreateInfo->pQueueFamilyIndices[j] == swapchain_state->create_info.pQueueFamilyIndices[i]) {
found = true;
break;
}
}
if (!found) {
skip |=
LogError(vuid, device, create_info_loc.pNext(Struct::VkImageSwapchainCreateInfoKHR, Field::swapchain),
"was created with pQueueFamilyIndices containing index %" PRIu32
" which is not included in pCreateInfo->pQueueFamilyIndices.",
i);
}
}
This code is trying to check that every item in pCreateInfo->queueFamilyIndexCount is present in swapchain_state->create_info.pQueueFamilyIndices. However, the error is the i != j check: because this check exists, if a queue family index is listed at the same position in both arrays, it will be erroneously determined to be missing.
I also think the error message is incorrect, because the missing value isn't i itself, but instead swapchain_state->create_info.pQueueFamilyIndices[i].
The text was updated successfully, but these errors were encountered:
Environment:
Describe the Issue
Steps to reproduce:
std::vector<uint32_t> queueFamilyIndices
holding some indices of queue familiesVkSwapchain swapchain
withVkSwapchainCreateInfoKHR::pQueueFamilyIndices
set toqueueFamilyIndices.data()
vkCreateImage()
with:A.
VkImageCreateInfo::pQueueFamilyIndices
also set toqueueFamilyIndices.data()
B.
VkImageCreateInfo::pNext
pointing to aVkImageSwapchainCreateInfoKHR
whoseswapchain
field is set toswapchain
Expected behavior
This alone should not cause a validation error.
Actual behavior
Additional context
This is caused by an erroneous check in
cc_image.cpp
. That code says:This code is trying to check that every item in
pCreateInfo->queueFamilyIndexCount
is present inswapchain_state->create_info.pQueueFamilyIndices
. However, the error is thei != j
check: because this check exists, if a queue family index is listed at the same position in both arrays, it will be erroneously determined to be missing.I also think the error message is incorrect, because the missing value isn't
i
itself, but insteadswapchain_state->create_info.pQueueFamilyIndices[i]
.The text was updated successfully, but these errors were encountered: