Add VK_EXT_rasterization_order_attachment_access sample#1492
Conversation
|
Correctly reports as not supported for Broadcom, but that's about all I can say. |
Same holds for me on Win11 with an NVIDIA GPU. As you already have a non-ROAA-path included, maybe you could make the support of |
4a3fe37 to
b46bfdd
Compare
That is, the rendering is deterministic (in primitive order), but generally not correct, due to potentially wrong order of blending, right? |
Good question. The sample focuses on demonstrating the API setup and runtime behavior of ROAA with dynamic rendering local read, rather than implementing a full compositing or transparency pipeline. The goal was to keep the example minimal and focused on how ROAA and attachment local read work together. ROAA guarantees deterministic primitive-order access, not automatic depth sorting. Whether blending is correct depends on the order in which primitives are submitted, which is fully under application control. If primitives are submitted in the intended compositing order, for example back-to-front for traditional alpha blending, ROAA guarantees that order is respected at the pixel level. In that case, the result is both deterministic and correct. If primitives are not sorted, then the result is still well-defined and deterministic, but order-dependent, exactly like fixed-function blending would be. The key difference is that without ROAA, overlapping fragments processed in a single draw with framebuffer fetch have undefined ordering and may produce frame-to-frame or vendor-dependent variation. The primary use cases for ROAA are:
So the value is not "deterministic but wrong," but rather "deterministic and well-defined," while allowing applications to control ordering explicitly when needed. If it would make the intent clearer, I can also extend the sample with a simple back-to-front CPU sort to demonstrate traditional alpha-correct compositing on top of ROAA. |
That sounds reasonable. Maybe you should add a few (more) words on ordering for transparency and overdrawing to the readme of this sample.
You're right, extending the sample with CPU sorting might actually hide the ROAA usage. That is, I'd vote for keeping it as small as it is, just with some more text in the readme. |
b46bfdd to
4fa1477
Compare
Done! |
|
@gary-sweet when you have a moment, can I get you to look at this again? |
|
Thanks. This does now run and says that ROAA is not supported. |
SaschaWillems
left a comment
There was a problem hiding this comment.
Great sample. Successfully tested it on a Google Pixel 10.

Description
New extension sample for
VK_EXT_rasterization_order_attachment_access, used together withVK_KHR_dynamic_renderingandVK_KHR_dynamic_rendering_local_read.There is already a sample for
VK_KHR_dynamic_rendering_local_read, but it doesn't cover rasterization-order guarantees or intra-draw fragment ordering. The interaction between local reads and ROAA is a common source of confusion: it's not always clear when local reads alone are sufficient and when rasterization-order guarantees are needed. This sample addresses that gap.The scene is similar to the
oit_linked_listssample but uses a different transparency technique. Instead of per-fragment linked lists, the fragment shader reads the current framebuffer value withsubpassLoad()and blends manually. ROAA guarantees that overlapping fragments at the same pixel are processed in primitive order, so the blending is deterministic without CPU sorting.A runtime toggle compares two approaches:
GPU timing and draw call/barrier counts are displayed in the UI.
With 16x16x16 spheres, ROAA replaces many draw calls and barriers with a single instanced draw, which gives a measurable performance win. On a Pixel 6 (Mali-G78): ~37-40 ms/frame with ROAA enabled vs ~45-47 ms/frame disabled. On a Pixel 8 (Mali-G715): ~23 ms vs ~25 ms. The benefit is larger on older GPUs, which is where the extension matters most in practice.
Tested on: Vivo X200 (Arm Immortalis-G925 MC12), Google Pixel 8 (Arm Mali-G715), Google Pixel 6 (Arm Mali-G78)
Files added
samples/extensions/rasterization_order_attachment_access/- sample source (.h, .cpp, README.adoc)shaders/rasterization_order_attachment_access/glsl/- vertex and fragment shaders (background, blend, fullscreen)Extensions used
VK_KHR_dynamic_renderingVK_KHR_dynamic_rendering_local_readVK_EXT_rasterization_order_attachment_accessVK_KHR_synchronization2General Checklist:
Please ensure the following points are checked:
Note: The Samples CI runs a number of checks including:
If this PR contains framework changes:
batchcommand line argument to make sure all samples still work properlySample Checklist
If your PR contains a new or modified sample, these further checks must be carried out in addition to the General Checklist:
Jira Task
https://jira.arm.com/browse/STEGFX-370