WIP: HLSL: handle clip/cull distance array semantic matching
In HLSL, there are three (TODO: ??) dimensions of clip and cull distance values: * The semantic's value N, ala SV_ClipDistanceN. * The array demension, if the value is an array. * The vector element, if the value is a vector or array of vectors. In SPIR-V, clip and cull distance are arrays of scalar floats, always. This PR currently ignores the semantic N axis, and handles the other two axes by sequentially copying each vector element of each array member into sequential floats in the output array. Fixes: #946
This commit is contained in:
8
Test/hlsl.clipdistance-1.vert
Normal file
8
Test/hlsl.clipdistance-1.vert
Normal file
@@ -0,0 +1,8 @@
|
||||
void main(out float4 pos : SV_Position,
|
||||
out float clip : SV_ClipDistance, // scalar float
|
||||
out float cull : SV_CullDistance) // scalar float
|
||||
{
|
||||
pos = 1.0f.xxxx;
|
||||
clip = 0.5f;
|
||||
cull = 0.51f;
|
||||
}
|
||||
Reference in New Issue
Block a user