summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2023-02-16 13:55:32 -0800
committerGitHub <noreply@github.com>2023-02-16 13:55:32 -0800
commit4c4826d47eeef4675daae4ae53ff76f4d5ebd84a (patch)
treeed4af0ded878e4f06e9641ce61d26ffd7c89ccbc /tools
parenteda88e513e8b1e2abc05e9dc8555f237d96472df (diff)
Overhaul global inst deduplication and cpp/cuda backend. (#2654)
* Overhaul global inst deduplication and cpp/cuda backend. * Update IR documentation. --------- Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/gfx/d3d11/d3d11-device.cpp5
-rw-r--r--tools/gfx/renderer-shared.cpp5
2 files changed, 8 insertions, 2 deletions
diff --git a/tools/gfx/d3d11/d3d11-device.cpp b/tools/gfx/d3d11/d3d11-device.cpp
index f15c94da6..e32bdf7ed 100644
--- a/tools/gfx/d3d11/d3d11-device.cpp
+++ b/tools/gfx/d3d11/d3d11-device.cpp
@@ -1322,8 +1322,11 @@ Result DeviceImpl::createProgram(
if (diagnostics)
{
+ DebugMessageType msgType = DebugMessageType::Warning;
+ if (compileResult != SLANG_OK)
+ msgType = DebugMessageType::Error;
getDebugCallback()->handleMessage(
- compileResult == SLANG_OK ? DebugMessageType::Warning : DebugMessageType::Error,
+ msgType,
DebugMessageSource::Slang,
(char*)diagnostics->getBufferPointer());
if (outDiagnosticBlob)
diff --git a/tools/gfx/renderer-shared.cpp b/tools/gfx/renderer-shared.cpp
index 4a8fd04b6..445f22e5a 100644
--- a/tools/gfx/renderer-shared.cpp
+++ b/tools/gfx/renderer-shared.cpp
@@ -1008,8 +1008,11 @@ Result ShaderProgramBase::compileShaders(RendererBase* device)
entryPointIndex, 0, kernelCode.writeRef(), diagnostics.writeRef());
if (diagnostics)
{
+ DebugMessageType msgType = DebugMessageType::Warning;
+ if (compileResult != SLANG_OK)
+ msgType = DebugMessageType::Error;
getDebugCallback()->handleMessage(
- compileResult == SLANG_OK ? DebugMessageType::Warning : DebugMessageType::Error,
+ msgType,
DebugMessageSource::Slang,
(char*)diagnostics->getBufferPointer());
}