HLSL: Add support for printf().
Translate printf() to what GL_EXT_debug_printf has done. HLSL could
define non-constant string variable and we don't have such features
in SPIR-V, so just support constant string variable.
diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp
index d32c646..5b7f89a 100644
--- a/SPIRV/GlslangToSpv.cpp
+++ b/SPIRV/GlslangToSpv.cpp
@@ -1720,6 +1720,12 @@
if (symbol->getType().getQualifier().isSpecConstant())
spec_constant_op_mode_setter.turnOnSpecConstantOpMode();
+#ifdef ENABLE_HLSL
+ // Skip symbol handling if it is string-typed
+ if (symbol->getBasicType() == glslang::EbtString)
+ return;
+#endif
+
// getSymbolId() will set up all the IO decorations on the first call.
// Formal function parameters were mapped during makeFunctions().
spv::Id id = getSymbolId(symbol);