diff --git a/StandAlone/StandAlone.cpp b/StandAlone/StandAlone.cpp index f76fc05d..d38f4add 100644 --- a/StandAlone/StandAlone.cpp +++ b/StandAlone/StandAlone.cpp @@ -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>& 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 compUnits) shader->setNoStorageFormat((Options & EOptionNoStorageFormat) != 0); shader->setResourceSetBinding(baseResourceSetBinding[compUnit.stage]); + if (autoSampledTextures) + shader->setTextureSamplerTransformMode(EShTexSampTransUpgradeTextureRemoveSampler); + if (Options & EOptionAutoMapBindings) shader->setAutoMapBindings(true);