Skip to content

vkd3d-shader/ir: Transform clip/cull inputs into an array.

Conor McCarthy requested to merge cmccarthy/vkd3d:clip_cull into master

D3D12 supports up to eight clip/cull values, which are naturally best implemented as an array, but DXBC/TPF lacks array support, so it declares up to two vectors of four. SPIR-V uses an array. Instead of converting the vectors in the signature into an I/O array element spanning up to eight register indices, with all the complexity that would entail, we use dedicated clip/cull registers. Addressing is fixed up in the normaliser, and the backend need only compute the array size(s) and declare the dedicated register(s).

Edited by Conor McCarthy

Merge request reports

Loading