Conor McCarthy : vkd3d: Implement support for D3D12_FEATURE_ARCHITECTURE1.

Alexandre Julliard julliard at winehq.org
Fri May 22 13:46:41 CDT 2020


Module: vkd3d
Branch: master
Commit: fad3b127034ffb5eefc25e5504e53c27ae6cf986
URL:    https://source.winehq.org/git/vkd3d.git/?a=commit;h=fad3b127034ffb5eefc25e5504e53c27ae6cf986

Author: Conor McCarthy <conor.mccarthy.444 at gmail.com>
Date:   Fri May 22 16:45:15 2020 +0430

vkd3d: Implement support for D3D12_FEATURE_ARCHITECTURE1.

Signed-off-by: Conor McCarthy <conor.mccarthy.444 at gmail.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 include/vkd3d_d3d12.idl |  9 +++++++++
 libs/vkd3d/device.c     | 33 ++++++++++++++++++++++++++++++++-
 2 files changed, 41 insertions(+), 1 deletion(-)

diff --git a/include/vkd3d_d3d12.idl b/include/vkd3d_d3d12.idl
index 73a1012..ab7ab8a 100644
--- a/include/vkd3d_d3d12.idl
+++ b/include/vkd3d_d3d12.idl
@@ -1625,6 +1625,15 @@ typedef struct D3D12_FEATURE_DATA_D3D12_OPTIONS1
     BOOL Int64ShaderOps;
 }  D3D12_FEATURE_DATA_D3D12_OPTIONS1;
 
+typedef struct D3D12_FEATURE_DATA_ARCHITECTURE1
+{
+    UINT NodeIndex;
+    BOOL TileBasedRenderer;
+    BOOL UMA;
+    BOOL CacheCoherentUMA;
+    BOOL IsolatedMMU;
+}  D3D12_FEATURE_DATA_ARCHITECTURE1;
+
 typedef enum D3D12_FEATURE
 {
     D3D12_FEATURE_D3D12_OPTIONS = 0,
diff --git a/libs/vkd3d/device.c b/libs/vkd3d/device.c
index 9193fc3..9ed112e 100644
--- a/libs/vkd3d/device.c
+++ b/libs/vkd3d/device.c
@@ -2488,7 +2488,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_CheckFeatureSupport(ID3D12Device *
             data->TileBasedRenderer = FALSE;
 
             data->UMA = d3d12_device_is_uma(device, &coherent);
-            data->CacheCoherentUMA = data->UMA ? coherent : FALSE;
+            data->CacheCoherentUMA = data->UMA && coherent;
 
             TRACE("Tile based renderer %#x, UMA %#x, cache coherent UMA %#x.\n",
                     data->TileBasedRenderer, data->UMA, data->CacheCoherentUMA);
@@ -2714,6 +2714,37 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_CheckFeatureSupport(ID3D12Device *
             return S_OK;
         }
 
+        case D3D12_FEATURE_ARCHITECTURE1:
+        {
+            D3D12_FEATURE_DATA_ARCHITECTURE1 *data = feature_data;
+            bool coherent;
+
+            if (feature_data_size != sizeof(*data))
+            {
+                WARN("Invalid size %u.\n", feature_data_size);
+                return E_INVALIDARG;
+            }
+
+            if (data->NodeIndex)
+            {
+                FIXME("Multi-adapter not supported.\n");
+                return E_INVALIDARG;
+            }
+
+            WARN("Assuming device does not support tile based rendering.\n");
+            data->TileBasedRenderer = FALSE;
+
+            data->UMA = d3d12_device_is_uma(device, &coherent);
+            data->CacheCoherentUMA = data->UMA && coherent;
+
+            WARN("Assuming device does not have an isolated memory management unit.\n");
+            data->IsolatedMMU = FALSE;
+
+            TRACE("Tile based renderer %#x, UMA %#x, cache coherent UMA %#x, isolated MMU %#x.\n",
+                    data->TileBasedRenderer, data->UMA, data->CacheCoherentUMA, data->IsolatedMMU);
+            return S_OK;
+        }
+
         default:
             FIXME("Unhandled feature %#x.\n", feature);
             return E_NOTIMPL;




More information about the wine-cvs mailing list