Ivan Reese
Scott Anderson
06/29/2020, 10:48 PMRay Imber
07/02/2020, 6:42 PMStefan
07/04/2020, 5:32 AMGarth Goldwater
07/07/2020, 1:46 PMGarth Goldwater
07/10/2020, 3:38 AMGarth Goldwater
07/12/2020, 9:09 PMScott Anderson
07/29/2020, 10:29 PMCharlie Roberts
08/08/2020, 9:25 PMChet Corcos
08/11/2020, 1:23 AMDoug Moen
08/15/2020, 6:00 PMGarth Goldwater
08/15/2020, 11:39 PMScott Anderson
08/25/2020, 10:42 PMRik Arends
08/28/2020, 3:09 PMRik Arends
08/28/2020, 3:09 PMGarth Goldwater
08/30/2020, 4:09 PMMax Krieger
09/24/2020, 11:27 PMScott Anderson
01/20/2021, 2:44 AMTak Tran
03/14/2021, 11:42 AMDon Abrams
05/07/2021, 9:56 AMTak Tran
05/10/2021, 8:04 AMn1ckfg
07/02/2021, 5:03 PMEmmanuel Oga
11/17/2021, 10:02 AMSteve Dekorte
02/07/2022, 5:21 PMGarth Goldwater
08/25/2022, 10:57 PMAvneesh Sarwate
10/24/2022, 3:59 PMCharlie Roberts
07/09/2024, 9:59 PMPatrick Dubroy
11/02/2024, 10:45 AM@group(0) @binding(2) var<storage, read_write> output: array<vec4<f32>>;
⢠The fragment shader reads from the same buffer. Basically, each fragment is just one element of the vec4<f32>
. The fragment shader is very simple, and doesn't touch anything else in the storage buffer.
I've added timestamp queries to the pipeline, and what I'm seeing is this:
Duration #1: 47.800208ms
Duration #2: 47.809876ms
Frame time: 51.2545ms
Duration #1
is computed from the compute shader timestamps (the duration between the beginning and end of the compute pass) and Duration #2
is the time for the render pass, computed the same way.
Frame time
is measured on the CPU.
I expected the duration of the compute shader and fragment shader to add up to the frame time (approximately). But it doesn't and I'm confused about why! Could it be due to interleaving of the compute pass and render pass? If so, I'm curious how the synchronization works. How does the GPU figure out the dependencies between the write (a compute shader invocation) and the reader (fragment shader invocation)?
I don't have any explicit synchronization, but I'm also not seeing any tearing or anything that would indicate that there is a data race between the shaders.