Skip to content

Commit

Permalink
Merge pull request KhronosGroup#2616 from Rob2309/standalone-hlsl-sam…
Browse files Browse the repository at this point in the history
…pled-textures

Exposed KhronosGroup#856 as --hlsl-sampled-textures in the StandAlone
  • Loading branch information
greg-lunarg authored Apr 22, 2021
2 parents 5bce773 + ebfca60 commit 7f46558
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions StandAlone/StandAlone.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ bool NaNClamp = false;
bool stripDebugInfo = false;
bool beQuiet = false;
bool VulkanRulesRelaxed = false;
bool autoSampledTextures = false;

//
// Return codes from main/exit().
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 7f46558

Please sign in to comment.