From 5445c4c8aabdb64e50906246324ede220e870e5d Mon Sep 17 00:00:00 2001 From: Giovanni Mascellani Date: Wed, 8 May 2024 11:19:28 +0200 Subject: [PATCH] vkd3d: Handle D3D12_FEATURE_D3D12_OPTIONS15 in CheckFeatureSupport(). --- include/vkd3d_d3d12.idl | 7 +++++++ libs/vkd3d/device.c | 17 +++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/include/vkd3d_d3d12.idl b/include/vkd3d_d3d12.idl index ecda1a40..35994c20 100644 --- a/include/vkd3d_d3d12.idl +++ b/include/vkd3d_d3d12.idl @@ -2454,6 +2454,12 @@ typedef struct D3D12_FEATURE_DATA_D3D12_OPTIONS14 BOOL IndependentFrontAndBackStencilRefMaskSupported; } D3D12_FEATURE_DATA_D3D12_OPTIONS14; +typedef struct D3D12_FEATURE_DATA_D3D12_OPTIONS15 +{ + BOOL TriangleFanSupported; + BOOL DynamicIndexBufferStripCutSupported; +} D3D12_FEATURE_DATA_D3D12_OPTIONS15; + typedef enum D3D12_FEATURE { D3D12_FEATURE_D3D12_OPTIONS = 0, @@ -2490,6 +2496,7 @@ typedef enum D3D12_FEATURE D3D12_FEATURE_D3D12_OPTIONS12 = 41, D3D12_FEATURE_D3D12_OPTIONS13 = 42, D3D12_FEATURE_D3D12_OPTIONS14 = 43, + D3D12_FEATURE_D3D12_OPTIONS15 = 44, } D3D12_FEATURE; typedef struct D3D12_MEMCPY_DEST diff --git a/libs/vkd3d/device.c b/libs/vkd3d/device.c index 58a58050..ba745e54 100644 --- a/libs/vkd3d/device.c +++ b/libs/vkd3d/device.c @@ -3938,6 +3938,23 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_CheckFeatureSupport(ID3D12Device9 return S_OK; } + case D3D12_FEATURE_D3D12_OPTIONS15: + { + D3D12_FEATURE_DATA_D3D12_OPTIONS15 *data = feature_data; + + if (feature_data_size != sizeof(*data)) + { + WARN("Invalid size %u.\n", feature_data_size); + } + + data->TriangleFanSupported = FALSE; + data->DynamicIndexBufferStripCutSupported = FALSE; + + TRACE("Triangle fan %#x.\n", data->TriangleFanSupported); + TRACE("Dynamic index buffer strip cut %#x.\n", data->DynamicIndexBufferStripCutSupported); + return S_OK; + } + default: FIXME("Unhandled feature %#x.\n", feature); return E_NOTIMPL;