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

@@ -45,6 +45,7 @@
#include "../glslang/OSDependent/osinclude.h"
#include <algorithm>
#include <cctype>
namespace glslang {
@@ -3085,11 +3086,12 @@ void HlslParseContext::handleRegister(const TSourceLoc& loc, TQualifier& qualifi
}
// TODO: learn what all these really mean and how they interact with regNumber and subComponent
switch (desc[0]) {
switch (std::tolower(desc[0])) {
case 'b':
case 't':
case 'c':
case 's':
case 'u':
qualifier.layoutBinding = regNumber + subComponent;
break;
default: