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
I haven't debugged further because I don't have a grasp of Vulkan synchronization, but I suspect we aren't waiting for the timestamp query to be resolved before reading from it. My understanding is that wgpu should be handling this behind the scenes with barriers transparently - at least, I don't see anything in the docs to suggest otherwise.
If we move the copy_buffer_to_buffer to another command encoder that gets submitted immediately after, it seems to work fine.
Expected vs observed behavior
I'd expect wgpu to perform the synchronization behind the scenes and return a correct value, or if this is user error, for the docs to say what manual synchronization needs to happen here.
Extra materials
None
Platform
Windows 10
AMD Radeon RX 6900 XT
wgpu 22.1.0 and also 2b15a2b (latest commit at time of writing)
The text was updated successfully, but these errors were encountered:
Description
Whilst debugging Wumpf/wgpu-profiler#84 I narrowed it down to a fairly small piece of code which returns
0
on Vulkan and a valid timestamp on DX12/GL. I've copied a minimal repro below.I haven't debugged further because I don't have a grasp of Vulkan synchronization, but I suspect we aren't waiting for the timestamp query to be resolved before reading from it. My understanding is that wgpu should be handling this behind the scenes with barriers transparently - at least, I don't see anything in the docs to suggest otherwise.
If we move the
copy_buffer_to_buffer
to another command encoder that gets submitted immediately after, it seems to work fine.Repro steps
If we change the encoder to something like this, it works fine:
Expected vs observed behavior
I'd expect wgpu to perform the synchronization behind the scenes and return a correct value, or if this is user error, for the docs to say what manual synchronization needs to happen here.
Extra materials
None
Platform
Windows 10
AMD Radeon RX 6900 XT
wgpu 22.1.0 and also 2b15a2b (latest commit at time of writing)
The text was updated successfully, but these errors were encountered: