Henri Verbeet : d3d11: Advertise support for shader model 4 compute shaders if compute shaders are supported.

Alexandre Julliard julliard at winehq.org
Thu Feb 18 16:06:07 CST 2021


Module: wine
Branch: master
Commit: 26ba84ad4dfaa143d7a87d67d4ac2f6a86e0b51b
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=26ba84ad4dfaa143d7a87d67d4ac2f6a86e0b51b

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Thu Feb 18 18:19:42 2021 +0100

d3d11: Advertise support for shader model 4 compute shaders if compute shaders are supported.

I.e., if we support shader model 5 compute shaders for feature level 11.0, we
also support shader model 4 compute shaders for feature level 10.x.

Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/d3d11/device.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
index 87bdd594d81..b0041c85881 100644
--- a/dlls/d3d11/device.c
+++ b/dlls/d3d11/device.c
@@ -3779,7 +3779,17 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CheckFeatureSupport(ID3D11Device2
                 return E_INVALIDARG;
             }
 
-            options->ComputeShaders_Plus_RawAndStructuredBuffers_Via_Shader_4_x = FALSE;
+            wined3d_mutex_lock();
+            hr = wined3d_device_get_device_caps(device->wined3d_device, &wined3d_caps);
+            wined3d_mutex_unlock();
+            if (FAILED(hr))
+            {
+                WARN("Failed to get device caps, hr %#x.\n", hr);
+                return hr;
+            }
+
+            options->ComputeShaders_Plus_RawAndStructuredBuffers_Via_Shader_4_x
+                    = wined3d_caps.max_feature_level >= WINED3D_FEATURE_LEVEL_11;
             return S_OK;
         }
 




More information about the wine-cvs mailing list