glslang-zig/glslang
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
..
GenericCodeGen Whitespace: Nonfunctional: fix inconsistent white space, esp. no tabs. 2016-08-05 17:34:34 -06:00
Include HLSL: Fix result type of passing a flattened-aggregate to a function. 2016-09-21 17:50:12 -06:00
MachineIndependent Flatten uniform arrays 2016-09-22 08:47:48 -06:00
OSDependent Merge branch 'cpp-headers' 2016-08-11 10:01:13 -06:00
Public Flatten uniform arrays 2016-09-22 08:47:48 -06:00
CMakeLists.txt HLSL: Add location offsets per resource type 2016-09-20 20:31:27 -06:00
updateGrammar Bison: Non-functional: Move to revision 3.0.4. 2016-05-04 12:54:56 -06:00