summaryrefslogtreecommitdiffstats
path: root/tools/gfx-unit-test/gfx-test-util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gfx-unit-test/gfx-test-util.cpp')
-rw-r--r--tools/gfx-unit-test/gfx-test-util.cpp29
1 files changed, 1 insertions, 28 deletions
diff --git a/tools/gfx-unit-test/gfx-test-util.cpp b/tools/gfx-unit-test/gfx-test-util.cpp
index b5a39a4f0..2e3efe09f 100644
--- a/tools/gfx-unit-test/gfx-test-util.cpp
+++ b/tools/gfx-unit-test/gfx-test-util.cpp
@@ -15,33 +15,6 @@ using Slang::ComPtr;
namespace gfx_test
{
-class DebugPrinter : public rhi::IDebugCallback
-{
-public:
- virtual SLANG_NO_THROW void SLANG_MCALL handleMessage(
- rhi::DebugMessageType type,
- rhi::DebugMessageSource source,
- const char* message) override
- {
- static const char* kTypeStrings[] = {"INFO", "WARN", "ERROR"};
- static const char* kSourceStrings[] = {"Layer", "Driver", "Slang"};
- if (type == rhi::DebugMessageType::Error)
- {
- fprintf(
- stderr,
- "[%s] (%s) %s\n",
- kTypeStrings[int(type)],
- kSourceStrings[int(source)],
- message);
- fflush(stderr);
- }
- }
- static DebugPrinter* getInstance()
- {
- static DebugPrinter instance;
- return &instance;
- }
-};
void diagnoseIfNeeded(slang::IBlob* diagnosticsBlob)
{
@@ -278,7 +251,7 @@ Slang::ComPtr<IDevice> createTestingDevice(
if (context->enableDebugLayers)
{
deviceDesc.enableValidation = context->enableDebugLayers;
- deviceDesc.debugCallback = DebugPrinter::getInstance();
+ deviceDesc.debugCallback = context->debugCallback;
}
D3D12DeviceExtendedDesc extDesc = {};