Chip Davis : d3d11: Introduce a function to convert D3D10 DSV dimensions to D3D11.

Alexandre Julliard julliard at winehq.org
Mon Apr 6 15:53:22 CDT 2020


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

Author: Chip Davis <cdavis at codeweavers.com>
Date:   Fri Apr  3 11:05:56 2020 -0500

d3d11: Introduce a function to convert D3D10 DSV dimensions to D3D11.

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

---

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

diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
index 4683ce5f3b..bc411b0b9f 100644
--- a/dlls/d3d11/device.c
+++ b/dlls/d3d11/device.c
@@ -5428,6 +5428,11 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateRenderTargetView(ID3D10Devic
     return S_OK;
 }
 
+static D3D11_DSV_DIMENSION d3d11_dsv_dimension_from_d3d10(D3D10_DSV_DIMENSION dim)
+{
+    return (D3D11_DSV_DIMENSION)dim;
+}
+
 static HRESULT STDMETHODCALLTYPE d3d10_device_CreateDepthStencilView(ID3D10Device1 *iface,
         ID3D10Resource *resource, const D3D10_DEPTH_STENCIL_VIEW_DESC *desc, ID3D10DepthStencilView **view)
 {
@@ -5442,7 +5447,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateDepthStencilView(ID3D10Devic
     if (desc)
     {
         d3d11_desc.Format = desc->Format;
-        d3d11_desc.ViewDimension = desc->ViewDimension;
+        d3d11_desc.ViewDimension = d3d11_dsv_dimension_from_d3d10(desc->ViewDimension);
         d3d11_desc.Flags = 0;
         memcpy(&d3d11_desc.u, &desc->u, sizeof(d3d11_desc.u));
     }




More information about the wine-cvs mailing list