For indirect mesh shaders fetch up-to-date dispatch arguments

* This doesn't work for whole-pass mesh fetch, but and will cause
  inconsistencies between single draws due to non-determinism, but should avoid
  crashes.
This commit is contained in:
baldurk
2023-12-07 12:18:43 +00:00
parent fd84a06ee2
commit 4bccf2dac3
9 changed files with 152 additions and 20 deletions
+13
View File
@@ -125,6 +125,19 @@ the number of vertices).
)");
rdcarray<MeshletSize> meshletSizes;
DOCUMENT(R"(The size of the dispatch that launched a meshlet based draw.
Only valid for the task stage if task shaders are used.
.. note::
This is present because the dispatch size at the time of the mesh output fetch may not match the
:data:`ActionDescription.dispatchDimension` due to non-determinism in the capture. Being present
here allows the replay to process the mesh output validly in itself without seeing a mismatch.
:type: Tuple[int,int,int]
)");
rdcfixedarray<uint32_t, 3> dispatchSize;
DOCUMENT(R"(The size of each task group's dispatch, for a meshlet based draw.
Each group of a task shader within a dispatch can itself fill out a payload and dispatch a number