Henri Verbeet : d3d9: Introduce a helper to convert d3d9 texture filter types to wined3d types.

Alexandre Julliard julliard at winehq.org
Thu Apr 2 14:27:37 CDT 2020


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

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Thu Apr  2 15:22:57 2020 +0430

d3d9: Introduce a helper to convert d3d9 texture filter types to wined3d types.

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/d3d9/device.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c
index 993311e112..434ec8fb8f 100644
--- a/dlls/d3d9/device.c
+++ b/dlls/d3d9/device.c
@@ -551,6 +551,11 @@ void d3d9_caps_from_wined3dcaps(const struct d3d9 *d3d9, unsigned int adapter_or
     }
 }
 
+static enum wined3d_texture_filter_type wined3d_texture_filter_type_from_d3d(D3DTEXTUREFILTERTYPE type)
+{
+    return (enum wined3d_texture_filter_type)type;
+}
+
 static void device_reset_viewport_state(struct d3d9_device *device)
 {
     struct wined3d_viewport vp;
@@ -1829,8 +1834,8 @@ static HRESULT WINAPI d3d9_device_StretchRect(IDirect3DDevice9Ex *iface, IDirect
         }
     }
 
-    hr = wined3d_texture_blt(dst->wined3d_texture, dst->sub_resource_idx, dst_rect,
-            src->wined3d_texture, src->sub_resource_idx, src_rect, 0, NULL, filter);
+    hr = wined3d_texture_blt(dst->wined3d_texture, dst->sub_resource_idx, dst_rect, src->wined3d_texture,
+            src->sub_resource_idx, src_rect, 0, NULL, wined3d_texture_filter_type_from_d3d(filter));
     if (hr == WINEDDERR_INVALIDRECT)
         hr = D3DERR_INVALIDCALL;
     if (SUCCEEDED(hr) && dst->texture)




More information about the wine-cvs mailing list