mirror of
https://github.com/KhronosGroup/glslang
synced 2024-09-19 20:29:54 +00:00
Merge pull request #2616 from Rob2309/standalone-hlsl-sampled-textures
Exposed #856 as --hlsl-sampled-textures in the StandAlone
This commit is contained in:
commit
7f46558b8c
@ -112,6 +112,7 @@ bool NaNClamp = false;
|
||||
bool stripDebugInfo = false;
|
||||
bool beQuiet = false;
|
||||
bool VulkanRulesRelaxed = false;
|
||||
bool autoSampledTextures = false;
|
||||
|
||||
//
|
||||
// Return codes from main/exit().
|
||||
@ -657,6 +658,8 @@ void ProcessArguments(std::vector<std::unique_ptr<glslang::TWorkItem>>& workItem
|
||||
HlslEnable16BitTypes = true;
|
||||
} else if (lowerword == "hlsl-dx9-compatible") {
|
||||
HlslDX9compatible = true;
|
||||
} else if (lowerword == "auto-sampled-textures") {
|
||||
autoSampledTextures = true;
|
||||
} else if (lowerword == "invert-y" || // synonyms
|
||||
lowerword == "iy") {
|
||||
Options |= EOptionInvertY;
|
||||
@ -1222,6 +1225,9 @@ void CompileAndLinkShaderUnits(std::vector<ShaderCompUnit> compUnits)
|
||||
shader->setNoStorageFormat((Options & EOptionNoStorageFormat) != 0);
|
||||
shader->setResourceSetBinding(baseResourceSetBinding[compUnit.stage]);
|
||||
|
||||
if (autoSampledTextures)
|
||||
shader->setTextureSamplerTransformMode(EShTexSampTransUpgradeTextureRemoveSampler);
|
||||
|
||||
if (Options & EOptionAutoMapBindings)
|
||||
shader->setAutoMapBindings(true);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user