summaryrefslogtreecommitdiffstats
path: root/tools/gfx/cuda/render-cuda.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2021-04-29 14:19:51 -0700
committerGitHub <noreply@github.com>2021-04-29 14:19:51 -0700
commit2482271fffbe85efc1bd7efcf74a76f6ed436012 (patch)
tree707da083c8eda527b7c548d636cb884cf53c53eb /tools/gfx/cuda/render-cuda.cpp
parentad6f3070251f25cf022c231b8567d78e98061127 (diff)
`gfx` DebugCallback and debug layer. (#1822)
* `gfx` DebugCallback and debug layer.
Diffstat (limited to 'tools/gfx/cuda/render-cuda.cpp')
-rw-r--r--tools/gfx/cuda/render-cuda.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/gfx/cuda/render-cuda.cpp b/tools/gfx/cuda/render-cuda.cpp
index 14699915b..a6400789f 100644
--- a/tools/gfx/cuda/render-cuda.cpp
+++ b/tools/gfx/cuda/render-cuda.cpp
@@ -1883,7 +1883,10 @@ public:
(SlangInt)0, 0, kernelCode.writeRef(), diagnostics.writeRef());
if (diagnostics)
{
- // TODO: report compile error.
+ getDebugCallback()->handleMessage(
+ compileResult == SLANG_OK ? DebugMessageType::Warning : DebugMessageType::Error,
+ DebugMessageSource::Slang,
+ (char*)diagnostics->getBufferPointer());
}
SLANG_RETURN_ON_FAIL(compileResult);