mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
Actually rebase against ac65e1540960e64ce29e40ec19e4eade8369d520.
This commit is contained in:
parent
eb40bf85d6
commit
03f7334e65
@ -1,18 +1,18 @@
|
||||
From a6a89266f71551cd6ee6b80dc758825957087a37 Mon Sep 17 00:00:00 2001
|
||||
From 7e0e8ea02fa2670a29e1c312f88205b870521a9e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 30 May 2015 02:55:03 +0200
|
||||
Subject: [PATCH] ddraw: Allow size and format conversions in
|
||||
IDirect3DTexture2::Load.
|
||||
|
||||
---
|
||||
dlls/ddraw/surface.c | 152 +++++++++++++++++++++++--------------------
|
||||
1 file changed, 81 insertions(+), 71 deletions(-)
|
||||
dlls/ddraw/surface.c | 153 +++++++++++++++++++++++--------------------
|
||||
1 file changed, 82 insertions(+), 71 deletions(-)
|
||||
|
||||
diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
|
||||
index 19a1ae3d2d2..ed46ff0534a 100644
|
||||
index f5c3528cfa4..a8b919c05c2 100644
|
||||
--- a/dlls/ddraw/surface.c
|
||||
+++ b/dlls/ddraw/surface.c
|
||||
@@ -5310,6 +5310,46 @@ static struct ddraw_surface *get_sub_mimaplevel(struct ddraw_surface *surface)
|
||||
@@ -5316,6 +5316,46 @@ static struct ddraw_surface *get_sub_mimaplevel(struct ddraw_surface *surface)
|
||||
return impl_from_IDirectDrawSurface7(next_level);
|
||||
}
|
||||
|
||||
@ -59,7 +59,7 @@ index 19a1ae3d2d2..ed46ff0534a 100644
|
||||
/*****************************************************************************
|
||||
* IDirect3DTexture2::Load
|
||||
*
|
||||
@@ -5331,7 +5371,7 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu
|
||||
@@ -5337,7 +5377,7 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu
|
||||
{
|
||||
struct ddraw_surface *dst_surface = impl_from_IDirect3DTexture2(iface);
|
||||
struct ddraw_surface *src_surface = unsafe_impl_from_IDirect3DTexture2(src_texture);
|
||||
@ -68,7 +68,7 @@ index 19a1ae3d2d2..ed46ff0534a 100644
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("iface %p, src_texture %p.\n", iface, src_texture);
|
||||
@@ -5344,90 +5384,61 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu
|
||||
@@ -5350,90 +5390,62 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu
|
||||
|
||||
wined3d_mutex_lock();
|
||||
|
||||
@ -184,7 +184,8 @@ index 19a1ae3d2d2..ed46ff0534a 100644
|
||||
|
||||
- wined3d_resource_unmap(dst_resource, dst_surface->sub_resource_idx);
|
||||
- wined3d_resource_unmap(src_resource, src_surface->sub_resource_idx);
|
||||
+ hr = wined3d_texture_blt(ddraw_surface_get_default_texture(dst_surface, DDRAW_SURFACE_WRITE),
|
||||
+ hr = wined3d_device_context_blt(dst_surface->ddraw->immediate_context,
|
||||
+ ddraw_surface_get_default_texture(dst_surface, DDRAW_SURFACE_WRITE),
|
||||
+ dst_surface->sub_resource_idx, &dst_rect,
|
||||
+ ddraw_surface_get_default_texture(src_surface, DDRAW_SURFACE_READ),
|
||||
+ src_surface->sub_resource_idx, &src_rect, 0, NULL, WINED3D_TEXF_LINEAR);
|
||||
@ -196,7 +197,7 @@ index 19a1ae3d2d2..ed46ff0534a 100644
|
||||
}
|
||||
|
||||
if (src_surface->surface_desc.ddsCaps.dwCaps & DDSCAPS_MIPMAP)
|
||||
@@ -5440,12 +5451,11 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu
|
||||
@@ -5446,12 +5458,11 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu
|
||||
else
|
||||
dst_surface = NULL;
|
||||
|
||||
@ -213,5 +214,5 @@ index 19a1ae3d2d2..ed46ff0534a 100644
|
||||
|
||||
wined3d_mutex_unlock();
|
||||
--
|
||||
2.20.1
|
||||
2.30.2
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user