diff options
| author | skallweitNV <64953474+skallweitNV@users.noreply.github.com> | 2023-01-27 20:53:57 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-27 11:53:57 -0800 |
| commit | 93a6b6119b6b65c4f6b00ca12d745e21b679c82f (patch) | |
| tree | 53bc1a3360d34ae6d15318eebf07245367387b9d /examples/gpu-printing/printing.slang | |
| parent | 9f6b6fb9f1bdde8ef01640257544f0e3c9db9076 (diff) | |
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
Diffstat (limited to 'examples/gpu-printing/printing.slang')
| -rw-r--r-- | examples/gpu-printing/printing.slang | 9 |
1 files changed, 6 insertions, 3 deletions
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<A : IPrintable, B : IPrintable, C : IPrintable>( // 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<A : IPrintf>(String format, A a) +void printf_<A : IPrintf>(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<A : IPrintf>(String format, A a) a.writePrintfWords(gPrintBuffer, wordOffset); wordOffset += aCount; } -void printf<A : IPrintf, B : IPrintf>(String format, A a, B b) +void printf_<A : IPrintf, B : IPrintf>(String format, A a, B b) { uint wordCount = 0; uint aCount = a.getPrintfWordCount(); wordCount += aCount; |
