diff options
Diffstat (limited to 'tools/gfx-unit-test')
7 files changed, 7 insertions, 7 deletions
diff --git a/tools/gfx-unit-test/buffer-barrier-test.cpp b/tools/gfx-unit-test/buffer-barrier-test.cpp index 2d53ac13f..b128448d2 100644 --- a/tools/gfx-unit-test/buffer-barrier-test.cpp +++ b/tools/gfx-unit-test/buffer-barrier-test.cpp @@ -146,6 +146,7 @@ void barrierTestImpl(IDevice* device, UnitTestContext* context) void barrierTestAPI(UnitTestContext* context, Slang::RenderApiFlag::Enum api) { + gfxEnableDebugLayer(context->enableDebugLayers); if ((api & context->enabledApis) == 0) { SLANG_IGNORE_TEST diff --git a/tools/gfx-unit-test/existing-device-handle-test.cpp b/tools/gfx-unit-test/existing-device-handle-test.cpp index 8b7a84ec2..5605bf8a5 100644 --- a/tools/gfx-unit-test/existing-device-handle-test.cpp +++ b/tools/gfx-unit-test/existing-device-handle-test.cpp @@ -83,6 +83,7 @@ void existingDeviceHandleTestImpl(IDevice* device, UnitTestContext* context) void existingDeviceHandleTestAPI(UnitTestContext* context, Slang::RenderApiFlag::Enum api) { + gfxEnableDebugLayer(context->enableDebugLayers); if ((api & context->enabledApis) == 0) { SLANG_IGNORE_TEST; diff --git a/tools/gfx-unit-test/get-buffer-resource-handle-test.cpp b/tools/gfx-unit-test/get-buffer-resource-handle-test.cpp index 97bb413fd..102986616 100644 --- a/tools/gfx-unit-test/get-buffer-resource-handle-test.cpp +++ b/tools/gfx-unit-test/get-buffer-resource-handle-test.cpp @@ -53,6 +53,7 @@ void getBufferResourceHandleTestImpl(IDevice* device, UnitTestContext* context) void getBufferResourceHandleTestAPI(UnitTestContext* context, Slang::RenderApiFlag::Enum api) { + gfxEnableDebugLayer(context->enableDebugLayers); if ((api & context->enabledApis) == 0) { SLANG_IGNORE_TEST; diff --git a/tools/gfx-unit-test/get-cmd-buffer-handle-test.cpp b/tools/gfx-unit-test/get-cmd-buffer-handle-test.cpp index b1e7ebc04..5c734f966 100644 --- a/tools/gfx-unit-test/get-cmd-buffer-handle-test.cpp +++ b/tools/gfx-unit-test/get-cmd-buffer-handle-test.cpp @@ -49,6 +49,7 @@ void getBufferHandleTestImpl(IDevice* device, UnitTestContext* context) void getBufferHandleTestAPI(UnitTestContext* context, Slang::RenderApiFlag::Enum api) { + gfxEnableDebugLayer(context->enableDebugLayers); if ((api & context->enabledApis) == 0) { SLANG_IGNORE_TEST; diff --git a/tools/gfx-unit-test/get-cmd-queue-handle-test.cpp b/tools/gfx-unit-test/get-cmd-queue-handle-test.cpp index 5e72c41d9..82561f4a2 100644 --- a/tools/gfx-unit-test/get-cmd-queue-handle-test.cpp +++ b/tools/gfx-unit-test/get-cmd-queue-handle-test.cpp @@ -38,6 +38,7 @@ void getQueueHandleTestImpl(IDevice* device, UnitTestContext* context) void getQueueHandleTestAPI(UnitTestContext* context, Slang::RenderApiFlag::Enum api) { + gfxEnableDebugLayer(context->enableDebugLayers); if ((api & context->enabledApis) == 0) { SLANG_IGNORE_TEST; diff --git a/tools/gfx-unit-test/get-texture-resource-handle-test.cpp b/tools/gfx-unit-test/get-texture-resource-handle-test.cpp index 4a7412ddc..1900b482e 100644 --- a/tools/gfx-unit-test/get-texture-resource-handle-test.cpp +++ b/tools/gfx-unit-test/get-texture-resource-handle-test.cpp @@ -50,6 +50,7 @@ void getTextureResourceHandleTestImpl(IDevice* device, UnitTestContext* context) void getTextureResourceHandleTestAPI(UnitTestContext* context, Slang::RenderApiFlag::Enum api) { + gfxEnableDebugLayer(context->enableDebugLayers); if ((api & context->enabledApis) == 0) { SLANG_IGNORE_TEST; diff --git a/tools/gfx-unit-test/gfx-test-util.cpp b/tools/gfx-unit-test/gfx-test-util.cpp index d7cfa0f65..bd1b2a891 100644 --- a/tools/gfx-unit-test/gfx-test-util.cpp +++ b/tools/gfx-unit-test/gfx-test-util.cpp @@ -323,13 +323,7 @@ Slang::ComPtr<gfx::IDevice> createTestingDevice( void* extDescPtrs[2] = {&extDesc, &slangExtDesc}; deviceDesc.extendedDescs = extDescPtrs; - // TODO: We should also set the debug callback - // (And in general reduce the differences (and duplication) between - // here and render-test-main.cpp) -#ifdef _DEBUG - gfx::gfxEnableDebugLayer(); -#endif - + gfx::gfxEnableDebugLayer(context->enableDebugLayers); auto createDeviceResult = gfxCreateDevice(&deviceDesc, device.writeRef()); if (SLANG_FAILED(createDeviceResult)) { |
