From 28006e36d92f7709f7c5ad84d50d1c5584c42508 Mon Sep 17 00:00:00 2001 From: aidanfnv Date: Fri, 11 Apr 2025 18:47:32 -0700 Subject: 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. --- tools/gfx/d3d11/d3d11-device.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tools') 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 = {}; -- cgit v1.2.3