summaryrefslogtreecommitdiffstats
path: root/tools/render-test/render-test-main.cpp
diff options
context:
space:
mode:
authorJay Kwak <82421531+jkwak-work@users.noreply.github.com>2025-02-05 21:00:12 -0800
committerGitHub <noreply@github.com>2025-02-05 21:00:12 -0800
commit3527f0975f671a693a0b7c59d80c6749c385b841 (patch)
treee02b26d4f380f6c6e43541d7a59f55c40876895a /tools/render-test/render-test-main.cpp
parentd8a8559a5baebb81361b15cf86d28c9e8019b177 (diff)
Enable D3D12 experimental feature to use coopvec (#6290)
This commit enables "D3D12-experimenta-feature" in render-test. This is required to use CoopVec feature with dxcompiler.dll. But it is enabled only when "-dx12-experimental" is used, because it appears that DX12 becomes unstable when the experimental feature is enabled, which causes bunch of tests randomly failing.
Diffstat (limited to 'tools/render-test/render-test-main.cpp')
-rw-r--r--tools/render-test/render-test-main.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/tools/render-test/render-test-main.cpp b/tools/render-test/render-test-main.cpp
index a8bd00bd4..a167a4a27 100644
--- a/tools/render-test/render-test-main.cpp
+++ b/tools/render-test/render-test-main.cpp
@@ -13,6 +13,10 @@
#include "slang-support.h"
#include "window.h"
+#if defined(_WIN32)
+#include <d3d12.h>
+#endif
+
#include <slang-rhi.h>
#include <slang-rhi/acceleration-structure-utils.h>
#include <slang-rhi/shader-cursor.h>
@@ -1391,6 +1395,20 @@ static SlangResult _innerMain(
desc.requiredFeatures = requiredFeatureList.getBuffer();
desc.requiredFeatureCount = (int)requiredFeatureList.getCount();
+#if defined(_WIN32)
+ // When the experimental feature is enabled, things become unstable.
+ // It is enabled only when requested.
+ D3D12ExperimentalFeaturesDesc experimentalFD = {};
+ UUID features[1] = {D3D12ExperimentalShaderModels};
+ experimentalFD.featureCount = 1;
+ experimentalFD.featureIIDs = features;
+ experimentalFD.configurationStructs = nullptr;
+ experimentalFD.configurationStructSizes = nullptr;
+
+ if (options.dx12Experimental)
+ desc.next = &experimentalFD;
+#endif
+
// Look for args going to slang
{
const auto& args = options.downstreamArgs.getArgsByName("slang");