glslang/hlsl
LoopDawg 307b6507b3 HLSL: handle multiple clip/cull semantic IDs
HLSL allows several variables to be declared.  There are packing rules involved:
e.g, a float3 and a float1 can be packed into a single array[4], while for a
float3 and another float3, the second one will skip the third array entry to
avoid straddling

This is implements that ability.  Because there can be multiple variables involved,
and the final output array will often be a different type altogether (to fuse
the values into a single destination), a new variable is synthesized, unlike the prior
clip/cull support which used the declared variable.  The new variable name is
taken from one of the declared ones, so the old tests are unchanged.

Several new tests are added to test various packing scenarios.

Only two semantic IDs are supported: 0, and 1, per HLSL rules.  This is
encapsulated in

     static const int maxClipCullRegs = 2;

and the algorithm (probably :) ) generalizes to larger values, although there
are a few issues around how HLSL would pack (e.g, would 4 scalars be packed into
a single HLSL float4 out reg?  Probably, and this algorithm assumes so).
2017-07-26 11:18:09 -06:00
..
CMakeLists.txt Merge pull request #969 from d3x0r/patch-1 2017-07-04 11:00:42 -06:00
hlslAttributes.cpp HLSL: implement [unroll] and [loop] attributes 2017-05-03 13:44:40 -06:00
hlslAttributes.h HLSL: implement [unroll] and [loop] attributes 2017-05-03 13:44:40 -06:00
hlslGrammar.cpp WIP: HLSL: support global const initializers from non-constant rvalues 2017-07-11 13:41:39 -06:00
hlslGrammar.h HLSL: Translate directive [flatten] and [branch] to SPV control mask. 2017-07-06 11:31:33 +08:00
hlslOpMap.cpp HLSL: Add scoping operator, accept static member functions, and support calling them. 2017-03-11 14:13:00 -07:00
hlslOpMap.h Non-functional: White space after "//", mostly for copyrights. 2017-01-06 12:34:14 -07:00
hlslParseables.cpp SPV: When passing structs of opaque types, flatten and pass the members instead. 2017-06-01 18:49:04 -06:00
hlslParseables.h Non-functional: White space after "//", mostly for copyrights. 2017-01-06 12:34:14 -07:00
hlslParseHelper.cpp HLSL: handle multiple clip/cull semantic IDs 2017-07-26 11:18:09 -06:00
hlslParseHelper.h HLSL: handle multiple clip/cull semantic IDs 2017-07-26 11:18:09 -06:00
hlslScanContext.cpp HLSL: handle multiple clip/cull semantic IDs 2017-07-26 11:18:09 -06:00
hlslScanContext.h HLSL: Non-functional: the symbol field of a token was in practice unused; remove it. 2017-03-21 18:36:04 -06:00
hlslTokens.h HLSL: Implement half matrices, and map all half* -> float*. 2017-06-06 23:35:25 -06:00
hlslTokenStream.cpp HLSL: Member-functions: capture body token stream for deferred syntax/semantics. 2017-03-11 19:37:29 -07:00
hlslTokenStream.h Merge branch 'TiemoJung-semantic_handling' 2017-03-14 22:44:24 -06:00