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

Issues with the swap chain in 1.3.275.0 and later versions #2226

Open
TheMostDiligent opened this issue May 4, 2024 · 2 comments
Open

Issues with the swap chain in 1.3.275.0 and later versions #2226

TheMostDiligent opened this issue May 4, 2024 · 2 comments

Comments

@TheMostDiligent
Copy link

Hello!

After updating Vulkan SDK to the latest version, we started seeing issues with the swap chain that did not happen before (versions 1.3.268.1 and earlier).

First, when running application from XCode with Metal API Validation enabled, the app triggers Metal assertion:

validateRenderPassDescriptor:991: failed assertion `RenderPass Descriptor Validation
renderTargetWidth (1600) must be <= minimum attachment width (1).
renderTargetHeight (1200) must be <= minimum attachment height (1).

When disabling Metal API Validation, Vulkan validation displays errors:

Diligent Engine: ERROR: Vulkan debug message (validation): UNASSIGNED-VkPresentInfoKHR-pImageIndices-MissingAcquireWait
                 Validation Error: [ UNASSIGNED-VkPresentInfoKHR-pImageIndices-MissingAcquireWait ] Object 0: handle = 0x808562000000003f, type = VK_OBJECT_TYPE_IMAGE; Object 1: handle = 0x9f9b41000000003c, name = Swap chain image acquired semaphore 2, type = VK_OBJECT_TYPE_SEMAPHORE; Object 2: handle = 0x5c5283000000003e, type = VK_OBJECT_TYPE_FENCE; | MessageID = 0x1b6b9ef2 | vkQueuePresentKHR(): pPresentInfo->pImageIndices[0] was acquired with a semaphore VkSemaphore 0x9f9b41000000003c[Swap chain image acquired semaphore 2] and fence VkFence 0x5c5283000000003e[] and neither of them have since been waited on
                 Object[0] (image): Handle 0x808562000000003f
                 Object[1] (semaphore): Handle 0x9f9b41000000003c, Name: 'Swap chain image acquired semaphore 2'
                 Object[2] (fence): Handle 0x5c5283000000003e

Diligent Engine: ERROR: Vulkan debug message (validation): VUID-vkDestroyFence-fence-01120
                 Validation Error: [ VUID-vkDestroyFence-fence-01120 ] Object 0: handle = 0x5c5283000000003e, type = VK_OBJECT_TYPE_FENCE; | MessageID = 0x5d296248 | vkDestroyFence(): fence (VkFence 0x5c5283000000003e[]) is in use. The Vulkan spec states: All queue submission commands that refer to fence must have completed execution (https://vulkan.lunarg.com/doc/view/1.3.275.0/mac/1.3-extensions/vkspec.html#VUID-vkDestroyFence-fence-01120)
                 Object[0] (fence): Handle 0x5c5283000000003e

The errors do not make a lot of sense: the semaphore is signaled few lines before it is passed to vkQueuePresentKHR

Lastly, when resizing the window, the app hangs.

None of these issues happened before the 1.3.275.0 SDK. They also don't happen on any other platform (Windows, Linux, Android) with the same SDK version.

The behavior is the same whether we use the MoltenVK surface or VK_EXT_Metal_Surface

Tutorial01_HelloTriangle.zip

@billhollings
Copy link
Contributor

The Tutorial01_HelloTriangle.app runtime you submitted seems to contain a few hard-coded file paths to your environment.

Do you have a buildable version of that app so we can build it here to see what's happening?

@TheMostDiligent
Copy link
Author

Do you have a buildable version of that app so we can build it here to see what's happening?

Yes: https://github.com/DiligentGraphics/DiligentEngine

Build should as simple as

git clone --recursive https://github.com/DiligentGraphics/DiligentEngine.git
cd DiligentEngine
cmake -S . -B ./build/MacOS -G "Xcode"
open build/MacOS/DiligentEngine.xcodeproj/

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

No branches or pull requests

2 participants