Manually merge ClemensRognerSD-dx9-sampler and resolve conflicts.
diff --git a/StandAlone/StandAlone.cpp b/StandAlone/StandAlone.cpp
index 060428b..42a46ce 100755
--- a/StandAlone/StandAlone.cpp
+++ b/StandAlone/StandAlone.cpp
@@ -160,6 +160,7 @@
const char* shaderStageName = nullptr;
const char* variableName = nullptr;
bool HlslEnable16BitTypes = false;
+bool HlslDX9compatible = false;
std::vector<std::string> IncludeDirectoryList;
// Source environment
@@ -509,6 +510,8 @@
Options |= EOptionHlslIoMapping;
} else if (lowerword == "hlsl-enable-16bit-types") {
HlslEnable16BitTypes = true;
+ } else if (lowerword == "hlsl-dx9-compatible") {
+ HlslDX9compatible = true;
} else if (lowerword == "invert-y" || // synonyms
lowerword == "iy") {
Options |= EOptionInvertY;
@@ -815,6 +818,8 @@
messages = (EShMessages)(messages | EShMsgHlslEnable16BitTypes);
if ((Options & EOptionOptimizeDisable) || !ENABLE_OPT)
messages = (EShMessages)(messages | EShMsgHlslLegalization);
+ if (HlslDX9compatible)
+ messages = (EShMessages)(messages | EShMsgHlslDX9Compatible);
}
//
@@ -1509,6 +1514,7 @@
" works independently of source language\n"
" --hlsl-iomap perform IO mapping in HLSL register space\n"
" --hlsl-enable-16bit-types allow 16-bit types in SPIR-V for HLSL\n"
+ " --hlsl-dx9-compatible interprets sampler declarations as a texture/sampler combo like DirectX9 would."
" --invert-y | --iy invert position.Y output in vertex shader\n"
" --keep-uncalled | --ku don't eliminate uncalled functions\n"
" --no-storage-format | --nsf use Unknown image format\n"