From 2d3392f22c894957d17dd13486e0565c4ecea89c Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Fri, 27 May 2022 17:28:05 -0400 Subject: Added NativeStringType (#2252) * #include an absolute path didn't work - because paths were taken to always be relative. * Use TerminatedUnownedStringSlice for literals in output C++. * Remove Escape/Unescape functions used in slang-token-reader.cpp Add target type of 'host-cpp' etc to map to the target types. * Fix some corner cases around string encoding. * Added unit test for string escaping. Fixed some assorted escaping bugs. * Updated test output. * Added decode test. * Stop using hex output, to get around 'greedy' aspect. Use octal instead. --- source/slang/slang-emit-glsl.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'source/slang/slang-emit-glsl.cpp') diff --git a/source/slang/slang-emit-glsl.cpp b/source/slang/slang-emit-glsl.cpp index c1bbf813b..b0c10fdc2 100644 --- a/source/slang/slang-emit-glsl.cpp +++ b/source/slang/slang-emit-glsl.cpp @@ -1967,7 +1967,12 @@ void GLSLSourceEmitter::emitSimpleTypeImpl(IRType* type) } return; } - case kIROp_StringType: m_writer->emit("int"); return; + case kIROp_NativeStringType: + case kIROp_StringType: + { + m_writer->emit("int"); + return; + } default: break; } -- cgit v1.2.3