Commit graph

8 commits

Author SHA1 Message Date
Raph Levien f9d0aa078b Use DXIL shader compilation
Integrate DXC for translating HLSL for use in DX12. This will work
around FXC limitations and unlock the use of more advanced HLSL features
such as subgroups.

This hardcodes the use of DXIL, but it could be adapted (with a bit of
effort) to choose between DXIL and HLSL at runtime.
2021-11-11 12:55:10 -08:00
Raph Levien a0648a2153 Portability fixes
The MSL translation of the prefix example had its bindings permuted; a
flag prevents this (but, as is typical for shader translation,
potentially creates other problems).

Also use explicit unsigned literal to avoid DXC warnings.
2021-11-11 07:08:39 -08:00
Raph Levien fbfd4ee81b Add workaround for buffer clearing
Add a clear stage and associated tests, and also use it on non-Vulkan
backends to clear the state buffer.

While that's a workaround and will go away when we implement the actual
clear command, it's also a nice demo of how the new "stage" structure
composes.
2021-11-10 17:36:54 -08:00
Raph Levien 74f2b4fd1c Rework bind layout
Use an array of bindtypes rather than the previous situation, which was
a choice of buffer counts, or a heavier builder pattern.

The main thing this unlocks is distinguishing between readonly and
read/write buffers, which is important for DX12.

This is WIP, the Metal part hasn't been done, and the old stuff not
deleted.

Part of #125
2021-11-10 11:25:16 -08:00
Raph Levien 3820e4b2f4 Add missing file
Also add finish_timestamps call, which is needed for DX12 (there are
other issues but this is an easy fix for that one).
2021-11-06 21:46:01 -07:00
Raph Levien b36ca7fc2e Add generated shaders 2021-11-06 16:25:56 -07:00
Raph Levien 4ed339d434 Add tree reduction prefix sum test
Do a tree reduction in addition to the existing decoupled look-back, to
explore the tradeoff between performance and compatibility.
2021-11-06 16:19:26 -07:00
Raph Levien 33d7b25a92 Start testing framework
This adds a prefix sum test. This patch is also trying to get a little
more serious about structuring both the test runner (toward the goal of
collecting proper statistics) and pipeline stages for the tests.

Still WIP but giving good results.
2021-11-06 11:24:34 -07:00