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:
@@ -60,6 +60,7 @@ TEST_P(LinkTestVulkan, FromFile)
|
||||
shaders.emplace_back(
|
||||
new glslang::TShader(GetShaderStage(GetSuffix(fileNames[i]))));
|
||||
auto* shader = shaders.back().get();
|
||||
shader->setAutoMapLocations(true);
|
||||
compile(shader, contents, "", controls);
|
||||
result.shaderResults.push_back(
|
||||
{fileNames[i], shader->getInfoLog(), shader->getInfoDebugLog()});
|
||||
|
||||
@@ -202,6 +202,7 @@ public:
|
||||
const EShLanguage kind = GetShaderStage(GetSuffix(shaderName));
|
||||
|
||||
glslang::TShader shader(kind);
|
||||
shader.setAutoMapLocations(true);
|
||||
shader.setFlattenUniformArrays(flattenUniformArrays);
|
||||
|
||||
bool success = compile(&shader, code, entryPointName, controls);
|
||||
@@ -254,6 +255,7 @@ public:
|
||||
shader.setShiftUboBinding(baseUboBinding);
|
||||
shader.setShiftSsboBinding(baseSsboBinding);
|
||||
shader.setAutoMapBindings(autoMapBindings);
|
||||
shader.setAutoMapLocations(true);
|
||||
shader.setFlattenUniformArrays(flattenUniformArrays);
|
||||
|
||||
bool success = compile(&shader, code, entryPointName, controls);
|
||||
@@ -295,6 +297,8 @@ public:
|
||||
const EShLanguage kind = GetShaderStage(GetSuffix(shaderName));
|
||||
|
||||
glslang::TShader shader(kind);
|
||||
shader.setAutoMapLocations(true);
|
||||
|
||||
bool success = compile(&shader, code, entryPointName, controls);
|
||||
|
||||
glslang::TProgram program;
|
||||
|
||||
Reference in New Issue
Block a user