Rebase against e254680ed15f43409114881d8ed613aa4b0de944.

This commit is contained in:
Zebediah Figura
2022-04-15 19:28:24 -05:00
parent ccce92e0d3
commit 2aab2d521a
7 changed files with 58 additions and 58 deletions

View File

@@ -1,4 +1,4 @@
From 7e0e8ea02fa2670a29e1c312f88205b870521a9e Mon Sep 17 00:00:00 2001
From e2505b43f26d0517aad97c2778958886568ad58b 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
@@ -9,10 +9,10 @@ Subject: [PATCH] ddraw: Allow size and format conversions in
1 file changed, 82 insertions(+), 71 deletions(-)
diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
index f5c3528cfa4..a8b919c05c2 100644
index 421ce68fa1c..b2c674eba7a 100644
--- a/dlls/ddraw/surface.c
+++ b/dlls/ddraw/surface.c
@@ -5316,6 +5316,46 @@ static struct ddraw_surface *get_sub_mimaplevel(struct ddraw_surface *surface)
@@ -5321,6 +5321,46 @@ static struct ddraw_surface *get_sub_mimaplevel(struct ddraw_surface *surface)
return impl_from_IDirectDrawSurface7(next_level);
}
@@ -59,7 +59,7 @@ index f5c3528cfa4..a8b919c05c2 100644
/*****************************************************************************
* IDirect3DTexture2::Load
*
@@ -5337,7 +5377,7 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu
@@ -5342,7 +5382,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 f5c3528cfa4..a8b919c05c2 100644
HRESULT hr;
TRACE("iface %p, src_texture %p.\n", iface, src_texture);
@@ -5350,90 +5390,62 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu
@@ -5355,90 +5395,62 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu
wined3d_mutex_lock();
@@ -159,7 +159,7 @@ index f5c3528cfa4..a8b919c05c2 100644
- if (FAILED(hr = wined3d_resource_map(src_resource,
- src_surface->sub_resource_idx, &src_map_desc, NULL, WINED3D_MAP_READ)))
- {
- ERR("Failed to lock source surface, hr %#x.\n", hr);
- ERR("Failed to lock source surface, hr %#lx.\n", hr);
- wined3d_mutex_unlock();
- return D3DERR_TEXTURE_LOAD_FAILED;
- }
@@ -167,7 +167,7 @@ index f5c3528cfa4..a8b919c05c2 100644
- if (FAILED(hr = wined3d_resource_map(dst_resource,
- dst_surface->sub_resource_idx, &dst_map_desc, NULL, WINED3D_MAP_WRITE)))
- {
- ERR("Failed to lock destination surface, hr %#x.\n", hr);
- ERR("Failed to lock destination surface, hr %#lx.\n", hr);
- wined3d_resource_unmap(src_resource, src_surface->sub_resource_idx);
- wined3d_mutex_unlock();
- return D3DERR_TEXTURE_LOAD_FAILED;
@@ -191,13 +191,13 @@ index f5c3528cfa4..a8b919c05c2 100644
+ src_surface->sub_resource_idx, &src_rect, 0, NULL, WINED3D_TEXF_LINEAR);
+ if (FAILED(hr))
+ {
+ ERR("Failed to blit surface, hr %#x.\n", hr);
+ ERR("Failed to blit surface, hr %#lx.\n", hr);
+ wined3d_mutex_unlock();
+ return hr;
}
if (src_surface->surface_desc.ddsCaps.dwCaps & DDSCAPS_MIPMAP)
@@ -5446,12 +5458,11 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu
@@ -5451,12 +5463,11 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu
else
dst_surface = NULL;
@@ -214,5 +214,5 @@ index f5c3528cfa4..a8b919c05c2 100644
wined3d_mutex_unlock();
--
2.30.2
2.34.1