summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/render-test/options.cpp4
-rw-r--r--tools/render-test/options.h2
-rw-r--r--tools/render-test/render-test-main.cpp18
3 files changed, 24 insertions, 0 deletions
diff --git a/tools/render-test/options.cpp b/tools/render-test/options.cpp
index ce438046a..11b291c68 100644
--- a/tools/render-test/options.cpp
+++ b/tools/render-test/options.cpp
@@ -253,6 +253,10 @@ static rhi::DeviceType _toRenderType(Slang::RenderApiType apiType)
{
outOptions.enableBackendValidation = true;
}
+ else if (argValue == "-dx12-experimental")
+ {
+ outOptions.dx12Experimental = true;
+ }
else
{
// Lookup
diff --git a/tools/render-test/options.h b/tools/render-test/options.h
index 9a30030f7..c95edee21 100644
--- a/tools/render-test/options.h
+++ b/tools/render-test/options.h
@@ -89,6 +89,8 @@ struct Options
bool enableBackendValidation = false;
+ bool dx12Experimental = false;
+
Options() { downstreamArgs.addName("slang"); }
static SlangResult parse(
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");