glslang-zig/glslang/MachineIndependent
steve-lunarg 7f7c2ed780 HLSL: Add location offsets per resource type
This PR adds the ability to offset sampler, texture, and UBO bindings
from provided base bindings, and to auto-number bindings that are not
provided with explicit register numbers. The mechanism works as
follows:

- Offsets may be given on the command line for all stages, or
  individually for one or more single stages, in which case the
  offset will be auto-selected according to the stage being
  compiled. There is also an API to set them. The new command line
  options are --shift-sampler-binding, --shift-texture-binding, and
  --shift-UBO-binding.

- Uniforms which are not given explicit bindings in the source code
  are auto-numbered if and only if they are in live code as
  determined by the algorithm used to build the reflection
  database, and the --auto-map-bindings option is given. This auto-numbering
  avoids using any binding slots which were explicitly provided in
  the code, whether or not that explicit use was live. E.g, "uniform
  Texture1D foo : register(t3);" with --shift-texture-binding 10 will
  reserve binding 13, whether or not foo is used in live code.

- Shorter synonyms for the command line options are available.  See
  the --help output.

The testing infrastructure is slightly extended to allow use of the
binding offset API, and two new tests spv.register.(no)autoassign.frag are
added for comparing the resulting SPIR-V.
2016-09-20 20:31:27 -06:00
..
preprocessor Non-functional: Sweep through the stack for consistent with "main" and entry point. 2016-09-19 16:01:41 -06:00
Constant.cpp Front-end: Implement compile-time constant folding for any() and all(). 2016-07-12 01:27:48 -06:00
gl_types.h Implement the extension GL_ARB_gpu_shader_int64 2016-04-30 13:34:34 +08:00
glslang.y Front-end: Warn for likely missed change in default precisions. 2016-08-23 18:13:08 -06:00
glslang_tab.cpp Front-end: Warn for likely missed change in default precisions. 2016-08-23 18:13:08 -06:00
glslang_tab.cpp.h SPV: Prevent issue #415 with better semantic checking. 2016-07-31 12:39:46 -06:00
InfoSink.cpp HLSL: Change the final syntax-error printf to go to the infoLog. 2016-09-19 14:56:55 -06:00
Initialize.cpp Vulkan: Have desktop shaders respect precision qualifiers. 2016-08-23 18:12:25 -06:00
Initialize.h SPV: Non-functional: Condense SPV-related versioning, and rationalize all uses. 2016-06-16 23:31:29 -06:00
Intermediate.cpp Parser: Add 64-bit type conversion for specialization constant. 2016-09-05 22:20:28 +08:00
intermOut.cpp Build: C++ headers: Replace PR #366 with a more directed version. 2016-08-05 14:04:23 -06:00
IntermTraverse.cpp Comments only. 2016-05-06 13:06:11 -06:00
iomapper.cpp HLSL: Add location offsets per resource type 2016-09-20 20:31:27 -06:00
iomapper.h HLSL: Add location offsets per resource type 2016-09-20 20:31:27 -06:00
limits.cpp Array of Array prep: Turn a batch of 0's into nullptr or UnsizedArraySize. 2015-08-09 18:15:25 -06:00
linkValidate.cpp HLSL: Turn on reflection, with basic test file, to catch regressions. 2016-09-19 23:12:48 -06:00
LiveTraverser.h Refactor TLiveTraverser from the former reflection traverser, for future use in binding mapping. 2016-09-19 16:33:02 -06:00
localintermediate.h HLSL: Add location offsets per resource type 2016-09-20 20:31:27 -06:00
parseConst.cpp glslang: Fix over 100 warnings from MSVC warning level 4. 2015-05-15 17:30:55 +00:00
ParseContextBase.cpp Non-functional: Add some missing const, related to signature selection. 2016-08-26 14:01:43 -06:00
ParseHelper.cpp Track separate entry-point names and mangled names... 2016-09-19 18:09:30 -06:00
ParseHelper.h Front-ends: Remove now defunct afterEOF and related, use scanner's instead. 2016-08-31 13:46:50 -06:00
parseVersions.h HLSL: enable #line extension by default for HLSL source. 2016-07-23 10:45:00 -06:00
PoolAlloc.cpp Whitespace: Nonfunctional: fix inconsistent white space, esp. no tabs. 2016-08-05 17:34:34 -06:00
propagateNoContraction.cpp Build: Remove causes of pedantic warnings. Addresses issue #352 and PR #242. 2016-07-08 22:09:10 -06:00
propagateNoContraction.h Non-functional: Fix some comments English and brace formatting in recent merges. 2016-05-17 10:24:00 -06:00
reflection.cpp Track separate entry-point names and mangled names... 2016-09-19 18:09:30 -06:00
reflection.h Refactor TLiveTraverser from the former reflection traverser, for future use in binding mapping. 2016-09-19 16:33:02 -06:00
RemoveTree.cpp Improvement to the AST traversal infrastructure. 2014-01-11 19:29:55 +00:00
RemoveTree.h Put all glslang internals (but not the external interface) into the glslang namespace. 2013-08-29 00:39:25 +00:00
Scan.cpp Build: C++ headers: Replace PR #366 with a more directed version. 2016-08-05 14:04:23 -06:00
Scan.h Front-ends: Remove now defunct afterEOF and related, use scanner's instead. 2016-08-31 13:46:50 -06:00
ScanContext.h Refactor TParseContext into 3 level inheritance. 2016-03-12 19:08:55 -07:00
ShaderLang.cpp HLSL: Add location offsets per resource type 2016-09-20 20:31:27 -06:00
SymbolTable.cpp Non-functional: Sweep through the stack for consistent with "main" and entry point. 2016-09-19 16:01:41 -06:00
SymbolTable.h Front-end/Non-functional: Add some const/auto, useful for upcoming changes. 2016-08-19 07:27:28 -06:00
Versions.cpp Implement 4 AMD-specific extensions. 2016-07-20 16:18:05 +08:00
Versions.h Implement 4 AMD-specific extensions. 2016-07-20 16:18:05 +08:00