summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authoraidanfnv <aidanf@nvidia.com>2025-04-11 18:47:32 -0700
committerGitHub <noreply@github.com>2025-04-12 01:47:32 +0000
commit28006e36d92f7709f7c5ad84d50d1c5584c42508 (patch)
treedb0044d7ff68189eda7023f91ffe497221b22ba2 /tools
parent6dd5bd52e3a5fb721776224e5e9a390d626faf26 (diff)
Add slang-test check for D3D11 double support (#6761)
Fixes #6171 This commit adds logic for reporting double support to the d3d11 backend, for running tests on GPUs that do not support D3D11_FEATURE_DOUBLES, and add checks for that support to tests that require the feature.
Diffstat (limited to 'tools')
-rw-r--r--tools/gfx/d3d11/d3d11-device.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/gfx/d3d11/d3d11-device.cpp b/tools/gfx/d3d11/d3d11-device.cpp
index ab4670a17..b101c6d13 100644
--- a/tools/gfx/d3d11/d3d11-device.cpp
+++ b/tools/gfx/d3d11/d3d11-device.cpp
@@ -267,6 +267,19 @@ SlangResult DeviceImpl::initialize(const Desc& desc)
#endif
}
+ // Check double precision support
+ {
+ D3D11_FEATURE_DATA_DOUBLES doublePrecisionFeature = {};
+ if (SUCCEEDED(m_device->CheckFeatureSupport(
+ D3D11_FEATURE_DOUBLES,
+ &doublePrecisionFeature,
+ sizeof(doublePrecisionFeature))) &&
+ doublePrecisionFeature.DoublePrecisionFloatShaderOps)
+ {
+ m_features.add("double");
+ }
+ }
+
{
// Create a TIMESTAMP_DISJOINT query object to query/update frequency info.
D3D11_QUERY_DESC disjointQueryDesc = {};