SPV: Give error on not assigning locations to I/O.

Also, provides an option to auto-assign locations.
Existing tests use this option, to avoid the error message,
however, it is not fully implemented yet.
This commit is contained in:
John Kessenich 2017-05-17 18:28:19 -06:00
parent 24e895b4a3
commit 71facdf435
14 changed files with 97 additions and 10 deletions

View file

@ -177,6 +177,7 @@ public:
shiftSsboBinding(0),
shiftUavBinding(0),
autoMapBindings(false),
autoMapLocations(false),
flattenUniformArrays(false),
useUnknownFormat(false),
hlslOffsets(false),
@ -218,9 +219,11 @@ public:
unsigned int getShiftUavBinding() const { return shiftUavBinding; }
void setResourceSetBinding(const std::vector<std::string>& shift) { resourceSetBinding = shift; }
const std::vector<std::string>& getResourceSetBinding() const { return resourceSetBinding; }
void setAutoMapBindings(bool map) { autoMapBindings = map; }
void setAutoMapBindings(bool map) { autoMapBindings = map; }
bool getAutoMapBindings() const { return autoMapBindings; }
void setFlattenUniformArrays(bool flatten) { flattenUniformArrays = flatten; }
void setAutoMapLocations(bool map) { autoMapLocations = map; }
bool getAutoMapLocations() const { return autoMapLocations; }
void setFlattenUniformArrays(bool flatten) { flattenUniformArrays = flatten; }
bool getFlattenUniformArrays() const { return flattenUniformArrays; }
void setNoStorageFormat(bool b) { useUnknownFormat = b; }
bool getNoStorageFormat() const { return useUnknownFormat; }
@ -516,6 +519,7 @@ protected:
unsigned int shiftUavBinding;
std::vector<std::string> resourceSetBinding;
bool autoMapBindings;
bool autoMapLocations;
bool flattenUniformArrays;
bool useUnknownFormat;
bool hlslOffsets;