Rebase against 887b445bb87861f2c11e6c5248d105c1fc52f125.

This commit is contained in:
Sebastian Lackner 2016-03-08 16:25:57 +01:00
parent 87f68ad2f4
commit 66ba61188b
3 changed files with 170 additions and 35 deletions

View File

@ -51,7 +51,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "fa6c255f8de4b28e6bdeadca8d27d226ddff48d7"
echo "887b445bb87861f2c11e6c5248d105c1fc52f125"
}
# Show version information
@ -3343,7 +3343,8 @@ fi
# |
# | Modified files:
# | * dlls/d3d11/device.c, dlls/d3d11/texture.c, dlls/d3d8/surface.c, dlls/d3d8/volume.c, dlls/d3d9/surface.c,
# | dlls/d3d9/volume.c, dlls/ddraw/surface.c, dlls/wined3d/resource.c, dlls/wined3d/wined3d.spec, include/wine/wined3d.h
# | dlls/d3d9/volume.c, dlls/ddraw/surface.c, dlls/wined3d/device.c, dlls/wined3d/resource.c, dlls/wined3d/surface.c,
# | dlls/wined3d/wined3d.spec, include/wine/wined3d.h
# |
if test "$enable_wined3d_resource_map" -eq 1; then
patch_apply wined3d-resource_map/0001-wined3d-Rename-wined3d_resource_-un-map-to-wined3d_r.patch

View File

@ -1,4 +1,4 @@
From e4f44b72b638d9404ad264565687a5d5c4b60b9b Mon Sep 17 00:00:00 2001
From 9627792f549907cfa050d89f464f7a19a1ef1c59 Mon Sep 17 00:00:00 2001
From: Christian Costa <titan.costa@gmail.com>
Date: Sun, 25 Oct 2015 12:50:31 +0100
Subject: wined3d: Print FIXME only once in surface_cpu_blt.
@ -8,11 +8,11 @@ Subject: wined3d: Print FIXME only once in surface_cpu_blt.
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index a8f7179..ca4fe5d 100644
index 814d4ab..8192c18 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -4660,7 +4660,8 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
&& (srcwidth != dstwidth || srcheight != dstheight))
@@ -4238,7 +4238,8 @@ static HRESULT surface_cpu_blt(struct wined3d_texture *dst_texture, unsigned int
&& (src_width != dst_width || src_height != dst_height))
{
/* Can happen when d3d9 apps do a StretchRect() call which isn't handled in GL. */
- FIXME("Filter %s not supported in software blit.\n", debug_d3dtexturefiltertype(filter));
@ -20,7 +20,7 @@ index a8f7179..ca4fe5d 100644
+ if (!once++) FIXME("Filter %s not supported in software blit.\n", debug_d3dtexturefiltertype(filter));
}
xinc = (srcwidth << 16) / dstwidth;
xinc = (src_width << 16) / dst_width;
--
2.6.2
2.7.1

View File

@ -1,4 +1,4 @@
From 93ac240a91cc8c02bafe7207ffdb64fe9f9945f9 Mon Sep 17 00:00:00 2001
From da658e5cdaf5731bfbf776f7c0e95c64c0d25f83 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Wed, 4 Nov 2015 19:31:30 +0100
Subject: wined3d: Rename wined3d_resource_(un)map to
@ -13,13 +13,15 @@ To avoid name conflicts in the CSMT patchset.
dlls/d3d9/surface.c | 4 ++--
dlls/d3d9/volume.c | 4 ++--
dlls/ddraw/surface.c | 14 +++++++-------
dlls/wined3d/device.c | 12 ++++++------
dlls/wined3d/resource.c | 4 ++--
dlls/wined3d/surface.c | 20 ++++++++++----------
dlls/wined3d/wined3d.spec | 4 ++--
include/wine/wined3d.h | 6 +++---
10 files changed, 28 insertions(+), 28 deletions(-)
12 files changed, 44 insertions(+), 44 deletions(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
index fb308d0..9658c21 100644
index 8b7d2f8..d9cb43d 100644
--- a/dlls/d3d11/device.c
+++ b/dlls/d3d11/device.c
@@ -267,7 +267,7 @@ static HRESULT STDMETHODCALLTYPE d3d11_immediate_context_Map(ID3D11DeviceContext
@ -81,10 +83,10 @@ index 11bda45..e24f945 100644
}
diff --git a/dlls/d3d8/surface.c b/dlls/d3d8/surface.c
index ec263b1..5100101 100644
index 565f642..c0f20eb 100644
--- a/dlls/d3d8/surface.c
+++ b/dlls/d3d8/surface.c
@@ -244,7 +244,7 @@ static HRESULT WINAPI d3d8_surface_LockRect(IDirect3DSurface8 *iface,
@@ -242,7 +242,7 @@ static HRESULT WINAPI d3d8_surface_LockRect(IDirect3DSurface8 *iface,
box.back = 1;
}
@ -93,7 +95,7 @@ index ec263b1..5100101 100644
&map_desc, rect ? &box : NULL, flags);
wined3d_mutex_unlock();
@@ -270,7 +270,7 @@ static HRESULT WINAPI d3d8_surface_UnlockRect(IDirect3DSurface8 *iface)
@@ -268,7 +268,7 @@ static HRESULT WINAPI d3d8_surface_UnlockRect(IDirect3DSurface8 *iface)
TRACE("iface %p.\n", iface);
wined3d_mutex_lock();
@ -103,10 +105,10 @@ index ec263b1..5100101 100644
switch(hr)
diff --git a/dlls/d3d8/volume.c b/dlls/d3d8/volume.c
index f26e424..d1ee0b5 100644
index f3a30a8..71a84ed 100644
--- a/dlls/d3d8/volume.c
+++ b/dlls/d3d8/volume.c
@@ -148,7 +148,7 @@ static HRESULT WINAPI d3d8_volume_LockBox(IDirect3DVolume8 *iface,
@@ -146,7 +146,7 @@ static HRESULT WINAPI d3d8_volume_LockBox(IDirect3DVolume8 *iface,
iface, locked_box, box, flags);
wined3d_mutex_lock();
@ -115,7 +117,7 @@ index f26e424..d1ee0b5 100644
&map_desc, (const struct wined3d_box *)box, flags);
wined3d_mutex_unlock();
@@ -167,7 +167,7 @@ static HRESULT WINAPI d3d8_volume_UnlockBox(IDirect3DVolume8 *iface)
@@ -165,7 +165,7 @@ static HRESULT WINAPI d3d8_volume_UnlockBox(IDirect3DVolume8 *iface)
TRACE("iface %p.\n", iface);
wined3d_mutex_lock();
@ -125,10 +127,10 @@ index f26e424..d1ee0b5 100644
return hr;
diff --git a/dlls/d3d9/surface.c b/dlls/d3d9/surface.c
index c3032dc..120f5c9 100644
index a0a1f27..8a718a8 100644
--- a/dlls/d3d9/surface.c
+++ b/dlls/d3d9/surface.c
@@ -251,7 +251,7 @@ static HRESULT WINAPI d3d9_surface_LockRect(IDirect3DSurface9 *iface,
@@ -249,7 +249,7 @@ static HRESULT WINAPI d3d9_surface_LockRect(IDirect3DSurface9 *iface,
}
wined3d_mutex_lock();
@ -137,7 +139,7 @@ index c3032dc..120f5c9 100644
&map_desc, rect ? &box : NULL, flags);
wined3d_mutex_unlock();
@@ -272,7 +272,7 @@ static HRESULT WINAPI d3d9_surface_UnlockRect(IDirect3DSurface9 *iface)
@@ -270,7 +270,7 @@ static HRESULT WINAPI d3d9_surface_UnlockRect(IDirect3DSurface9 *iface)
TRACE("iface %p.\n", iface);
wined3d_mutex_lock();
@ -147,10 +149,10 @@ index c3032dc..120f5c9 100644
switch(hr)
diff --git a/dlls/d3d9/volume.c b/dlls/d3d9/volume.c
index 52502bf..a81b6c7 100644
index d92f555..9a8ef54 100644
--- a/dlls/d3d9/volume.c
+++ b/dlls/d3d9/volume.c
@@ -148,7 +148,7 @@ static HRESULT WINAPI d3d9_volume_LockBox(IDirect3DVolume9 *iface,
@@ -146,7 +146,7 @@ static HRESULT WINAPI d3d9_volume_LockBox(IDirect3DVolume9 *iface,
iface, locked_box, box, flags);
wined3d_mutex_lock();
@ -159,7 +161,7 @@ index 52502bf..a81b6c7 100644
&map_desc, (const struct wined3d_box *)box, flags);
wined3d_mutex_unlock();
@@ -167,7 +167,7 @@ static HRESULT WINAPI d3d9_volume_UnlockBox(IDirect3DVolume9 *iface)
@@ -165,7 +165,7 @@ static HRESULT WINAPI d3d9_volume_UnlockBox(IDirect3DVolume9 *iface)
TRACE("iface %p.\n", iface);
wined3d_mutex_lock();
@ -169,7 +171,7 @@ index 52502bf..a81b6c7 100644
return hr;
diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
index 923a935..409fa32 100644
index d133e7e..09a3cca 100644
--- a/dlls/ddraw/surface.c
+++ b/dlls/ddraw/surface.c
@@ -984,7 +984,7 @@ static HRESULT surface_lock(struct ddraw_surface *surface,
@ -190,7 +192,7 @@ index 923a935..409fa32 100644
if (SUCCEEDED(hr) && surface->surface_desc.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE)
hr = ddraw_surface_update_frontbuffer(surface, &surface->ddraw->primary_lock, FALSE);
wined3d_mutex_unlock();
@@ -5134,7 +5134,7 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu
@@ -5177,7 +5177,7 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu
DDCKEY_SRCBLT, &src_desc->ddckCKSrcBlt);
}
@ -199,7 +201,7 @@ index 923a935..409fa32 100644
src_surface->sub_resource_idx, &src_map_desc, NULL, 0)))
{
ERR("Failed to lock source surface, hr %#x.\n", hr);
@@ -5142,11 +5142,11 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu
@@ -5185,11 +5185,11 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu
return D3DERR_TEXTURE_LOAD_FAILED;
}
@ -213,7 +215,7 @@ index 923a935..409fa32 100644
wined3d_mutex_unlock();
return D3DERR_TEXTURE_LOAD_FAILED;
}
@@ -5156,8 +5156,8 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu
@@ -5199,8 +5199,8 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu
else
memcpy(dst_map_desc.data, src_map_desc.data, src_map_desc.row_pitch * src_desc->dwHeight);
@ -224,11 +226,69 @@ index 923a935..409fa32 100644
}
if (src_surface->surface_desc.ddsCaps.dwCaps & DDSCAPS_MIPMAP)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index f094752..2330ebe 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -3570,7 +3570,7 @@ static HRESULT wined3d_device_update_texture_3d(struct wined3d_device *device,
for (i = 0; i < level_count; ++i)
{
- if (FAILED(hr = wined3d_resource_map(&src_texture->resource,
+ if (FAILED(hr = wined3d_resource_sub_resource_map(&src_texture->resource,
src_level + i, &src, NULL, WINED3D_MAP_READONLY)))
goto done;
@@ -3579,7 +3579,7 @@ static HRESULT wined3d_device_update_texture_3d(struct wined3d_device *device,
wined3d_volume_upload_data(dst_texture->sub_resources[i].u.volume, context, &data);
wined3d_volume_invalidate_location(dst_texture->sub_resources[i].u.volume, ~WINED3D_LOCATION_TEXTURE_RGB);
- if (FAILED(hr = wined3d_resource_unmap(&src_texture->resource, src_level + i)))
+ if (FAILED(hr = wined3d_resource_sub_resource_unmap(&src_texture->resource, src_level + i)))
goto done;
}
@@ -4236,7 +4236,7 @@ static struct wined3d_texture *wined3d_device_create_cursor_texture(struct wined
struct wined3d_texture *texture;
HRESULT hr;
- if (FAILED(wined3d_resource_map(&cursor_image->resource, sub_resource_idx, &map_desc, NULL, WINED3D_MAP_READONLY)))
+ if (FAILED(wined3d_resource_sub_resource_map(&cursor_image->resource, sub_resource_idx, &map_desc, NULL, WINED3D_MAP_READONLY)))
{
ERR("Failed to map source texture.\n");
return NULL;
@@ -4259,7 +4259,7 @@ static struct wined3d_texture *wined3d_device_create_cursor_texture(struct wined
hr = wined3d_texture_create(device, &desc, 1, WINED3D_TEXTURE_CREATE_MAPPABLE,
&data, NULL, &wined3d_null_parent_ops, &texture);
- wined3d_resource_unmap(&cursor_image->resource, sub_resource_idx);
+ wined3d_resource_sub_resource_unmap(&cursor_image->resource, sub_resource_idx);
if (FAILED(hr))
{
ERR("Failed to create cursor texture.\n");
@@ -4340,7 +4340,7 @@ HRESULT CDECL wined3d_device_set_cursor_properties(struct wined3d_device *device
return E_OUTOFMEMORY;
memset(mask_bits, 0xff, mask_size);
- wined3d_resource_map(&texture->resource, sub_resource_idx, &map_desc, NULL,
+ wined3d_resource_sub_resource_map(&texture->resource, sub_resource_idx, &map_desc, NULL,
WINED3D_MAP_NO_DIRTY_UPDATE | WINED3D_MAP_READONLY);
cursor_info.fIcon = FALSE;
cursor_info.xHotspot = x_hotspot;
@@ -4349,7 +4349,7 @@ HRESULT CDECL wined3d_device_set_cursor_properties(struct wined3d_device *device
cursor_image->resource.height, 1, 1, mask_bits);
cursor_info.hbmColor = CreateBitmap(cursor_image->resource.width,
cursor_image->resource.height, 1, 32, map_desc.data);
- wined3d_resource_unmap(&texture->resource, sub_resource_idx);
+ wined3d_resource_sub_resource_unmap(&texture->resource, sub_resource_idx);
/* Create our cursor and clean up. */
cursor = CreateIconIndirect(&cursor_info);
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
index a4936cf..44cdb43 100644
index 423d162..0821fde 100644
--- a/dlls/wined3d/resource.c
+++ b/dlls/wined3d/resource.c
@@ -305,7 +305,7 @@ void CDECL wined3d_resource_get_desc(const struct wined3d_resource *resource, st
@@ -302,7 +302,7 @@ void CDECL wined3d_resource_get_desc(const struct wined3d_resource *resource, st
desc->size = resource->size;
}
@ -237,7 +297,7 @@ index a4936cf..44cdb43 100644
struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags)
{
TRACE("resource %p, sub_resource_idx %u, map_desc %p, box %s, flags %#x.\n",
@@ -314,7 +314,7 @@ HRESULT CDECL wined3d_resource_map(struct wined3d_resource *resource, unsigned i
@@ -311,7 +311,7 @@ HRESULT CDECL wined3d_resource_map(struct wined3d_resource *resource, unsigned i
return resource->resource_ops->resource_sub_resource_map(resource, sub_resource_idx, map_desc, box, flags);
}
@ -246,11 +306,85 @@ index a4936cf..44cdb43 100644
{
TRACE("resource %p, sub_resource_idx %u.\n", resource, sub_resource_idx);
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 814d4ab..e156bd8 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -2005,25 +2005,25 @@ static struct wined3d_texture *surface_convert_format(struct wined3d_texture *sr
memset(&src_map, 0, sizeof(src_map));
memset(&dst_map, 0, sizeof(dst_map));
- if (FAILED(wined3d_resource_map(&src_texture->resource, sub_resource_idx,
+ if (FAILED(wined3d_resource_sub_resource_map(&src_texture->resource, sub_resource_idx,
&src_map, NULL, WINED3D_MAP_READONLY)))
{
ERR("Failed to map the source texture.\n");
wined3d_texture_decref(dst_texture);
return NULL;
}
- if (FAILED(wined3d_resource_map(&dst_texture->resource, 0, &dst_map, NULL, 0)))
+ if (FAILED(wined3d_resource_sub_resource_map(&dst_texture->resource, 0, &dst_map, NULL, 0)))
{
ERR("Failed to map the destination texture.\n");
- wined3d_resource_unmap(&src_texture->resource, sub_resource_idx);
+ wined3d_resource_sub_resource_unmap(&src_texture->resource, sub_resource_idx);
wined3d_texture_decref(dst_texture);
return NULL;
}
conv->convert(src_map.data, dst_map.data, src_map.row_pitch, dst_map.row_pitch, desc.width, desc.height);
- wined3d_resource_unmap(&dst_texture->resource, 0);
- wined3d_resource_unmap(&src_texture->resource, sub_resource_idx);
+ wined3d_resource_sub_resource_unmap(&dst_texture->resource, 0);
+ wined3d_resource_sub_resource_unmap(&src_texture->resource, sub_resource_idx);
return dst_texture;
}
@@ -4120,7 +4120,7 @@ static HRESULT surface_cpu_blt(struct wined3d_texture *dst_texture, unsigned int
if (src_texture == dst_texture && src_sub_resource_idx == dst_sub_resource_idx)
{
same_sub_resource = TRUE;
- wined3d_resource_map(&dst_texture->resource, dst_sub_resource_idx, &dst_map, NULL, 0);
+ wined3d_resource_sub_resource_map(&dst_texture->resource, dst_sub_resource_idx, &dst_map, NULL, 0);
src_map = dst_map;
src_format = dst_texture->resource.format;
dst_format = src_format;
@@ -4145,7 +4145,7 @@ static HRESULT surface_cpu_blt(struct wined3d_texture *dst_texture, unsigned int
src_texture = converted_texture;
src_sub_resource_idx = 0;
}
- wined3d_resource_map(&src_texture->resource, src_sub_resource_idx, &src_map, NULL, WINED3D_MAP_READONLY);
+ wined3d_resource_sub_resource_map(&src_texture->resource, src_sub_resource_idx, &src_map, NULL, WINED3D_MAP_READONLY);
src_format = src_texture->resource.format;
src_fmt_flags = src_texture->resource.format_flags;
}
@@ -4155,7 +4155,7 @@ static HRESULT surface_cpu_blt(struct wined3d_texture *dst_texture, unsigned int
src_fmt_flags = dst_fmt_flags;
}
- wined3d_resource_map(&dst_texture->resource, dst_sub_resource_idx, &dst_map, dst_box, 0);
+ wined3d_resource_sub_resource_map(&dst_texture->resource, dst_sub_resource_idx, &dst_map, dst_box, 0);
}
bpp = dst_format->byte_count;
@@ -4573,9 +4573,9 @@ error:
}
release:
- wined3d_resource_unmap(&dst_texture->resource, dst_sub_resource_idx);
+ wined3d_resource_sub_resource_unmap(&dst_texture->resource, dst_sub_resource_idx);
if (src_texture && !same_sub_resource)
- wined3d_resource_unmap(&src_texture->resource, src_sub_resource_idx);
+ wined3d_resource_sub_resource_unmap(&src_texture->resource, src_sub_resource_idx);
if (converted_texture)
wined3d_texture_decref(converted_texture);
diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec
index aa468d1..9d451a1 100644
index 247e4de..48e2016 100644
--- a/dlls/wined3d/wined3d.spec
+++ b/dlls/wined3d/wined3d.spec
@@ -182,10 +182,10 @@
@@ -181,10 +181,10 @@
@ cdecl wined3d_resource_get_desc(ptr ptr)
@ cdecl wined3d_resource_get_parent(ptr)
@ cdecl wined3d_resource_get_priority(ptr)
@ -264,10 +398,10 @@ index aa468d1..9d451a1 100644
@ cdecl wined3d_rendertarget_view_create(ptr ptr ptr ptr ptr)
@ cdecl wined3d_rendertarget_view_create_from_sub_resource(ptr long ptr ptr ptr)
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index 507d63f..50d3213 100644
index e678c39..f8636a2 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -2421,11 +2421,11 @@ void __cdecl wined3d_resource_get_desc(const struct wined3d_resource *resource,
@@ -2347,11 +2347,11 @@ void __cdecl wined3d_resource_get_desc(const struct wined3d_resource *resource,
struct wined3d_resource_desc *desc);
void * __cdecl wined3d_resource_get_parent(const struct wined3d_resource *resource);
DWORD __cdecl wined3d_resource_get_priority(const struct wined3d_resource *resource);
@ -283,5 +417,5 @@ index 507d63f..50d3213 100644
HRESULT __cdecl wined3d_rendertarget_view_create(const struct wined3d_rendertarget_view_desc *desc,
struct wined3d_resource *resource, void *parent, const struct wined3d_parent_ops *parent_ops,
--
2.7.0
2.7.1