Skip to content

Use ICBs for global constants

Daniel Stone requested to merge dxil-icb-global-consts into msclc-d3d12

Globally-constant data can live in immediate constant buffers, aka ICBs. These are inline with the shader, rather than being pushed in at runtime by the implementation.

This MR implements minimal ICB support: only a single flat array of 32-bit integers is supported. The code is written to be sympathetic to supporting other types later on - needing to be combined (for smaller types) or split (for 64-bit types), much like we currently do with global memory. However, it does not do this now, and as our deref support is quite poor, only arrays are supported.

This does not work on the version of WARP shipped with current mainline or slow-ring Windows builds. Using the hardware driver gets it to pass on Intel at least.

Merge request reports

Loading