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

Vulkan validation error: semaphore must not have any pending operations when calling Surface::get_current_texture #5906

Closed
ten3roberts opened this issue Jul 3, 2024 · 3 comments

Comments

@ten3roberts
Copy link

Description
Semaphore must not have any pending operations is triggered by the vulkan validations when acquiring the next surface texture.

I have not been able to find a minimal reproduction of this issue, and this issue started appearing when the rendering got more complex; most specifically taking more time per frame.

If I further increase the time taken in the shader (skybox convolution shader), the device becomes lost.

The following commit experiences the error: ten3roberts/ivy@5ae30c1

Removing the time intensive skybox convolving code removes the validation error, so it is likely time-dependent.

Expected vs observed behavior
Validation errors should not error on invalid semaphore usage

Extra materials

 INFO get next surface texture
 INFO present
 INFO get next surface texture
 INFO present
 INFO get next surface texture
 INFO present
 INFO get next surface texture
 INFO present
 INFO get next surface texture
ERROR VALIDATION [VUID-vkAcquireNextImageKHR-semaphore-01779 (0x5717e75b)]
        Validation Error: [ VUID-vkAcquireNextImageKHR-semaphore-01779 ] Object 0: handle = 0xd000000000d, type = VK_OBJECT_TYPE_SEMAPHORE; | MessageID = 0x5717e75b | vkAcquireNex
tImageKHR():  Semaphore must not have any pending operations. The Vulkan spec states: If semaphore is not VK_NULL_HANDLE it must not have any uncompleted signal or wait operations
 pending (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkAcquireNextImageKHR-semaphore-01779)
ERROR   objects: (type: SEMAPHORE, hndl: 0xd000000000d, name: ?)
 INFO present
 INFO get next surface texture
ERROR VALIDATION [VUID-vkAcquireNextImageKHR-semaphore-01779 (0x5717e75b)]
        Validation Error: [ VUID-vkAcquireNextImageKHR-semaphore-01779 ] Object 0: handle = 0xe000000000e, type = VK_OBJECT_TYPE_SEMAPHORE; | MessageID = 0x5717e75b | vkAcquireNex
tImageKHR():  Semaphore must not have any pending operations. The Vulkan spec states: If semaphore is not VK_NULL_HANDLE it must not have any uncompleted signal or wait operations
 pending (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkAcquireNextImageKHR-semaphore-01779)
ERROR   objects: (type: SEMAPHORE, hndl: 0xe000000000e, name: ?)
 INFO present
 INFO get next surface texture
ERROR VALIDATION [VUID-vkAcquireNextImageKHR-semaphore-01779 (0x5717e75b)]
        Validation Error: [ VUID-vkAcquireNextImageKHR-semaphore-01779 ] Object 0: handle = 0xf000000000f, type = VK_OBJECT_TYPE_SEMAPHORE; | MessageID = 0x5717e75b | vkAcquireNex
tImageKHR():  Semaphore must not have any pending operations. The Vulkan spec states: If semaphore is not VK_NULL_HANDLE it must not have any uncompleted signal or wait operations
 pending (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkAcquireNextImageKHR-semaphore-01779)
ERROR   objects: (type: SEMAPHORE, hndl: 0xf000000000f, name: ?)

Platforms

  1. Linux; nvidia 550 (validation error; device lost if increase complexity even more)
  2. HP Probook, Intel integrated graphics (device lost)
@ten3roberts
Copy link
Author

I have tried submitting the heavy work on the same queue prior to getting the first image, and within a get_current_texture/present pair, and the same result is observed.

The issue is fixed and no validations errors are observed if I comment out the draw command for the compute heavy/time heavy convolution code on both my 2 devices I tried.

Is it incorrect to create textures while recording an encoder, or is that ok behavior?

@cwfitzgerald
Copy link
Member

Thanks for filling! Updating wgpu to 0.20.1 or newer should fix this.

@cwfitzgerald cwfitzgerald closed this as not planned Won't fix, can't repro, duplicate, stale Jul 5, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in WebGPU for Firefox Jul 5, 2024
@ten3roberts
Copy link
Author

Thanks for filling! Updating wgpu to 0.20.1 or newer should fix this.

Thanks for the reply. I recall trying that, as well as #5681 separately, but same thing

I'll try again later and let you know what I see :)

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

No branches or pull requests

2 participants