Web: Remove unused stage functionality, SPIR-V logger, and hex_utils

Saves another 20K.
This commit is contained in:
John Kessenich
2019-08-08 23:29:20 -06:00
parent 39697cdb9d
commit 155d351f86
20 changed files with 450 additions and 390 deletions

View File

@@ -977,6 +977,7 @@ void CompileAndLinkShaderUnits(std::vector<ShaderCompUnit> compUnits)
shader->setPreamble(UserPreamble.get());
shader->addProcesses(Processes);
#ifndef GLSLANG_WEB
// Set IO mapper binding shift values
for (int r = 0; r < glslang::EResCount; ++r) {
const glslang::TResourceType res = glslang::TResourceType(r);
@@ -990,32 +991,33 @@ void CompileAndLinkShaderUnits(std::vector<ShaderCompUnit> compUnits)
i != baseBindingForSet[res][compUnit.stage].end(); ++i)
shader->setShiftBindingForSet(res, i->second, i->first);
}
shader->setFlattenUniformArrays((Options & EOptionFlattenUniformArrays) != 0);
shader->setNoStorageFormat((Options & EOptionNoStorageFormat) != 0);
shader->setNanMinMaxClamp(NaNClamp);
shader->setResourceSetBinding(baseResourceSetBinding[compUnit.stage]);
#ifdef ENABLE_HLSL
if (Options & EOptionHlslIoMapping)
shader->setHlslIoMapping(true);
#endif
if (Options & EOptionAutoMapBindings)
shader->setAutoMapBindings(true);
if (Options & EOptionAutoMapLocations)
shader->setAutoMapLocations(true);
if (Options & EOptionInvertY)
shader->setInvertY(true);
for (auto& uniOverride : uniformLocationOverrides) {
shader->addUniformLocationOverride(uniOverride.first.c_str(),
uniOverride.second);
}
shader->setUniformLocationBase(uniformBase);
#endif
shader->setNanMinMaxClamp(NaNClamp);
#ifdef ENABLE_HLSL
shader->setFlattenUniformArrays((Options & EOptionFlattenUniformArrays) != 0);
if (Options & EOptionHlslIoMapping)
shader->setHlslIoMapping(true);
#endif
if (Options & EOptionInvertY)
shader->setInvertY(true);
// Set up the environment, some subsettings take precedence over earlier
// ways of setting things.