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.
This commit is contained in:
@@ -1720,6 +1720,12 @@ void TGlslangToSpvTraverser::visitSymbol(glslang::TIntermSymbol* symbol)
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user