From 219b7b9f72930f7296a8a9e96e562e7dd66b88a7 Mon Sep 17 00:00:00 2001 From: Robin Quint Date: Tue, 20 Apr 2021 07:58:36 +0200 Subject: [PATCH] Exposed #856 as --hlsl-sampled-textures in the StandAlone --- StandAlone/StandAlone.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/StandAlone/StandAlone.cpp b/StandAlone/StandAlone.cpp index 923ded30..58c1704a 100644 --- a/StandAlone/StandAlone.cpp +++ b/StandAlone/StandAlone.cpp @@ -111,6 +111,7 @@ bool NaNClamp = false; bool stripDebugInfo = false; bool beQuiet = false; bool VulkanRulesRelaxed = false; +bool hlslSampledTextures = false; // // Return codes from main/exit(). @@ -655,6 +656,8 @@ void ProcessArguments(std::vector>& workItem HlslEnable16BitTypes = true; } else if (lowerword == "hlsl-dx9-compatible") { HlslDX9compatible = true; + } else if (lowerword == "hlsl-sampled-textures") { + hlslSampledTextures = true; } else if (lowerword == "invert-y" || // synonyms lowerword == "iy") { Options |= EOptionInvertY; @@ -1189,6 +1192,9 @@ void CompileAndLinkShaderUnits(std::vector compUnits) shader->setNoStorageFormat((Options & EOptionNoStorageFormat) != 0); shader->setResourceSetBinding(baseResourceSetBinding[compUnit.stage]); + if (hlslSampledTextures) + shader->setTextureSamplerTransformMode(EShTexSampTransUpgradeTextureRemoveSampler); + if (Options & EOptionAutoMapBindings) shader->setAutoMapBindings(true);