- From: Corentin Wallez <cwallez@google.com>
- Date: Mon, 2 Oct 2017 18:02:29 -0400
- To: public-gpu <public-gpu@w3.org>
- Message-ID: <CAGdfWNMtzEGAFF0BK9KbSAFaFe=XsgCeCg7=Hfck7SvwbpCNGg@mail.gmail.com>
Hey all,
During the memory barriers discussion we said it would be nice to look at
specific examples, and how they map to different APIs. The Vulkan WG has
made a small list of examples
<https://github.com/KhronosGroup/Vulkan-Docs/wiki/Synchronization-Examples>
to help developers do synchronization when porting to Vulkan. They show
real-world things developers want to do, and how it maps to Vulkan on a
single queue:
- Compute-to-Compute
- *First dispatch writes to buffer, second reads from it*
- First dispatch reads from a buffer, second writes to it
- Same for images
- First and second dispatches write to non-overlapping regions of
same buffer and third dispatch reads from both regions.
- First and second dispatches write to two buffers, third dispatch
reads from both buffers.
- Compute-to-Graphics
- *Dispatch writes to buffer, draw reads from it as index buffer.*
- Dispatch writes to buffer, draw reads from it as index buffer and
other dispatch reads as uniform buffer.
- Dispatch writes to buffer, draw reads from it as indirect buffer.
- *Dispatch writes to image, draw samples image.*
- Dispatch writes to texel buffer, draw reads from it as indirect and
uniform buffer
- Graphics-to-Compute
- *Draw writes to color / depth attachment, dispatch reads from
image.*
- Graphics-to-Graphics
- *First draw writes depth / color attachment, second draw samples as
input attachment (i.e. from tile memory)*
- First draw writes depth / color attachment, second samples in
fragment shader.
- First draw samples texture, second draw uses texture as color
attachment.
They don't go in as much detail for multi-queue stuff, but I believe a lot
of the example with both graphics and compute would be interesting to map
to multiple queues too.
In bold are the use-cases that I believe are important / a good sample and
we could focus on. The page linked already has the examples for Vulkan.
Cheers,
Corentin
Received on Monday, 2 October 2017 22:03:47 UTC