summaryrefslogtreecommitdiffstats
path: root/tools/gfx-unit-test
diff options
context:
space:
mode:
authorEllie Hermaszewska <ellieh@nvidia.com>2023-04-29 08:28:40 +0800
committerGitHub <noreply@github.com>2023-04-29 08:28:40 +0800
commit5df7ada451a993efff2b80bb1af2d8c7579ba00b (patch)
treed28dc6704e4f12ec68a1e9a32f6a1ee439888387 /tools/gfx-unit-test
parent2492ec59fb52c15d1658ab32f473521b40664168 (diff)
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
Diffstat (limited to 'tools/gfx-unit-test')
-rw-r--r--tools/gfx-unit-test/compute-smoke.cpp5
-rw-r--r--tools/gfx-unit-test/gfx-test-util.h6
2 files changed, 11 insertions, 0 deletions
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<float>(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();