From 93a6b6119b6b65c4f6b00ca12d745e21b679c82f Mon Sep 17 00:00:00 2001 From: skallweitNV <64953474+skallweitNV@users.noreply.github.com> Date: Fri, 27 Jan 2023 20:53:57 +0100 Subject: Add ASAN support + fixes (#2614) * Add ASAN support to premake * Fix StringRepresentation when ASAN is enabled * Fix deep recursion in slang-generate * Fix hello-world example * Fix gpu-printing example * Linux fix * Try fixing linux * Add missing include --- examples/gpu-printing/printing.slang | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'examples/gpu-printing/printing.slang') diff --git a/examples/gpu-printing/printing.slang b/examples/gpu-printing/printing.slang index 941a1518b..0abf57e34 100644 --- a/examples/gpu-printing/printing.slang +++ b/examples/gpu-printing/printing.slang @@ -284,6 +284,9 @@ void println( // starts with an allocation function that does the behind-the-scenes // work. // +// Note: We use the name `printf_` here because `printf` clashes with +// HLSL's printf. +// uint _beginPrintf(String format, uint wordCount) { @@ -340,14 +343,14 @@ extension String : IPrintf // A `printf()` with no format arguments can just call back to `_beginPrintf()` -void printf(String format) +void printf_(String format) { _beginPrintf(format, 0); } // The `printf()` cases with one or more format arguments are all quite similar. -void printf(String format, A a) +void printf_(String format, A a) { // We need to compute the words required by each format argument // and sum them up. @@ -366,7 +369,7 @@ void printf(String format, A a) a.writePrintfWords(gPrintBuffer, wordOffset); wordOffset += aCount; } -void printf(String format, A a, B b) +void printf_(String format, A a, B b) { uint wordCount = 0; uint aCount = a.getPrintfWordCount(); wordCount += aCount; -- cgit v1.2.3