From 5df7ada451a993efff2b80bb1af2d8c7579ba00b Mon Sep 17 00:00:00 2001 From: Ellie Hermaszewska Date: Sat, 29 Apr 2023 08:28:40 +0800 Subject: Minor tidyings around d3d usage (#2854) * Remove unused COM annotation * Move SLANG_ENABLE_DXBC_SUPPORT to slang.h * Add DX11 simple compute test * Remove unnecessary COM parameter annotation * Run compute smoke test for DX12 * Ignore d3d11 tests when we do not have fxc * Do not try to find NVAPI on Linux * Add some logs to .gitignore * Minor cleanups in d3d12 headers * Fix tautological comparison (due to integer overflow) * Limit OutputDebugStringA to Windows --- tools/gfx-unit-test/compute-smoke.cpp | 5 +++++ tools/gfx-unit-test/gfx-test-util.h | 6 ++++++ 2 files changed, 11 insertions(+) (limited to 'tools/gfx-unit-test') diff --git a/tools/gfx-unit-test/compute-smoke.cpp b/tools/gfx-unit-test/compute-smoke.cpp index 68925f1e0..5e14a2e00 100644 --- a/tools/gfx-unit-test/compute-smoke.cpp +++ b/tools/gfx-unit-test/compute-smoke.cpp @@ -97,6 +97,11 @@ namespace gfx_test Slang::makeArray(11.0f, 12.0f, 13.0f, 14.0f)); } + SLANG_UNIT_TEST(computeSmokeD3D12) + { + runTestImpl(computeSmokeTestImpl, unitTestContext, Slang::RenderApiFlag::D3D12); + } + SLANG_UNIT_TEST(computeSmokeD3D11) { runTestImpl(computeSmokeTestImpl, unitTestContext, Slang::RenderApiFlag::D3D11); diff --git a/tools/gfx-unit-test/gfx-test-util.h b/tools/gfx-unit-test/gfx-test-util.h index f829d6d12..22b9b2fd3 100644 --- a/tools/gfx-unit-test/gfx-test-util.h +++ b/tools/gfx-unit-test/gfx-test-util.h @@ -108,6 +108,12 @@ namespace gfx_test SLANG_IGNORE_TEST } #endif + // Skip d3d11 tests when we don't have DXBC support as they're bound to + // fail without a backend compiler + if (api == Slang::RenderApiFlag::D3D11 && !SLANG_ENABLE_DXBC_SUPPORT) + { + SLANG_IGNORE_TEST + } try { renderDocBeginFrame(); -- cgit v1.2.3