glslang-zig/hlsl
steve-lunarg e0b9debda2 Flatten uniform arrays
This checkin adds a --flatten-uniform-arrays option which can break
uniform arrays of samplers, textures, or UBOs up into individual
scalars named (e.g) myarray[0], myarray[1], etc.  These appear as
individual linkage objects.

Code notes:

- shouldFlatten internally calls shouldFlattenIO, and shouldFlattenUniform,
  but is the only flattening query directly called.

- flattenVariable will handle structs or arrays (but not yet arrayed structs;
  this is tested an an error is generated).

- There's some error checking around unhandled situations.  E.g, flattening
  uniform arrays with initializer lists is not implemented.

- This piggybacks on as much of the existing mechanism for struct flattening
  as it can.  E.g, it uses the same flattenMap, and the same
  flattenAccess() method.

- handleAssign() has been generalized to cope with either structs or arrays.

- Extended test infrastructure to test flattening ability.
2016-09-22 08:47:48 -06:00
..
CMakeLists.txt Add base class TParseables for intrinsic / builtin generation. 2016-05-23 15:44:53 -06:00
hlslGrammar.cpp HLSL: Move to correct parsing of annotations, improving all annotations and recent string grammar. 2016-09-20 13:22:58 -06:00
hlslGrammar.h HLSL: Move to correct parsing of annotations, improving all annotations and recent string grammar. 2016-09-20 13:22:58 -06:00
hlslOpMap.cpp HLSL: Basic array grammar. 2016-06-19 11:50:34 -06:00
hlslOpMap.h HLSL: Add (almost) full expression grammar: Binary, unary (pre/post-fix), assign, ... 2016-05-03 23:33:00 -06:00
hlslParseables.cpp WIP: HLSL: Treat HLSL rows as GLSL columns. 2016-09-09 12:02:42 -06:00
hlslParseables.h Add lerp, fix sincos return type, ret type tests, non-square mats, HLSL->AST tx semantics 2016-06-21 10:10:48 -06:00
hlslParseHelper.cpp Flatten uniform arrays 2016-09-22 08:47:48 -06:00
hlslParseHelper.h Flatten uniform arrays 2016-09-22 08:47:48 -06:00
hlslScanContext.cpp HLSL: Move to correct parsing of annotations, improving all annotations and recent string grammar. 2016-09-20 13:22:58 -06:00
hlslScanContext.h HLSL: Implement basic "struct" grammar. 2016-06-12 23:54:31 -06:00
hlslTokens.h HLSL: Move to correct parsing of annotations, improving all annotations and recent string grammar. 2016-09-20 13:22:58 -06:00
hlslTokenStream.cpp HLSL: Fix a grammar error related to constructors in parenthetical expressions 2016-07-30 08:09:09 -06:00
hlslTokenStream.h HLSL: Fix a grammar error related to constructors in parenthetical expressions 2016-07-30 08:09:09 -06:00