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:
LoopDawg
2017-06-22 12:08:00 -06:00
parent 4329d555ad
commit c44b95fdec
15 changed files with 2280 additions and 200 deletions

View File

@@ -97,6 +97,11 @@ INSTANTIATE_TEST_CASE_P(
{"hlsl.cast.frag", "PixelShaderFunction"},
{"hlsl.charLit.vert", "main"},
{"hlsl.clip.frag", "main"},
{"hlsl.clipdistance-1.vert", "main"},
{"hlsl.clipdistance-2.vert", "main"},
{"hlsl.clipdistance-3.vert", "main"},
{"hlsl.clipdistance-4.vert", "main"},
{"hlsl.clipdistance-5.vert", "main"},
{"hlsl.comparison.vec.frag", "main"},
{"hlsl.conditional.frag", "PixelShaderFunction"},
{"hlsl.constantbuffer.frag", "main"},