Add UAV (image) binding offset and HLSL register support

This PR adds:

1. The "u" register class for RW* objects.

2. --shift-image-bindings (== --sib), analogous to --shift-texture-bindings etc.

3. Case insensitive reg classes.

4. Tests for above.
This commit is contained in:
steve-lunarg
2016-11-01 10:31:42 -06:00
parent e5e58cfee3
commit 9088be4c07
13 changed files with 309 additions and 10 deletions

View File

@@ -239,6 +239,7 @@ public:
const std::string& entryPointName, EShMessages controls,
int baseSamplerBinding,
int baseTextureBinding,
int baseImageBinding,
int baseUboBinding,
bool autoMapBindings,
bool flattenUniformArrays)
@@ -248,6 +249,7 @@ public:
glslang::TShader shader(kind);
shader.setShiftSamplerBinding(baseSamplerBinding);
shader.setShiftTextureBinding(baseTextureBinding);
shader.setShiftImageBinding(baseImageBinding);
shader.setShiftUboBinding(baseUboBinding);
shader.setAutoMapBindings(autoMapBindings);
shader.setFlattenUniformArrays(flattenUniformArrays);
@@ -426,6 +428,7 @@ public:
const std::string& entryPointName,
int baseSamplerBinding,
int baseTextureBinding,
int baseImageBinding,
int baseUboBinding,
bool autoMapBindings,
bool flattenUniformArrays)
@@ -440,7 +443,7 @@ public:
const EShMessages controls = DeriveOptions(source, semantics, target);
GlslangResult result = compileLinkIoMap(testName, input, entryPointName, controls,
baseSamplerBinding, baseTextureBinding, baseUboBinding,
baseSamplerBinding, baseTextureBinding, baseImageBinding, baseUboBinding,
autoMapBindings,
flattenUniformArrays);