From f77f46ebff0c305854d528fd8a81b1645be3ab10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20J=2E=20Est=C3=A9banez?= Date: Sun, 28 Jan 2024 12:43:58 +0100 Subject: [PATCH] Direct3D 12: Query support for 16-bit operations --- drivers/d3d12/d3d12_context.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/d3d12/d3d12_context.cpp b/drivers/d3d12/d3d12_context.cpp index 0ba3f591198..e8c2cfad26b 100644 --- a/drivers/d3d12/d3d12_context.cpp +++ b/drivers/d3d12/d3d12_context.cpp @@ -225,6 +225,13 @@ Error D3D12Context::_check_capabilities() { } } + D3D12_FEATURE_DATA_D3D12_OPTIONS4 options4 = {}; + res = md.device->CheckFeatureSupport(D3D12_FEATURE_D3D12_OPTIONS4, &options4, sizeof(options4)); + if (SUCCEEDED(res)) { + shader_capabilities.native_16bit_ops = options4.Native16BitShaderOpsSupported; + } + print_verbose(String(" 16-bit ops supported: ") + (shader_capabilities.native_16bit_ops ? "yes" : "no")); + D3D12_FEATURE_DATA_D3D12_OPTIONS6 options6 = {}; res = md.device->CheckFeatureSupport(D3D12_FEATURE_D3D12_OPTIONS6, &options6, sizeof(options6)); if (SUCCEEDED(res)) {