KhronosGroup / Vulkan-Samples

One stop solution for all Vulkan samples
Apache License 2.0
4.36k stars 649 forks source link

Change *Builder::with_implicit_sharing_mode to select concurrent sharing mode when the queueFamilyIndexCount is greater than 1, not different from zero. #1218

Closed asuessenbach closed 1 week ago

asuessenbach commented 3 weeks ago

Description

This PR resolves a VVL error with the performance sample multi_draw_indirect:

Validation Error: [ VUID-VkBufferCreateInfo-sharingMode-00914 ] | MessageID = 0xa9d5cd94 | vkCreateBuffer(): pCreateInfo->sharingMode VK_SHARING_MODE_CONCURRENT, but queueFamilyIndexCount is 1.
The Vulkan spec states: If sharingMode is VK_SHARING_MODE_CONCURRENT, queueFamilyIndexCount must be greater than 1 (https://vulkan.lunarg.com/doc/view/1.3.296.0/windows/1.3-extensions/vkspec.html#VUID-VkBufferCreateInfo-sharingMode-00914)

Includes some cleanup in buffer.h, hpp_image.h, and image.h.

Build tested on Win10 with VS2022. Run tested on Win10 with NVidia GPU.

General Checklist:

Please ensure the following points are checked:

Sample Checklist

If your PR contains a new or modified sample, these further checks must be carried out in addition to the General Checklist:

asuessenbach commented 2 weeks ago

No idea how to resolve the Antora documentation build failure!

SaschaWillems commented 2 weeks ago

The Antora build failure has been fixed on main and can be safely ignored. It's not caused by our changes.