diff options
Diffstat (limited to 'tools/gfx-unit-test')
| -rw-r--r-- | tools/gfx-unit-test/gfx-test-util.cpp | 7 | ||||
| -rw-r--r-- | tools/gfx-unit-test/shader-cache-tests.cpp | 3 |
2 files changed, 9 insertions, 1 deletions
diff --git a/tools/gfx-unit-test/gfx-test-util.cpp b/tools/gfx-unit-test/gfx-test-util.cpp index 5cbb30e71..fcebdda9f 100644 --- a/tools/gfx-unit-test/gfx-test-util.cpp +++ b/tools/gfx-unit-test/gfx-test-util.cpp @@ -239,6 +239,13 @@ namespace gfx_test void* extDescPtr = &extDesc; deviceDesc.extendedDescs = &extDescPtr; + // 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 + auto createDeviceResult = gfxCreateDevice(&deviceDesc, device.writeRef()); if (SLANG_FAILED(createDeviceResult)) { diff --git a/tools/gfx-unit-test/shader-cache-tests.cpp b/tools/gfx-unit-test/shader-cache-tests.cpp index e1607ac59..de699c2d6 100644 --- a/tools/gfx-unit-test/shader-cache-tests.cpp +++ b/tools/gfx-unit-test/shader-cache-tests.cpp @@ -141,7 +141,8 @@ namespace gfx_test [this, func] (IDevice* device, UnitTestContext* ctx) { this->device = device; - device->queryInterface(SLANG_UUID_IShaderCache, (void**)this->shaderCache.writeRef()); + SLANG_CHECK_ABORT(SLANG_SUCCEEDED( + device->queryInterface(SLANG_UUID_IShaderCache, (void**)this->shaderCache.writeRef()))); func(); this->device = nullptr; this->shaderCache = nullptr; |
