From 3af404da7f7f125464b78159940cb3fc06e69cc5 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Tue, 17 Sep 2019 12:25:45 -0400 Subject: CPU ABI improvements (#1056) * WIP: Improving CPU performance/ABI * Optionally output code on CPU for groupThreadID and groupID. * Added ability to set compute dispatch size on command line for render-test. Dispatch compute tests taking into account dispatch size. Added test for semantics are working. * Test using GroupRange. * Fix problem with adding \n for externa diagnostic - to do it if there isn't a \n at the end. Change the ouput order (put result before) so last value is diagnostic string. --- source/slang/slang-compiler.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'source/slang/slang-compiler.cpp') diff --git a/source/slang/slang-compiler.cpp b/source/slang/slang-compiler.cpp index dbb900ab6..ce22186ee 100644 --- a/source/slang/slang-compiler.cpp +++ b/source/slang/slang-compiler.cpp @@ -789,11 +789,6 @@ namespace Slang builder << compilerName << ": "; } - if (diagnostic.size() > 0) - { - builder.Append(diagnostic); - } - if (SLANG_FAILED(res) && res != SLANG_FAIL) { { @@ -805,6 +800,15 @@ namespace Slang PlatformUtil::appendResult(res, builder); } + if (diagnostic.size() > 0) + { + builder.Append(diagnostic); + if (!diagnostic.endsWith("\n")) + { + builder.Append("\n"); + } + } + sink->diagnoseRaw(severity, builder.getUnownedSlice()); } -- cgit v1.2.3