mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-09-13 09:17:20 -07:00
Removed patch to rename wined3d_resource_(un)map to wined3d_resource_sub_resource_(un)map.
The patch was initially added for compatibility with the old CSMT patchset.
This commit is contained in:
parent
16975cdd43
commit
1e7df1a0d8
@ -155,7 +155,7 @@ index 6a07cd7..cacf14c 100644
|
||||
+ return E_FAIL;
|
||||
+ }
|
||||
|
||||
- if (FAILED(hr = wined3d_resource_sub_resource_map(src_resource,
|
||||
- if (FAILED(hr = wined3d_resource_map(src_resource,
|
||||
- src_surface->sub_resource_idx, &src_map_desc, NULL, 0)))
|
||||
- {
|
||||
- ERR("Failed to lock source surface, hr %#x.\n", hr);
|
||||
@ -163,11 +163,11 @@ index 6a07cd7..cacf14c 100644
|
||||
- return D3DERR_TEXTURE_LOAD_FAILED;
|
||||
- }
|
||||
-
|
||||
- if (FAILED(hr = wined3d_resource_sub_resource_map(dst_resource,
|
||||
- if (FAILED(hr = wined3d_resource_map(dst_resource,
|
||||
- dst_surface->sub_resource_idx, &dst_map_desc, NULL, 0)))
|
||||
- {
|
||||
- ERR("Failed to lock destination surface, hr %#x.\n", hr);
|
||||
- wined3d_resource_sub_resource_unmap(src_resource, src_surface->sub_resource_idx);
|
||||
- wined3d_resource_unmap(src_resource, src_surface->sub_resource_idx);
|
||||
- wined3d_mutex_unlock();
|
||||
- return D3DERR_TEXTURE_LOAD_FAILED;
|
||||
- }
|
||||
@ -181,8 +181,8 @@ index 6a07cd7..cacf14c 100644
|
||||
+ SetRect(&src_rect, 0, 0, src_surface->surface_desc.dwWidth, src_surface->surface_desc.dwHeight);
|
||||
+ SetRect(&dst_rect, 0, 0, dst_surface->surface_desc.dwWidth, dst_surface->surface_desc.dwHeight);
|
||||
|
||||
- wined3d_resource_sub_resource_unmap(dst_resource, dst_surface->sub_resource_idx);
|
||||
- wined3d_resource_sub_resource_unmap(src_resource, src_surface->sub_resource_idx);
|
||||
- wined3d_resource_unmap(dst_resource, dst_surface->sub_resource_idx);
|
||||
- wined3d_resource_unmap(src_resource, src_surface->sub_resource_idx);
|
||||
+ hr = wined3d_texture_blt(dst_surface->wined3d_texture, dst_surface->sub_resource_idx, &dst_rect,
|
||||
+ src_surface->wined3d_texture, src_surface->sub_resource_idx, &src_rect,
|
||||
+ 0, NULL, WINED3D_TEXF_LINEAR);
|
||||
|
@ -1,2 +1 @@
|
||||
Fixes: Fix scaling behaviour of images and mipmap levels in IDirect3DTexture2_Load (needed for example by Prezzie Hunt)
|
||||
Depends: wined3d-resource_map
|
||||
|
@ -364,7 +364,6 @@ patch_enable_all ()
|
||||
enable_wined3d_Limit_Vram="$1"
|
||||
enable_wined3d_Revert_PixelFormat="$1"
|
||||
enable_wined3d_Silence_FIXMEs="$1"
|
||||
enable_wined3d_resource_map="$1"
|
||||
enable_winedevice_Fix_Relocation="$1"
|
||||
enable_winemenubuilder_Desktop_Icon_Path="$1"
|
||||
enable_winepulse_PulseAudio_Support="$1"
|
||||
@ -1265,9 +1264,6 @@ patch_enable ()
|
||||
wined3d-Silence_FIXMEs)
|
||||
enable_wined3d_Silence_FIXMEs="$2"
|
||||
;;
|
||||
wined3d-resource_map)
|
||||
enable_wined3d_resource_map="$2"
|
||||
;;
|
||||
winedevice-Fix_Relocation)
|
||||
enable_winedevice_Fix_Relocation="$2"
|
||||
;;
|
||||
@ -2001,13 +1997,9 @@ if test "$enable_wined3d_CSMT_Helper" -eq 1; then
|
||||
if test "$enable_wined3d_DXTn" -gt 1; then
|
||||
abort "Patchset wined3d-DXTn disabled, but wined3d-CSMT_Helper depends on that."
|
||||
fi
|
||||
if test "$enable_wined3d_resource_map" -gt 1; then
|
||||
abort "Patchset wined3d-resource_map disabled, but wined3d-CSMT_Helper depends on that."
|
||||
fi
|
||||
enable_makedep_PARENTSPEC=1
|
||||
enable_ntdll_DllRedirects=1
|
||||
enable_wined3d_DXTn=1
|
||||
enable_wined3d_resource_map=1
|
||||
fi
|
||||
|
||||
if test "$enable_uxtheme_GTK_Theming" -eq 1; then
|
||||
@ -2279,13 +2271,6 @@ if test "$enable_dsound_EAX" -eq 1; then
|
||||
enable_dsound_Revert_Cleanup=1
|
||||
fi
|
||||
|
||||
if test "$enable_ddraw_IDirect3DTexture2_Load" -eq 1; then
|
||||
if test "$enable_wined3d_resource_map" -gt 1; then
|
||||
abort "Patchset wined3d-resource_map disabled, but ddraw-IDirect3DTexture2_Load depends on that."
|
||||
fi
|
||||
enable_wined3d_resource_map=1
|
||||
fi
|
||||
|
||||
if test "$enable_d3dx9_36_D3DXDisassembleShader" -eq 1; then
|
||||
if test "$enable_d3dx9_36_GetShaderSemantics" -gt 1; then
|
||||
abort "Patchset d3dx9_36-GetShaderSemantics disabled, but d3dx9_36-D3DXDisassembleShader depends on that."
|
||||
@ -3312,25 +3297,8 @@ if test "$enable_ddraw_Fix_Typos" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-resource_map
|
||||
# |
|
||||
# | 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/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
|
||||
(
|
||||
echo '+ { "Sebastian Lackner", "wined3d: Rename wined3d_resource_(un)map to wined3d_resource_sub_resource_(un)map.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset ddraw-IDirect3DTexture2_Load
|
||||
# |
|
||||
# | This patchset has the following (direct or indirect) dependencies:
|
||||
# | * wined3d-resource_map
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/ddraw/surface.c, dlls/ddraw/tests/d3d.c, dlls/ddraw/tests/ddraw2.c
|
||||
# |
|
||||
@ -7221,8 +7189,7 @@ fi
|
||||
# Patchset wined3d-CSMT_Helper
|
||||
# |
|
||||
# | This patchset has the following (direct or indirect) dependencies:
|
||||
# | * makedep-PARENTSPEC, ntdll-DllOverrides_WOW64, ntdll-Loader_Machine_Type, ntdll-DllRedirects, wined3d-DXTn, wined3d-
|
||||
# | resource_map
|
||||
# | * makedep-PARENTSPEC, ntdll-DllOverrides_WOW64, ntdll-Loader_Machine_Type, ntdll-DllRedirects, wined3d-DXTn
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * configure.ac, dlls/wined3d-csmt/Makefile.in, dlls/wined3d-csmt/version.rc, dlls/wined3d/wined3d_main.c
|
||||
|
@ -1,4 +1,3 @@
|
||||
Depends: wined3d-DXTn
|
||||
Depends: wined3d-resource_map
|
||||
Depends: makedep-PARENTSPEC
|
||||
Depends: ntdll-DllRedirects
|
||||
|
@ -1,428 +0,0 @@
|
||||
From 70aa91068703ddf7f6edb982f1a1c37482df7dcf 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
|
||||
wined3d_resource_sub_resource_(un)map.
|
||||
|
||||
To avoid name conflicts in the CSMT patchset.
|
||||
---
|
||||
dlls/d3d11/device.c | 4 ++--
|
||||
dlls/d3d11/texture.c | 8 ++++----
|
||||
dlls/d3d8/surface.c | 4 ++--
|
||||
dlls/d3d8/volume.c | 4 ++--
|
||||
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 +++---
|
||||
12 files changed, 44 insertions(+), 44 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
|
||||
index f0bb52e..b804bc4 100644
|
||||
--- a/dlls/d3d11/device.c
|
||||
+++ b/dlls/d3d11/device.c
|
||||
@@ -273,7 +273,7 @@ static HRESULT STDMETHODCALLTYPE d3d11_immediate_context_Map(ID3D11DeviceContext
|
||||
wined3d_resource = wined3d_resource_from_d3d11_resource(resource);
|
||||
|
||||
wined3d_mutex_lock();
|
||||
- hr = wined3d_resource_map(wined3d_resource, subresource_idx,
|
||||
+ hr = wined3d_resource_sub_resource_map(wined3d_resource, subresource_idx,
|
||||
&map_desc, NULL, wined3d_map_flags_from_d3d11_map_type(map_type));
|
||||
wined3d_mutex_unlock();
|
||||
|
||||
@@ -294,7 +294,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_Unmap(ID3D11DeviceContext
|
||||
wined3d_resource = wined3d_resource_from_d3d11_resource(resource);
|
||||
|
||||
wined3d_mutex_lock();
|
||||
- wined3d_resource_unmap(wined3d_resource, subresource_idx);
|
||||
+ wined3d_resource_sub_resource_unmap(wined3d_resource, subresource_idx);
|
||||
wined3d_mutex_unlock();
|
||||
}
|
||||
|
||||
diff --git a/dlls/d3d11/texture.c b/dlls/d3d11/texture.c
|
||||
index c6cdc29..a3f56b8 100644
|
||||
--- a/dlls/d3d11/texture.c
|
||||
+++ b/dlls/d3d11/texture.c
|
||||
@@ -366,7 +366,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_texture2d_Map(ID3D10Texture2D *iface, UIN
|
||||
FIXME("Ignoring map_flags %#x.\n", map_flags);
|
||||
|
||||
wined3d_mutex_lock();
|
||||
- if (SUCCEEDED(hr = wined3d_resource_map(wined3d_texture_get_resource(texture->wined3d_texture), sub_resource_idx,
|
||||
+ if (SUCCEEDED(hr = wined3d_resource_sub_resource_map(wined3d_texture_get_resource(texture->wined3d_texture), sub_resource_idx,
|
||||
&wined3d_map_desc, NULL, wined3d_map_flags_from_d3d11_map_type(map_type))))
|
||||
{
|
||||
mapped_texture->pData = wined3d_map_desc.data;
|
||||
@@ -384,7 +384,7 @@ static void STDMETHODCALLTYPE d3d10_texture2d_Unmap(ID3D10Texture2D *iface, UINT
|
||||
TRACE("iface %p, sub_resource_idx %u.\n", iface, sub_resource_idx);
|
||||
|
||||
wined3d_mutex_lock();
|
||||
- wined3d_resource_unmap(wined3d_texture_get_resource(texture->wined3d_texture), sub_resource_idx);
|
||||
+ wined3d_resource_sub_resource_unmap(wined3d_texture_get_resource(texture->wined3d_texture), sub_resource_idx);
|
||||
wined3d_mutex_unlock();
|
||||
}
|
||||
|
||||
@@ -825,7 +825,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_texture3d_Map(ID3D10Texture3D *iface, UIN
|
||||
FIXME("Ignoring map_flags %#x.\n", map_flags);
|
||||
|
||||
wined3d_mutex_lock();
|
||||
- if (SUCCEEDED(hr = wined3d_resource_map(wined3d_texture_get_resource(texture->wined3d_texture), sub_resource_idx,
|
||||
+ if (SUCCEEDED(hr = wined3d_resource_sub_resource_map(wined3d_texture_get_resource(texture->wined3d_texture), sub_resource_idx,
|
||||
&wined3d_map_desc, NULL, wined3d_map_flags_from_d3d11_map_type(map_type))))
|
||||
{
|
||||
mapped_texture->pData = wined3d_map_desc.data;
|
||||
@@ -844,7 +844,7 @@ static void STDMETHODCALLTYPE d3d10_texture3d_Unmap(ID3D10Texture3D *iface, UINT
|
||||
TRACE("iface %p, sub_resource_idx %u.\n", iface, sub_resource_idx);
|
||||
|
||||
wined3d_mutex_lock();
|
||||
- wined3d_resource_unmap(wined3d_texture_get_resource(texture->wined3d_texture), sub_resource_idx);
|
||||
+ wined3d_resource_sub_resource_unmap(wined3d_texture_get_resource(texture->wined3d_texture), sub_resource_idx);
|
||||
wined3d_mutex_unlock();
|
||||
}
|
||||
|
||||
diff --git a/dlls/d3d8/surface.c b/dlls/d3d8/surface.c
|
||||
index 565f642..c0f20eb 100644
|
||||
--- a/dlls/d3d8/surface.c
|
||||
+++ b/dlls/d3d8/surface.c
|
||||
@@ -242,7 +242,7 @@ static HRESULT WINAPI d3d8_surface_LockRect(IDirect3DSurface8 *iface,
|
||||
box.back = 1;
|
||||
}
|
||||
|
||||
- hr = wined3d_resource_map(wined3d_texture_get_resource(surface->wined3d_texture), surface->sub_resource_idx,
|
||||
+ hr = wined3d_resource_sub_resource_map(wined3d_texture_get_resource(surface->wined3d_texture), surface->sub_resource_idx,
|
||||
&map_desc, rect ? &box : NULL, flags);
|
||||
wined3d_mutex_unlock();
|
||||
|
||||
@@ -268,7 +268,7 @@ static HRESULT WINAPI d3d8_surface_UnlockRect(IDirect3DSurface8 *iface)
|
||||
TRACE("iface %p.\n", iface);
|
||||
|
||||
wined3d_mutex_lock();
|
||||
- hr = wined3d_resource_unmap(wined3d_texture_get_resource(surface->wined3d_texture), surface->sub_resource_idx);
|
||||
+ hr = wined3d_resource_sub_resource_unmap(wined3d_texture_get_resource(surface->wined3d_texture), surface->sub_resource_idx);
|
||||
wined3d_mutex_unlock();
|
||||
|
||||
switch(hr)
|
||||
diff --git a/dlls/d3d8/volume.c b/dlls/d3d8/volume.c
|
||||
index fb3afb3..a0095e2 100644
|
||||
--- a/dlls/d3d8/volume.c
|
||||
+++ b/dlls/d3d8/volume.c
|
||||
@@ -146,7 +146,7 @@ static HRESULT WINAPI d3d8_volume_LockBox(IDirect3DVolume8 *iface,
|
||||
iface, locked_box, box, flags);
|
||||
|
||||
wined3d_mutex_lock();
|
||||
- if (FAILED(hr = wined3d_resource_map(wined3d_texture_get_resource(volume->wined3d_texture),
|
||||
+ if (FAILED(hr = wined3d_resource_sub_resource_map(wined3d_texture_get_resource(volume->wined3d_texture),
|
||||
volume->sub_resource_idx, &map_desc, (const struct wined3d_box *)box, flags)))
|
||||
map_desc.data = NULL;
|
||||
wined3d_mutex_unlock();
|
||||
@@ -166,7 +166,7 @@ static HRESULT WINAPI d3d8_volume_UnlockBox(IDirect3DVolume8 *iface)
|
||||
TRACE("iface %p.\n", iface);
|
||||
|
||||
wined3d_mutex_lock();
|
||||
- hr = wined3d_resource_unmap(wined3d_texture_get_resource(volume->wined3d_texture), volume->sub_resource_idx);
|
||||
+ hr = wined3d_resource_sub_resource_unmap(wined3d_texture_get_resource(volume->wined3d_texture), volume->sub_resource_idx);
|
||||
wined3d_mutex_unlock();
|
||||
|
||||
if (hr == WINEDDERR_NOTLOCKED)
|
||||
diff --git a/dlls/d3d9/surface.c b/dlls/d3d9/surface.c
|
||||
index a0a1f27..8a718a8 100644
|
||||
--- a/dlls/d3d9/surface.c
|
||||
+++ b/dlls/d3d9/surface.c
|
||||
@@ -249,7 +249,7 @@ static HRESULT WINAPI d3d9_surface_LockRect(IDirect3DSurface9 *iface,
|
||||
}
|
||||
|
||||
wined3d_mutex_lock();
|
||||
- hr = wined3d_resource_map(wined3d_texture_get_resource(surface->wined3d_texture), surface->sub_resource_idx,
|
||||
+ hr = wined3d_resource_sub_resource_map(wined3d_texture_get_resource(surface->wined3d_texture), surface->sub_resource_idx,
|
||||
&map_desc, rect ? &box : NULL, flags);
|
||||
wined3d_mutex_unlock();
|
||||
|
||||
@@ -270,7 +270,7 @@ static HRESULT WINAPI d3d9_surface_UnlockRect(IDirect3DSurface9 *iface)
|
||||
TRACE("iface %p.\n", iface);
|
||||
|
||||
wined3d_mutex_lock();
|
||||
- hr = wined3d_resource_unmap(wined3d_texture_get_resource(surface->wined3d_texture), surface->sub_resource_idx);
|
||||
+ hr = wined3d_resource_sub_resource_unmap(wined3d_texture_get_resource(surface->wined3d_texture), surface->sub_resource_idx);
|
||||
wined3d_mutex_unlock();
|
||||
|
||||
switch(hr)
|
||||
diff --git a/dlls/d3d9/volume.c b/dlls/d3d9/volume.c
|
||||
index 0346f98..5b01fa7 100644
|
||||
--- a/dlls/d3d9/volume.c
|
||||
+++ b/dlls/d3d9/volume.c
|
||||
@@ -146,7 +146,7 @@ static HRESULT WINAPI d3d9_volume_LockBox(IDirect3DVolume9 *iface,
|
||||
iface, locked_box, box, flags);
|
||||
|
||||
wined3d_mutex_lock();
|
||||
- if (FAILED(hr = wined3d_resource_map(wined3d_texture_get_resource(volume->wined3d_texture),
|
||||
+ if (FAILED(hr = wined3d_resource_sub_resource_map(wined3d_texture_get_resource(volume->wined3d_texture),
|
||||
volume->sub_resource_idx, &map_desc, (const struct wined3d_box *)box, flags)))
|
||||
map_desc.data = NULL;
|
||||
wined3d_mutex_unlock();
|
||||
@@ -166,7 +166,7 @@ static HRESULT WINAPI d3d9_volume_UnlockBox(IDirect3DVolume9 *iface)
|
||||
TRACE("iface %p.\n", iface);
|
||||
|
||||
wined3d_mutex_lock();
|
||||
- hr = wined3d_resource_unmap(wined3d_texture_get_resource(volume->wined3d_texture), volume->sub_resource_idx);
|
||||
+ hr = wined3d_resource_sub_resource_unmap(wined3d_texture_get_resource(volume->wined3d_texture), volume->sub_resource_idx);
|
||||
wined3d_mutex_unlock();
|
||||
|
||||
if (hr == WINEDDERR_NOTLOCKED)
|
||||
diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
|
||||
index 83457fc..7f51a1d 100644
|
||||
--- a/dlls/ddraw/surface.c
|
||||
+++ b/dlls/ddraw/surface.c
|
||||
@@ -991,7 +991,7 @@ static HRESULT surface_lock(struct ddraw_surface *surface,
|
||||
if (surface->surface_desc.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE)
|
||||
hr = ddraw_surface_update_frontbuffer(surface, rect, TRUE);
|
||||
if (SUCCEEDED(hr))
|
||||
- hr = wined3d_resource_map(wined3d_texture_get_resource(surface->wined3d_texture),
|
||||
+ hr = wined3d_resource_sub_resource_map(wined3d_texture_get_resource(surface->wined3d_texture),
|
||||
surface->sub_resource_idx, &map_desc, rect ? &box : NULL, flags);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
@@ -1166,7 +1166,7 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_Unlock(IDirectDrawSurface
|
||||
TRACE("iface %p, rect %s.\n", iface, wine_dbgstr_rect(pRect));
|
||||
|
||||
wined3d_mutex_lock();
|
||||
- hr = wined3d_resource_unmap(wined3d_texture_get_resource(surface->wined3d_texture), surface->sub_resource_idx);
|
||||
+ hr = wined3d_resource_sub_resource_unmap(wined3d_texture_get_resource(surface->wined3d_texture), surface->sub_resource_idx);
|
||||
if (SUCCEEDED(hr) && surface->surface_desc.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE)
|
||||
hr = ddraw_surface_update_frontbuffer(surface, &surface->ddraw->primary_lock, FALSE);
|
||||
wined3d_mutex_unlock();
|
||||
@@ -5177,7 +5177,7 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu
|
||||
DDCKEY_SRCBLT, &src_desc->ddckCKSrcBlt);
|
||||
}
|
||||
|
||||
- if (FAILED(hr = wined3d_resource_map(src_resource,
|
||||
+ if (FAILED(hr = wined3d_resource_sub_resource_map(src_resource,
|
||||
src_surface->sub_resource_idx, &src_map_desc, NULL, 0)))
|
||||
{
|
||||
ERR("Failed to lock source surface, hr %#x.\n", hr);
|
||||
@@ -5185,11 +5185,11 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu
|
||||
return D3DERR_TEXTURE_LOAD_FAILED;
|
||||
}
|
||||
|
||||
- if (FAILED(hr = wined3d_resource_map(dst_resource,
|
||||
+ if (FAILED(hr = wined3d_resource_sub_resource_map(dst_resource,
|
||||
dst_surface->sub_resource_idx, &dst_map_desc, NULL, 0)))
|
||||
{
|
||||
ERR("Failed to lock destination surface, hr %#x.\n", hr);
|
||||
- wined3d_resource_unmap(src_resource, src_surface->sub_resource_idx);
|
||||
+ wined3d_resource_sub_resource_unmap(src_resource, src_surface->sub_resource_idx);
|
||||
wined3d_mutex_unlock();
|
||||
return D3DERR_TEXTURE_LOAD_FAILED;
|
||||
}
|
||||
@@ -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);
|
||||
|
||||
- wined3d_resource_unmap(dst_resource, dst_surface->sub_resource_idx);
|
||||
- wined3d_resource_unmap(src_resource, src_surface->sub_resource_idx);
|
||||
+ wined3d_resource_sub_resource_unmap(dst_resource, dst_surface->sub_resource_idx);
|
||||
+ wined3d_resource_sub_resource_unmap(src_resource, src_surface->sub_resource_idx);
|
||||
}
|
||||
|
||||
if (src_surface->surface_desc.ddsCaps.dwCaps & DDSCAPS_MIPMAP)
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 5231533..42dd0f1 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -3569,7 +3569,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;
|
||||
|
||||
@@ -3578,7 +3578,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_texture_invalidate_location(dst_texture, i, ~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;
|
||||
}
|
||||
|
||||
@@ -4293,7 +4293,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;
|
||||
@@ -4316,7 +4316,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");
|
||||
@@ -4396,14 +4396,14 @@ 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;
|
||||
cursor_info.yHotspot = y_hotspot;
|
||||
cursor_info.hbmMask = CreateBitmap(cursor_width, cursor_height, 1, 1, mask_bits);
|
||||
cursor_info.hbmColor = CreateBitmap(cursor_width, cursor_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 423d162..0821fde 100644
|
||||
--- a/dlls/wined3d/resource.c
|
||||
+++ b/dlls/wined3d/resource.c
|
||||
@@ -302,7 +302,7 @@ void CDECL wined3d_resource_get_desc(const struct wined3d_resource *resource, st
|
||||
desc->size = resource->size;
|
||||
}
|
||||
|
||||
-HRESULT CDECL wined3d_resource_map(struct wined3d_resource *resource, unsigned int sub_resource_idx,
|
||||
+HRESULT CDECL wined3d_resource_sub_resource_map(struct wined3d_resource *resource, unsigned int sub_resource_idx,
|
||||
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",
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
-HRESULT CDECL wined3d_resource_unmap(struct wined3d_resource *resource, unsigned int sub_resource_idx)
|
||||
+HRESULT CDECL wined3d_resource_sub_resource_unmap(struct wined3d_resource *resource, unsigned int sub_resource_idx)
|
||||
{
|
||||
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 16d03e8..aece7e5 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -1737,7 +1737,7 @@ static struct wined3d_texture *surface_convert_format(struct wined3d_texture *sr
|
||||
}
|
||||
|
||||
memset(&src_map, 0, sizeof(src_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");
|
||||
@@ -1749,17 +1749,17 @@ static struct wined3d_texture *surface_convert_format(struct wined3d_texture *sr
|
||||
struct wined3d_map_desc dst_map;
|
||||
|
||||
memset(&dst_map, 0, sizeof(dst_map));
|
||||
- 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_sub_resource_unmap(&dst_texture->resource, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1783,7 +1783,7 @@ static struct wined3d_texture *surface_convert_format(struct wined3d_texture *sr
|
||||
wined3d_texture_validate_location(dst_texture, 0, WINED3D_LOCATION_TEXTURE_RGB);
|
||||
wined3d_texture_invalidate_location(dst_texture, 0, ~WINED3D_LOCATION_TEXTURE_RGB);
|
||||
}
|
||||
- wined3d_resource_unmap(&src_texture->resource, sub_resource_idx);
|
||||
+ wined3d_resource_sub_resource_unmap(&src_texture->resource, sub_resource_idx);
|
||||
|
||||
return dst_texture;
|
||||
}
|
||||
@@ -3678,7 +3678,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;
|
||||
@@ -3703,7 +3703,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;
|
||||
}
|
||||
@@ -3713,7 +3713,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;
|
||||
@@ -4129,9 +4129,9 @@ error:
|
||||
FIXME(" Unsupported flags %#x.\n", flags);
|
||||
|
||||
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 9b6bed9..059d794 100644
|
||||
--- a/dlls/wined3d/wined3d.spec
|
||||
+++ b/dlls/wined3d/wined3d.spec
|
||||
@@ -181,10 +181,10 @@
|
||||
@ cdecl wined3d_resource_get_desc(ptr ptr)
|
||||
@ cdecl wined3d_resource_get_parent(ptr)
|
||||
@ cdecl wined3d_resource_get_priority(ptr)
|
||||
-@ cdecl wined3d_resource_map(ptr long ptr ptr long)
|
||||
@ cdecl wined3d_resource_set_parent(ptr ptr)
|
||||
@ cdecl wined3d_resource_set_priority(ptr long)
|
||||
-@ cdecl wined3d_resource_unmap(ptr long)
|
||||
+@ cdecl wined3d_resource_sub_resource_map(ptr long ptr ptr long)
|
||||
+@ cdecl wined3d_resource_sub_resource_unmap(ptr long)
|
||||
|
||||
@ 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 05eac77..2c09528 100644
|
||||
--- a/include/wine/wined3d.h
|
||||
+++ b/include/wine/wined3d.h
|
||||
@@ -2360,11 +2360,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);
|
||||
-HRESULT __cdecl wined3d_resource_map(struct wined3d_resource *resource, unsigned int sub_resource_idx,
|
||||
- struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags);
|
||||
void __cdecl wined3d_resource_set_parent(struct wined3d_resource *resource, void *parent);
|
||||
DWORD __cdecl wined3d_resource_set_priority(struct wined3d_resource *resource, DWORD priority);
|
||||
-HRESULT __cdecl wined3d_resource_unmap(struct wined3d_resource *resource, unsigned int sub_resource_idx);
|
||||
+HRESULT __cdecl wined3d_resource_sub_resource_map(struct wined3d_resource *resource, unsigned int sub_resource_idx,
|
||||
+ struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags);
|
||||
+HRESULT __cdecl wined3d_resource_sub_resource_unmap(struct wined3d_resource *resource, unsigned int sub_resource_idx);
|
||||
|
||||
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.1
|
||||
|
Loading…
Reference in New Issue
Block a user