mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-09-13 09:17:20 -07:00
Rebase against 99033b14534ffe8ff6c88c8d38a70d398c933b4d.
This commit is contained in:
parent
00b4488edc
commit
ec61f717d5
@ -1,4 +1,4 @@
|
||||
From 3e9c3ba84739fdd41205e1dd4ea8ad686871defb Mon Sep 17 00:00:00 2001
|
||||
From f1ad7b7975ed611a4989986f35ea3695eca0f26c 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: ddraw: Allow size and format conversions in IDirect3DTexture2::Load.
|
||||
@ -8,10 +8,10 @@ Subject: ddraw: Allow size and format conversions in IDirect3DTexture2::Load.
|
||||
1 file changed, 76 insertions(+), 71 deletions(-)
|
||||
|
||||
diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
|
||||
index f716cfc..f3bea20 100644
|
||||
index 8a10eff..cb71a65 100644
|
||||
--- a/dlls/ddraw/surface.c
|
||||
+++ b/dlls/ddraw/surface.c
|
||||
@@ -5048,6 +5048,46 @@ static struct ddraw_surface *get_sub_mimaplevel(struct ddraw_surface *surface)
|
||||
@@ -5062,6 +5062,46 @@ static struct ddraw_surface *get_sub_mimaplevel(struct ddraw_surface *surface)
|
||||
return impl_from_IDirectDrawSurface7(next_level);
|
||||
}
|
||||
|
||||
@ -58,7 +58,7 @@ index f716cfc..f3bea20 100644
|
||||
/*****************************************************************************
|
||||
* IDirect3DTexture2::Load
|
||||
*
|
||||
@@ -5081,91 +5121,57 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu
|
||||
@@ -5095,90 +5135,56 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu
|
||||
|
||||
wined3d_mutex_lock();
|
||||
|
||||
@ -75,8 +75,7 @@ index f716cfc..f3bea20 100644
|
||||
- DDSURFACEDESC *src_desc, *dst_desc;
|
||||
+ DDSURFACEDESC *src_desc = (DDSURFACEDESC *)&src_surface->surface_desc;
|
||||
|
||||
TRACE("Copying surface %p to surface %p (mipmap level %d).\n",
|
||||
src_surface, dst_surface, src_surface->mipmap_level);
|
||||
TRACE("Copying surface %p to surface %p.\n", src_surface, dst_surface);
|
||||
|
||||
- /* Suppress the ALLOCONLOAD flag */
|
||||
- dst_surface->surface_desc.ddsCaps.dwCaps &= ~DDSCAPS_ALLOCONLOAD;
|
||||
@ -183,7 +182,7 @@ index f716cfc..f3bea20 100644
|
||||
}
|
||||
|
||||
if (src_surface->surface_desc.ddsCaps.dwCaps & DDSCAPS_MIPMAP)
|
||||
@@ -5178,12 +5184,11 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu
|
||||
@@ -5191,12 +5197,11 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu
|
||||
else
|
||||
dst_surface = NULL;
|
||||
|
||||
@ -200,5 +199,5 @@ index f716cfc..f3bea20 100644
|
||||
|
||||
wined3d_mutex_unlock();
|
||||
--
|
||||
2.4.2
|
||||
2.6.2
|
||||
|
||||
|
@ -52,7 +52,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "c715127536a78166e58b165c390a57b704899d29"
|
||||
echo "99033b14534ffe8ff6c88c8d38a70d398c933b4d"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
@ -5669,11 +5669,14 @@ fi
|
||||
# | * 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
|
||||
# | * configure.ac, dlls/d3d11/device.c, dlls/wined3d-csmt/Makefile.in, dlls/wined3d-csmt/version.rc, dlls/wined3d/resource.c,
|
||||
# | dlls/wined3d/wined3d.spec, include/wine/wined3d.h
|
||||
# |
|
||||
if test "$enable_wined3d_CSMT_Helper" -eq 1; then
|
||||
patch_apply wined3d-CSMT_Helper/0001-wined3d-Add-second-dll-with-STAGING_CSMT-definition-.patch
|
||||
patch_apply wined3d-CSMT_Helper/0001-wined3d-Rename-wined3d_resource_-un-map-to-wined3d_r.patch
|
||||
patch_apply wined3d-CSMT_Helper/0002-wined3d-Add-second-dll-with-STAGING_CSMT-definition-.patch
|
||||
(
|
||||
echo '+ { "Sebastian Lackner", "wined3d: Rename wined3d_resource_(un)map to wined3d_resource_sub_resource_(un)map.", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "wined3d: Add second dll with STAGING_CSMT definition set.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
@ -0,0 +1,97 @@
|
||||
From d28eecc1251b483848ae2bf539ca5398c8575946 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/wined3d/resource.c | 4 ++--
|
||||
dlls/wined3d/wined3d.spec | 4 ++--
|
||||
include/wine/wined3d.h | 6 +++---
|
||||
4 files changed, 9 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
|
||||
index ca8b0ef..f5acbff 100644
|
||||
--- a/dlls/d3d11/device.c
|
||||
+++ b/dlls/d3d11/device.c
|
||||
@@ -215,7 +215,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();
|
||||
|
||||
@@ -236,7 +236,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/wined3d/resource.c b/dlls/wined3d/resource.c
|
||||
index d466764..74be48d 100644
|
||||
--- a/dlls/wined3d/resource.c
|
||||
+++ b/dlls/wined3d/resource.c
|
||||
@@ -295,7 +295,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 %p, flags %#x.\n",
|
||||
@@ -304,7 +304,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/wined3d.spec b/dlls/wined3d/wined3d.spec
|
||||
index 7067e08..7c4ea7c 100644
|
||||
--- a/dlls/wined3d/wined3d.spec
|
||||
+++ b/dlls/wined3d/wined3d.spec
|
||||
@@ -182,10 +182,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_surface(ptr ptr ptr ptr)
|
||||
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
|
||||
index 9c9258a..d859b6f 100644
|
||||
--- a/include/wine/wined3d.h
|
||||
+++ b/include/wine/wined3d.h
|
||||
@@ -2422,11 +2422,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.6.2
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 458932be247371abe50300b9d39acba5efa17e26 Mon Sep 17 00:00:00 2001
|
||||
From 429d2f5f7f32f0703b910f27a534cb06d9b6f722 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Thu, 19 Sep 2013 14:22:24 +0200
|
||||
Subject: wined3d: Merge get_pitch functions.
|
||||
@ -12,10 +12,10 @@ Subject: wined3d: Merge get_pitch functions.
|
||||
5 files changed, 70 insertions(+), 71 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
|
||||
index 1891165..0968cd2 100644
|
||||
index 74be48d..7922433 100644
|
||||
--- a/dlls/wined3d/resource.c
|
||||
+++ b/dlls/wined3d/resource.c
|
||||
@@ -414,3 +414,34 @@ void wined3d_resource_update_draw_binding(struct wined3d_resource *resource)
|
||||
@@ -430,3 +430,34 @@ void wined3d_resource_update_draw_binding(struct wined3d_resource *resource)
|
||||
else
|
||||
resource->draw_binding = WINED3D_LOCATION_TEXTURE_RGB;
|
||||
}
|
||||
@ -51,7 +51,7 @@ index 1891165..0968cd2 100644
|
||||
+ TRACE("Returning row pitch %u, slice pitch %u.\n", *row_pitch, *slice_pitch);
|
||||
+}
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index a092a9c..9749b77 100644
|
||||
index 39a2c3b..2e7f0f8 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -364,6 +364,7 @@ static HRESULT surface_create_dib_section(struct wined3d_surface *surface)
|
||||
@ -76,7 +76,7 @@ index a092a9c..9749b77 100644
|
||||
b_info->bmiHeader.biPlanes = 1;
|
||||
b_info->bmiHeader.biBitCount = format->byte_count * 8;
|
||||
|
||||
@@ -1314,14 +1316,14 @@ static void surface_download_data(struct wined3d_surface *surface, const struct
|
||||
@@ -1330,14 +1332,14 @@ static void surface_download_data(struct wined3d_surface *surface, const struct
|
||||
void *mem;
|
||||
GLenum gl_format = format->glFormat;
|
||||
GLenum gl_type = format->glType;
|
||||
@ -94,7 +94,7 @@ index a092a9c..9749b77 100644
|
||||
src_pitch = (src_pitch + alignment - 1) & ~(alignment - 1);
|
||||
mem = HeapAlloc(GetProcessHeap(), 0, src_pitch * surface->pow2Height);
|
||||
}
|
||||
@@ -1408,12 +1410,12 @@ static void surface_download_data(struct wined3d_surface *surface, const struct
|
||||
@@ -1424,12 +1426,12 @@ static void surface_download_data(struct wined3d_surface *surface, const struct
|
||||
* won't be released, and doesn't have to be re-read. */
|
||||
src_data = mem;
|
||||
dst_data = data.addr;
|
||||
@ -110,7 +110,7 @@ index a092a9c..9749b77 100644
|
||||
}
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, mem);
|
||||
@@ -1575,7 +1577,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
|
||||
@@ -1591,7 +1593,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
|
||||
UINT update_w, update_h;
|
||||
UINT dst_w, dst_h;
|
||||
RECT r, dst_rect;
|
||||
@ -119,7 +119,7 @@ index a092a9c..9749b77 100644
|
||||
POINT p;
|
||||
|
||||
TRACE("dst_surface %p, dst_point %s, src_surface %p, src_rect %s.\n",
|
||||
@@ -1663,10 +1665,10 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
|
||||
@@ -1679,10 +1681,10 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
|
||||
wined3d_texture_bind_and_dirtify(dst_surface->container, context, FALSE);
|
||||
|
||||
surface_get_memory(src_surface, &data, src_surface->locations);
|
||||
@ -132,7 +132,7 @@ index a092a9c..9749b77 100644
|
||||
|
||||
context_release(context);
|
||||
|
||||
@@ -1917,21 +1919,10 @@ HRESULT CDECL wined3d_surface_restore(struct wined3d_surface *surface)
|
||||
@@ -1934,21 +1936,10 @@ HRESULT CDECL wined3d_surface_restore(struct wined3d_surface *surface)
|
||||
|
||||
DWORD CDECL wined3d_surface_get_pitch(const struct wined3d_surface *surface)
|
||||
{
|
||||
@ -158,7 +158,7 @@ index a092a9c..9749b77 100644
|
||||
}
|
||||
|
||||
HRESULT CDECL wined3d_surface_set_overlay_position(struct wined3d_surface *surface, LONG x, LONG y)
|
||||
@@ -2093,20 +2084,21 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
|
||||
@@ -2110,20 +2101,21 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
|
||||
surface->resource.map_binding = WINED3D_LOCATION_USER_MEMORY;
|
||||
valid_location = WINED3D_LOCATION_USER_MEMORY;
|
||||
}
|
||||
@ -184,16 +184,16 @@ index a092a9c..9749b77 100644
|
||||
}
|
||||
|
||||
/* The format might be changed to a format that needs conversion.
|
||||
@@ -2726,7 +2718,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
|
||||
@@ -2749,7 +2741,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
|
||||
if (fmt_flags & WINED3DFMT_FLAG_BROKEN_PITCH)
|
||||
map_desc->row_pitch = surface->resource.width * format->byte_count;
|
||||
else
|
||||
- map_desc->row_pitch = wined3d_surface_get_pitch(surface);
|
||||
+ wined3d_resource_get_pitch(&surface->resource, &map_desc->row_pitch, &map_desc->slice_pitch);
|
||||
map_desc->slice_pitch = 0;
|
||||
map_desc->slice_pitch = surface->resource.height * map_desc->row_pitch;
|
||||
|
||||
if (!box)
|
||||
@@ -2855,6 +2847,7 @@ static void read_from_framebuffer(struct wined3d_surface *surface,
|
||||
@@ -2898,6 +2890,7 @@ static void read_from_framebuffer(struct wined3d_surface *surface,
|
||||
int i;
|
||||
BOOL srcIsUpsideDown;
|
||||
struct wined3d_bo_address data;
|
||||
@ -201,7 +201,7 @@ index a092a9c..9749b77 100644
|
||||
|
||||
surface_get_memory(surface, &data, dst_location);
|
||||
|
||||
@@ -2896,8 +2889,8 @@ static void read_from_framebuffer(struct wined3d_surface *surface,
|
||||
@@ -2939,8 +2932,8 @@ static void read_from_framebuffer(struct wined3d_surface *surface,
|
||||
}
|
||||
|
||||
/* Setup pixel store pack state -- to glReadPixels into the correct place */
|
||||
@ -212,7 +212,7 @@ index a092a9c..9749b77 100644
|
||||
checkGLcall("glPixelStorei");
|
||||
|
||||
gl_info->gl_ops.gl.p_glReadPixels(0, 0,
|
||||
@@ -2914,8 +2907,6 @@ static void read_from_framebuffer(struct wined3d_surface *surface,
|
||||
@@ -2957,8 +2950,6 @@ static void read_from_framebuffer(struct wined3d_surface *surface,
|
||||
{
|
||||
/* glReadPixels returns the image upside down, and there is no way to prevent this.
|
||||
* Flip the lines in software. */
|
||||
@ -221,7 +221,7 @@ index a092a9c..9749b77 100644
|
||||
if (!(row = HeapAlloc(GetProcessHeap(), 0, pitch)))
|
||||
goto error;
|
||||
|
||||
@@ -4041,7 +4032,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4077,7 +4068,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
struct wined3d_device *device = surface->resource.device;
|
||||
const struct wined3d_color_key_conversion *conversion;
|
||||
struct wined3d_texture *texture = surface->container;
|
||||
@ -230,7 +230,7 @@ index a092a9c..9749b77 100644
|
||||
struct wined3d_bo_address data;
|
||||
struct wined3d_format format;
|
||||
POINT dst_point = {0, 0};
|
||||
@@ -4126,7 +4117,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4162,7 +4153,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
wined3d_texture_bind_and_dirtify(texture, context, srgb);
|
||||
|
||||
width = surface->resource.width;
|
||||
@ -239,7 +239,7 @@ index a092a9c..9749b77 100644
|
||||
|
||||
format = *texture->resource.format;
|
||||
if ((conversion = wined3d_format_get_color_key_conversion(texture, TRUE)))
|
||||
@@ -4164,9 +4155,9 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4200,9 +4191,9 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
context_release(context);
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
@ -251,7 +251,7 @@ index a092a9c..9749b77 100644
|
||||
data.addr = mem;
|
||||
}
|
||||
else if (conversion)
|
||||
@@ -4186,14 +4177,14 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4222,14 +4213,14 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
}
|
||||
if (texture->swapchain && texture->swapchain->palette)
|
||||
palette = texture->swapchain->palette;
|
||||
@ -270,10 +270,10 @@ index a092a9c..9749b77 100644
|
||||
HeapFree(GetProcessHeap(), 0, mem);
|
||||
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index d5f9591..5232053 100644
|
||||
index 4380e5f..6511d2e 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -1255,7 +1255,7 @@ static void texture3d_sub_resource_upload_data(struct wined3d_resource *sub_reso
|
||||
@@ -1269,7 +1269,7 @@ static void texture3d_sub_resource_upload_data(struct wined3d_resource *sub_reso
|
||||
struct wined3d_const_bo_address addr;
|
||||
unsigned int row_pitch, slice_pitch;
|
||||
|
||||
@ -283,7 +283,7 @@ index d5f9591..5232053 100644
|
||||
FIXME("Ignoring row/slice pitch (%u/%u).\n", data->row_pitch, data->slice_pitch);
|
||||
|
||||
diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
|
||||
index 41264e8..afb9e76 100644
|
||||
index 0231c23..7be9ff5 100644
|
||||
--- a/dlls/wined3d/volume.c
|
||||
+++ b/dlls/wined3d/volume.c
|
||||
@@ -40,30 +40,6 @@ BOOL volume_prepare_system_memory(struct wined3d_volume *volume)
|
||||
@ -336,10 +336,10 @@ index 41264e8..afb9e76 100644
|
||||
|
||||
if (!box)
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 8aa2537..ee14dd1 100644
|
||||
index 4c4a58a..17ccabd 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2175,6 +2175,7 @@ struct wined3d_resource
|
||||
@@ -2184,6 +2184,7 @@ struct wined3d_resource
|
||||
UINT size;
|
||||
DWORD priority;
|
||||
void *heap_memory;
|
||||
@ -347,7 +347,7 @@ index 8aa2537..ee14dd1 100644
|
||||
struct list resource_list_entry;
|
||||
|
||||
void *parent;
|
||||
@@ -2202,6 +2203,8 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
|
||||
@@ -2211,6 +2212,8 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
|
||||
void resource_unload(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
BOOL wined3d_resource_allocate_sysmem(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
void wined3d_resource_free_sysmem(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
@ -356,7 +356,7 @@ index 8aa2537..ee14dd1 100644
|
||||
GLbitfield wined3d_resource_gl_map_flags(DWORD d3d_flags) DECLSPEC_HIDDEN;
|
||||
GLenum wined3d_resource_gl_legacy_map_flags(DWORD d3d_flags) DECLSPEC_HIDDEN;
|
||||
BOOL wined3d_resource_is_offscreen(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
@@ -2342,7 +2345,6 @@ BOOL volume_prepare_system_memory(struct wined3d_volume *volume) DECLSPEC_HIDDEN
|
||||
@@ -2348,7 +2351,6 @@ BOOL volume_prepare_system_memory(struct wined3d_volume *volume) DECLSPEC_HIDDEN
|
||||
HRESULT wined3d_volume_create(struct wined3d_texture *container, const struct wined3d_resource_desc *desc,
|
||||
unsigned int level, struct wined3d_volume **volume) DECLSPEC_HIDDEN;
|
||||
void wined3d_volume_destroy(struct wined3d_volume *volume) DECLSPEC_HIDDEN;
|
||||
@ -364,7 +364,7 @@ index 8aa2537..ee14dd1 100644
|
||||
void wined3d_volume_load(struct wined3d_volume *volume, struct wined3d_context *context,
|
||||
BOOL srgb_mode) DECLSPEC_HIDDEN;
|
||||
void wined3d_volume_invalidate_location(struct wined3d_volume *volume, DWORD location) DECLSPEC_HIDDEN;
|
||||
@@ -2395,7 +2397,6 @@ struct wined3d_surface
|
||||
@@ -2401,7 +2403,6 @@ struct wined3d_surface
|
||||
|
||||
DWORD flags;
|
||||
|
||||
@ -373,5 +373,5 @@ index 8aa2537..ee14dd1 100644
|
||||
UINT pow2Height;
|
||||
|
||||
--
|
||||
2.6.1
|
||||
2.6.2
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From d1b60dedae0926dd9dd413f721103700624f8da6 Mon Sep 17 00:00:00 2001
|
||||
From bc240cf9d9401914b2685b66f21af86aca21bccb Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Sun, 17 Nov 2013 18:44:48 +0100
|
||||
Subject: wined3d: Invalidate containers via callback.
|
||||
@ -13,11 +13,11 @@ Subject: wined3d: Invalidate containers via callback.
|
||||
6 files changed, 30 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
index 19df398..7adfe79 100644
|
||||
index ba4ed5d..638c9b9 100644
|
||||
--- a/dlls/wined3d/buffer.c
|
||||
+++ b/dlls/wined3d/buffer.c
|
||||
@@ -1123,11 +1123,17 @@ static ULONG buffer_resource_decref(struct wined3d_resource *resource)
|
||||
return wined3d_buffer_decref(buffer_from_resource(resource));
|
||||
@@ -1161,6 +1161,11 @@ static HRESULT buffer_resource_sub_resource_unmap(struct wined3d_resource *resou
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
+static void wined3d_buffer_location_invalidated(struct wined3d_resource *resource, DWORD location)
|
||||
@ -28,17 +28,19 @@ index 19df398..7adfe79 100644
|
||||
static const struct wined3d_resource_ops buffer_resource_ops =
|
||||
{
|
||||
buffer_resource_incref,
|
||||
buffer_resource_decref,
|
||||
@@ -1168,6 +1173,7 @@ static const struct wined3d_resource_ops buffer_resource_ops =
|
||||
buffer_unload,
|
||||
buffer_resource_sub_resource_map,
|
||||
buffer_resource_sub_resource_unmap,
|
||||
+ wined3d_buffer_location_invalidated,
|
||||
};
|
||||
|
||||
static HRESULT buffer_init(struct wined3d_buffer *buffer, struct wined3d_device *device,
|
||||
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
|
||||
index e54781f..35a1a14 100644
|
||||
index 2a42535..c259eba 100644
|
||||
--- a/dlls/wined3d/resource.c
|
||||
+++ b/dlls/wined3d/resource.c
|
||||
@@ -458,4 +458,6 @@ void wined3d_resource_invalidate_location(struct wined3d_resource *resource, DWO
|
||||
@@ -474,4 +474,6 @@ void wined3d_resource_invalidate_location(struct wined3d_resource *resource, DWO
|
||||
TRACE("Resource %p, setting %s.\n", resource, wined3d_debug_location(location));
|
||||
resource->locations &= ~location;
|
||||
TRACE("new location flags are %s.\n", wined3d_debug_location(resource->locations));
|
||||
@ -46,11 +48,11 @@ index e54781f..35a1a14 100644
|
||||
+ resource->resource_ops->resource_location_invalidated(resource, location);
|
||||
}
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 1d22d49..bbf485f 100644
|
||||
index 0d95db3..f5bc72c 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -1219,11 +1219,17 @@ static void surface_unload(struct wined3d_resource *resource)
|
||||
resource_unload(resource);
|
||||
@@ -1220,6 +1220,11 @@ static HRESULT surface_resource_sub_resource_unmap(struct wined3d_resource *reso
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
+static void wined3d_surface_location_invalidated(struct wined3d_resource *resource, DWORD location)
|
||||
@ -61,18 +63,20 @@ index 1d22d49..bbf485f 100644
|
||||
static const struct wined3d_resource_ops surface_resource_ops =
|
||||
{
|
||||
surface_resource_incref,
|
||||
surface_resource_decref,
|
||||
@@ -1227,6 +1232,7 @@ static const struct wined3d_resource_ops surface_resource_ops =
|
||||
surface_unload,
|
||||
surface_resource_sub_resource_map,
|
||||
surface_resource_sub_resource_unmap,
|
||||
+ wined3d_surface_location_invalidated,
|
||||
};
|
||||
|
||||
static const struct wined3d_surface_ops surface_ops =
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index bd1bdd7..d4a5f54 100644
|
||||
index 2e5276a..520647d 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -969,11 +969,17 @@ static void wined3d_texture_unload(struct wined3d_resource *resource)
|
||||
wined3d_texture_unload_gl_texture(texture);
|
||||
@@ -978,6 +978,11 @@ static HRESULT texture2d_resource_sub_resource_unmap(struct wined3d_resource *re
|
||||
return wined3d_surface_unmap(surface_from_resource(sub_resource));
|
||||
}
|
||||
|
||||
+static void wined3d_texture_load_location_invalidated(struct wined3d_resource *resource, DWORD location)
|
||||
@ -80,17 +84,19 @@ index bd1bdd7..d4a5f54 100644
|
||||
+ ERR("Should not be called on textures.\n");
|
||||
+}
|
||||
+
|
||||
static const struct wined3d_resource_ops texture_resource_ops =
|
||||
static const struct wined3d_resource_ops texture2d_resource_ops =
|
||||
{
|
||||
texture_resource_incref,
|
||||
texture_resource_decref,
|
||||
@@ -985,6 +990,7 @@ static const struct wined3d_resource_ops texture2d_resource_ops =
|
||||
wined3d_texture_unload,
|
||||
texture2d_resource_sub_resource_map,
|
||||
texture2d_resource_sub_resource_unmap,
|
||||
+ wined3d_texture_load_location_invalidated,
|
||||
};
|
||||
|
||||
static HRESULT cubetexture_init(struct wined3d_texture *texture, const struct wined3d_resource_desc *desc,
|
||||
diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
|
||||
index 12b9a3b..01ba73a 100644
|
||||
index eefdb06..f150795 100644
|
||||
--- a/dlls/wined3d/volume.c
|
||||
+++ b/dlls/wined3d/volume.c
|
||||
@@ -604,10 +604,7 @@ HRESULT wined3d_volume_map(struct wined3d_volume *volume,
|
||||
@ -104,8 +110,8 @@ index 12b9a3b..01ba73a 100644
|
||||
|
||||
volume->resource.map_count++;
|
||||
|
||||
@@ -662,11 +659,20 @@ static ULONG volume_resource_decref(struct wined3d_resource *resource)
|
||||
return wined3d_texture_decref(volume->container);
|
||||
@@ -675,6 +672,14 @@ static HRESULT volume_resource_sub_resource_unmap(struct wined3d_resource *resou
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
+static void wined3d_volume_location_invalidated(struct wined3d_resource *resource, DWORD location)
|
||||
@ -119,24 +125,26 @@ index 12b9a3b..01ba73a 100644
|
||||
static const struct wined3d_resource_ops volume_resource_ops =
|
||||
{
|
||||
volume_resource_incref,
|
||||
volume_resource_decref,
|
||||
@@ -682,6 +687,7 @@ static const struct wined3d_resource_ops volume_resource_ops =
|
||||
volume_unload,
|
||||
volume_resource_sub_resource_map,
|
||||
volume_resource_sub_resource_unmap,
|
||||
+ wined3d_volume_location_invalidated,
|
||||
};
|
||||
|
||||
static HRESULT volume_init(struct wined3d_volume *volume, struct wined3d_texture *container,
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index c317b96..25af997 100644
|
||||
index 429a093..53e9fe9 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2145,6 +2145,7 @@ struct wined3d_resource_ops
|
||||
ULONG (*resource_incref)(struct wined3d_resource *resource);
|
||||
ULONG (*resource_decref)(struct wined3d_resource *resource);
|
||||
void (*resource_unload)(struct wined3d_resource *resource);
|
||||
@@ -2159,6 +2159,7 @@ struct wined3d_resource_ops
|
||||
HRESULT (*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 (*resource_sub_resource_unmap)(struct wined3d_resource *resource, unsigned int sub_resource_idx);
|
||||
+ void (*resource_location_invalidated)(struct wined3d_resource *resource, DWORD location);
|
||||
};
|
||||
|
||||
struct wined3d_resource
|
||||
--
|
||||
2.6.0
|
||||
2.6.2
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 0dd2ded31943d0729f811330cc2afa0d3b050dc8 Mon Sep 17 00:00:00 2001
|
||||
From baafba4da7e88b445e043b45fd1b852c7e0a1f61 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Thu, 3 Oct 2013 12:47:01 +0200
|
||||
Subject: wined3d: Move load_location into the resource.
|
||||
@ -16,10 +16,10 @@ and downloading from textures will be delegated to surfaces / volumes.
|
||||
6 files changed, 91 insertions(+), 36 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
index 727e8be..3470a89 100644
|
||||
index 638c9b9..e1bd034 100644
|
||||
--- a/dlls/wined3d/buffer.c
|
||||
+++ b/dlls/wined3d/buffer.c
|
||||
@@ -1128,12 +1128,20 @@ static void wined3d_buffer_location_invalidated(struct wined3d_resource *resourc
|
||||
@@ -1166,6 +1166,13 @@ static void wined3d_buffer_location_invalidated(struct wined3d_resource *resourc
|
||||
ERR("Not yet implemented.\n");
|
||||
}
|
||||
|
||||
@ -33,18 +33,19 @@ index 727e8be..3470a89 100644
|
||||
static const struct wined3d_resource_ops buffer_resource_ops =
|
||||
{
|
||||
buffer_resource_incref,
|
||||
buffer_resource_decref,
|
||||
buffer_unload,
|
||||
@@ -1174,6 +1181,7 @@ static const struct wined3d_resource_ops buffer_resource_ops =
|
||||
buffer_resource_sub_resource_map,
|
||||
buffer_resource_sub_resource_unmap,
|
||||
wined3d_buffer_location_invalidated,
|
||||
+ wined3d_buffer_load_location,
|
||||
};
|
||||
|
||||
static HRESULT buffer_init(struct wined3d_buffer *buffer, struct wined3d_device *device,
|
||||
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
|
||||
index 35a1a14..39df397 100644
|
||||
index c259eba..bff4997 100644
|
||||
--- a/dlls/wined3d/resource.c
|
||||
+++ b/dlls/wined3d/resource.c
|
||||
@@ -461,3 +461,53 @@ void wined3d_resource_invalidate_location(struct wined3d_resource *resource, DWO
|
||||
@@ -477,3 +477,53 @@ void wined3d_resource_invalidate_location(struct wined3d_resource *resource, DWO
|
||||
|
||||
resource->resource_ops->resource_location_invalidated(resource, location);
|
||||
}
|
||||
@ -99,10 +100,10 @@ index 35a1a14..39df397 100644
|
||||
+ resource->resource_ops->resource_load_location(resource, context, location);
|
||||
+}
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index a59e401..9e46545 100644
|
||||
index 34f589b..fed3aaf 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -1227,12 +1227,20 @@ static void wined3d_surface_location_invalidated(struct wined3d_resource *resour
|
||||
@@ -1228,6 +1228,13 @@ static void wined3d_surface_location_invalidated(struct wined3d_resource *resour
|
||||
wined3d_texture_set_dirty(surface->container);
|
||||
}
|
||||
|
||||
@ -116,14 +117,15 @@ index a59e401..9e46545 100644
|
||||
static const struct wined3d_resource_ops surface_resource_ops =
|
||||
{
|
||||
surface_resource_incref,
|
||||
surface_resource_decref,
|
||||
surface_unload,
|
||||
@@ -1236,6 +1243,7 @@ static const struct wined3d_resource_ops surface_resource_ops =
|
||||
surface_resource_sub_resource_map,
|
||||
surface_resource_sub_resource_unmap,
|
||||
wined3d_surface_location_invalidated,
|
||||
+ wined3d_surface_load_location,
|
||||
};
|
||||
|
||||
static const struct wined3d_surface_ops surface_ops =
|
||||
@@ -4062,7 +4070,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
@@ -3941,7 +3949,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
surface->ds_current_size.cy = surface->resource.height;
|
||||
}
|
||||
|
||||
@ -132,7 +134,7 @@ index a59e401..9e46545 100644
|
||||
{
|
||||
switch (location)
|
||||
{
|
||||
@@ -4394,7 +4402,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
@@ -4273,7 +4281,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
|
||||
if (WARN_ON(d3d_surface))
|
||||
{
|
||||
@ -142,10 +144,10 @@ index a59e401..9e46545 100644
|
||||
WARN("Operation requires %#x access, but surface only has %#x.\n",
|
||||
required_access, surface->resource.access_flags);
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index fe7936d..89f94f3 100644
|
||||
index e2df18d..7650f36 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -950,12 +950,20 @@ static void wined3d_texture_load_location_invalidated(struct wined3d_resource *r
|
||||
@@ -981,6 +981,13 @@ static void wined3d_texture_load_location_invalidated(struct wined3d_resource *r
|
||||
ERR("Should not be called on textures.\n");
|
||||
}
|
||||
|
||||
@ -156,18 +158,19 @@ index fe7936d..89f94f3 100644
|
||||
+ ERR("Should not be called on textures.\n");
|
||||
+}
|
||||
+
|
||||
static const struct wined3d_resource_ops texture_resource_ops =
|
||||
static const struct wined3d_resource_ops texture2d_resource_ops =
|
||||
{
|
||||
texture_resource_incref,
|
||||
texture_resource_decref,
|
||||
wined3d_texture_unload,
|
||||
@@ -989,6 +996,7 @@ static const struct wined3d_resource_ops texture2d_resource_ops =
|
||||
texture2d_resource_sub_resource_map,
|
||||
texture2d_resource_sub_resource_unmap,
|
||||
wined3d_texture_load_location_invalidated,
|
||||
+ wined3d_texture_load_location,
|
||||
};
|
||||
|
||||
static HRESULT cubetexture_init(struct wined3d_texture *texture, const struct wined3d_resource_desc *desc,
|
||||
diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
|
||||
index 94eb77e..f82347d 100644
|
||||
index f150795..82bc3b0 100644
|
||||
--- a/dlls/wined3d/volume.c
|
||||
+++ b/dlls/wined3d/volume.c
|
||||
@@ -137,27 +137,6 @@ static void wined3d_volume_evict_sysmem(struct wined3d_volume *volume)
|
||||
@ -242,7 +245,7 @@ index 94eb77e..f82347d 100644
|
||||
context_release(context);
|
||||
wined3d_resource_invalidate_location(&volume->resource, ~WINED3D_LOCATION_SYSMEM);
|
||||
}
|
||||
@@ -552,7 +527,7 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume,
|
||||
@@ -519,7 +494,7 @@ HRESULT wined3d_volume_map(struct wined3d_volume *volume,
|
||||
if (flags & WINED3D_MAP_DISCARD)
|
||||
wined3d_resource_validate_location(&volume->resource, WINED3D_LOCATION_BUFFER);
|
||||
else
|
||||
@ -251,7 +254,7 @@ index 94eb77e..f82347d 100644
|
||||
|
||||
GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, volume->pbo));
|
||||
|
||||
@@ -590,7 +565,7 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume,
|
||||
@@ -557,7 +532,7 @@ HRESULT wined3d_volume_map(struct wined3d_volume *volume,
|
||||
else if (!(volume->resource.locations & WINED3D_LOCATION_SYSMEM))
|
||||
{
|
||||
context = context_acquire(device, NULL);
|
||||
@ -260,28 +263,28 @@ index 94eb77e..f82347d 100644
|
||||
context_release(context);
|
||||
}
|
||||
base_memory = volume->resource.heap_memory;
|
||||
@@ -705,6 +680,7 @@ static const struct wined3d_resource_ops volume_resource_ops =
|
||||
volume_resource_decref,
|
||||
volume_unload,
|
||||
@@ -688,6 +663,7 @@ static const struct wined3d_resource_ops volume_resource_ops =
|
||||
volume_resource_sub_resource_map,
|
||||
volume_resource_sub_resource_unmap,
|
||||
wined3d_volume_location_invalidated,
|
||||
+ wined3d_volume_load_location,
|
||||
};
|
||||
|
||||
static HRESULT volume_init(struct wined3d_volume *volume, struct wined3d_texture *container,
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 936950f..e1e490e 100644
|
||||
index 4282508..e970088 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2138,6 +2138,8 @@ struct wined3d_resource_ops
|
||||
ULONG (*resource_decref)(struct wined3d_resource *resource);
|
||||
void (*resource_unload)(struct wined3d_resource *resource);
|
||||
@@ -2160,6 +2160,8 @@ struct wined3d_resource_ops
|
||||
struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags);
|
||||
HRESULT (*resource_sub_resource_unmap)(struct wined3d_resource *resource, unsigned int sub_resource_idx);
|
||||
void (*resource_location_invalidated)(struct wined3d_resource *resource, DWORD location);
|
||||
+ void (*resource_load_location)(struct wined3d_resource *resource,
|
||||
+ struct wined3d_context *context, DWORD location);
|
||||
};
|
||||
|
||||
struct wined3d_resource
|
||||
@@ -2190,17 +2192,20 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
|
||||
@@ -2212,17 +2214,20 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
|
||||
void *parent, const struct wined3d_parent_ops *parent_ops,
|
||||
const struct wined3d_resource_ops *resource_ops) DECLSPEC_HIDDEN;
|
||||
void resource_unload(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
@ -304,5 +307,5 @@ index 936950f..e1e490e 100644
|
||||
/* Tests show that the start address of resources is 32 byte aligned */
|
||||
#define RESOURCE_ALIGNMENT 16
|
||||
--
|
||||
2.4.5
|
||||
2.6.2
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 38f75a5119e093e6a00849f76406aa0cd4f4b252 Mon Sep 17 00:00:00 2001
|
||||
From c733f3af4517be13e6c673cf28fc4df6e09b9f78 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Sun, 17 Nov 2013 20:33:17 +0100
|
||||
Subject: wined3d: Replace surface_load_location with resource_load_location.
|
||||
@ -8,11 +8,11 @@ FIXME: Check if this patch is complete enough to make sense.
|
||||
dlls/wined3d/context.c | 2 +-
|
||||
dlls/wined3d/device.c | 4 +-
|
||||
dlls/wined3d/drawprim.c | 2 +-
|
||||
dlls/wined3d/surface.c | 111 +++++++++++++----------------------------
|
||||
dlls/wined3d/surface.c | 115 +++++++++++++----------------------------
|
||||
dlls/wined3d/swapchain.c | 8 +--
|
||||
dlls/wined3d/texture.c | 2 +-
|
||||
dlls/wined3d/wined3d_private.h | 2 -
|
||||
7 files changed, 44 insertions(+), 87 deletions(-)
|
||||
7 files changed, 46 insertions(+), 89 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
index 8ec2964..4909344 100644
|
||||
@ -28,7 +28,7 @@ index 8ec2964..4909344 100644
|
||||
swapchain_update_draw_bindings(swapchain);
|
||||
context_set_render_offscreen(context, TRUE);
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index bb133c4..0d9debe 100644
|
||||
index 352efc3..4d7fa53 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -323,7 +323,7 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
|
||||
@ -40,7 +40,7 @@ index bb133c4..0d9debe 100644
|
||||
else
|
||||
wined3d_surface_prepare(rt, context, rt->container->resource.draw_binding);
|
||||
}
|
||||
@@ -4007,7 +4007,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
@@ -4009,7 +4009,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
&& src_rect.bottom == sub_resource->height)
|
||||
wined3d_texture_prepare_texture(texture, context, FALSE);
|
||||
else
|
||||
@ -63,7 +63,7 @@ index 95245a9..4b01b7d 100644
|
||||
}
|
||||
else
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 8efb896..acc210d 100644
|
||||
index fed3aaf..742ebc3 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -759,7 +759,7 @@ static void surface_unmap(struct wined3d_surface *surface)
|
||||
@ -108,7 +108,7 @@ index 8efb896..acc210d 100644
|
||||
wined3d_resource_invalidate_location(&surface->resource, ~surface->resource.map_binding);
|
||||
}
|
||||
|
||||
@@ -1215,22 +1215,6 @@ static void wined3d_surface_location_invalidated(struct wined3d_resource *resour
|
||||
@@ -1228,24 +1228,6 @@ static void wined3d_surface_location_invalidated(struct wined3d_resource *resour
|
||||
wined3d_texture_set_dirty(surface->container);
|
||||
}
|
||||
|
||||
@ -124,6 +124,8 @@ index 8efb896..acc210d 100644
|
||||
- surface_resource_incref,
|
||||
- surface_resource_decref,
|
||||
- surface_unload,
|
||||
- surface_resource_sub_resource_map,
|
||||
- surface_resource_sub_resource_unmap,
|
||||
- wined3d_surface_location_invalidated,
|
||||
- wined3d_surface_load_location,
|
||||
-};
|
||||
@ -131,7 +133,7 @@ index 8efb896..acc210d 100644
|
||||
static const struct wined3d_surface_ops surface_ops =
|
||||
{
|
||||
surface_private_setup,
|
||||
@@ -1684,7 +1668,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
|
||||
@@ -1699,7 +1681,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
|
||||
if (update_w == dst_w && update_h == dst_h)
|
||||
wined3d_texture_prepare_texture(dst_surface->container, context, FALSE);
|
||||
else
|
||||
@ -140,7 +142,7 @@ index 8efb896..acc210d 100644
|
||||
wined3d_texture_bind_and_dirtify(dst_surface->container, context, FALSE);
|
||||
|
||||
surface_get_memory(src_surface, &data, src_surface->resource.locations);
|
||||
@@ -1817,7 +1801,7 @@ void surface_load(struct wined3d_surface *surface, struct wined3d_context *conte
|
||||
@@ -1832,7 +1814,7 @@ void surface_load(struct wined3d_surface *surface, struct wined3d_context *conte
|
||||
}
|
||||
TRACE("Reloading because surface is dirty.\n");
|
||||
|
||||
@ -149,7 +151,7 @@ index 8efb896..acc210d 100644
|
||||
surface_evict_sysmem(surface);
|
||||
}
|
||||
|
||||
@@ -2706,7 +2690,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
|
||||
@@ -2721,7 +2703,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
|
||||
|
||||
if (surface->resource.device->d3d_initialized)
|
||||
context = context_acquire(surface->resource.device, NULL);
|
||||
@ -158,7 +160,7 @@ index 8efb896..acc210d 100644
|
||||
if (context)
|
||||
context_release(context);
|
||||
}
|
||||
@@ -2811,7 +2795,7 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
|
||||
@@ -2826,7 +2808,7 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
|
||||
{
|
||||
if (surface->flags & SFLAG_CLIENT)
|
||||
{
|
||||
@ -167,7 +169,7 @@ index 8efb896..acc210d 100644
|
||||
surface_release_client_storage(surface);
|
||||
}
|
||||
hr = surface_create_dib_section(surface);
|
||||
@@ -2827,7 +2811,7 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
|
||||
@@ -2842,7 +2824,7 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
|
||||
surface->resource.map_binding = WINED3D_LOCATION_DIB;
|
||||
}
|
||||
|
||||
@ -176,7 +178,7 @@ index 8efb896..acc210d 100644
|
||||
wined3d_resource_invalidate_location(&surface->resource, ~WINED3D_LOCATION_DIB);
|
||||
|
||||
if (context)
|
||||
@@ -2876,7 +2860,7 @@ HRESULT CDECL wined3d_surface_releasedc(struct wined3d_surface *surface, HDC dc)
|
||||
@@ -2891,7 +2873,7 @@ HRESULT CDECL wined3d_surface_releasedc(struct wined3d_surface *surface, HDC dc)
|
||||
if (device->d3d_initialized)
|
||||
context = context_acquire(device, NULL);
|
||||
|
||||
@ -185,7 +187,7 @@ index 8efb896..acc210d 100644
|
||||
wined3d_resource_invalidate_location(&surface->resource, WINED3D_LOCATION_DIB);
|
||||
if (context)
|
||||
context_release(context);
|
||||
@@ -3513,8 +3497,8 @@ static void surface_blt_to_drawable(const struct wined3d_device *device,
|
||||
@@ -3528,8 +3510,8 @@ static void surface_blt_to_drawable(const struct wined3d_device *device,
|
||||
gl_info = context->gl_info;
|
||||
|
||||
/* Make sure the surface is up-to-date. This should probably use
|
||||
@ -196,7 +198,7 @@ index 8efb896..acc210d 100644
|
||||
wined3d_texture_load(src_surface->container, context, FALSE);
|
||||
|
||||
/* Activate the destination context, set it up for blitting */
|
||||
@@ -3934,29 +3918,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
@@ -3949,29 +3931,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
surface->ds_current_size.cy = surface->resource.height;
|
||||
}
|
||||
|
||||
@ -226,7 +228,7 @@ index 8efb896..acc210d 100644
|
||||
static void surface_copy_simple_location(struct wined3d_surface *surface, DWORD location)
|
||||
{
|
||||
struct wined3d_device *device = surface->resource.device;
|
||||
@@ -4006,7 +3967,7 @@ static void surface_load_sysmem(struct wined3d_surface *surface,
|
||||
@@ -4021,7 +3980,7 @@ static void surface_load_sysmem(struct wined3d_surface *surface,
|
||||
}
|
||||
|
||||
if (surface->resource.locations & (WINED3D_LOCATION_RB_MULTISAMPLE | WINED3D_LOCATION_RB_RESOLVED))
|
||||
@ -235,7 +237,7 @@ index 8efb896..acc210d 100644
|
||||
|
||||
/* Download the surface to system memory. */
|
||||
if (surface->resource.locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB))
|
||||
@@ -4042,7 +4003,7 @@ static HRESULT surface_load_drawable(struct wined3d_surface *surface,
|
||||
@@ -4057,7 +4016,7 @@ static HRESULT surface_load_drawable(struct wined3d_surface *surface,
|
||||
}
|
||||
|
||||
surface_get_rect(surface, NULL, &r);
|
||||
@ -244,7 +246,7 @@ index 8efb896..acc210d 100644
|
||||
surface_blt_to_drawable(surface->resource.device, context,
|
||||
WINED3D_TEXF_POINT, FALSE, surface, &r, surface, &r);
|
||||
|
||||
@@ -4115,7 +4076,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4130,7 +4089,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
/* Performance warning... */
|
||||
FIXME("Downloading RGB surface %p to reload it as sRGB.\n", surface);
|
||||
surface_prepare_map_memory(surface);
|
||||
@ -253,7 +255,7 @@ index 8efb896..acc210d 100644
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -4126,7 +4087,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4141,7 +4100,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
/* Performance warning... */
|
||||
FIXME("Downloading sRGB surface %p to reload it as RGB.\n", surface);
|
||||
surface_prepare_map_memory(surface);
|
||||
@ -262,7 +264,7 @@ index 8efb896..acc210d 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4135,7 +4096,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4150,7 +4109,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
WARN("Trying to load a texture from sysmem, but no simple location is valid.\n");
|
||||
/* Lets hope we get it from somewhere... */
|
||||
surface_prepare_system_memory(surface);
|
||||
@ -271,7 +273,7 @@ index 8efb896..acc210d 100644
|
||||
}
|
||||
|
||||
wined3d_texture_prepare_texture(texture, context, srgb);
|
||||
@@ -4161,7 +4122,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4176,7 +4135,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
surface->resource.map_binding = WINED3D_LOCATION_SYSMEM;
|
||||
|
||||
surface_prepare_map_memory(surface);
|
||||
@ -280,7 +282,7 @@ index 8efb896..acc210d 100644
|
||||
surface_remove_pbo(surface, gl_info);
|
||||
}
|
||||
|
||||
@@ -4229,9 +4190,11 @@ static void surface_multisample_resolve(struct wined3d_surface *surface, struct
|
||||
@@ -4244,9 +4203,11 @@ static void surface_multisample_resolve(struct wined3d_surface *surface, struct
|
||||
surface, WINED3D_LOCATION_RB_MULTISAMPLE, &rect, surface, WINED3D_LOCATION_RB_RESOLVED, &rect);
|
||||
}
|
||||
|
||||
@ -294,7 +296,7 @@ index 8efb896..acc210d 100644
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("surface %p, location %s.\n", surface, wined3d_debug_location(location));
|
||||
@@ -4258,20 +4221,6 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
@@ -4273,20 +4234,6 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
}
|
||||
}
|
||||
|
||||
@ -315,7 +317,7 @@ index 8efb896..acc210d 100644
|
||||
if (!surface->resource.locations)
|
||||
{
|
||||
ERR("Surface %p does not have any up to date location.\n", surface);
|
||||
@@ -5421,7 +5370,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
@@ -5436,7 +5383,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
if (!wined3d_resource_is_offscreen(&dst_surface->container->resource))
|
||||
{
|
||||
struct wined3d_context *context = context_acquire(device, dst_surface);
|
||||
@ -325,7 +327,7 @@ index 8efb896..acc210d 100644
|
||||
context_release(context);
|
||||
}
|
||||
return WINED3D_OK;
|
||||
@@ -5494,6 +5444,15 @@ cpu:
|
||||
@@ -5509,6 +5457,17 @@ cpu:
|
||||
return surface_cpu_blt(dst_surface, &dst_rect, src_surface, &src_rect, flags, fx, filter);
|
||||
}
|
||||
|
||||
@ -334,6 +336,8 @@ index 8efb896..acc210d 100644
|
||||
+ surface_resource_incref,
|
||||
+ surface_resource_decref,
|
||||
+ surface_unload,
|
||||
+ surface_resource_sub_resource_map,
|
||||
+ surface_resource_sub_resource_unmap,
|
||||
+ wined3d_surface_location_invalidated,
|
||||
+ wined3d_surface_load_location,
|
||||
+};
|
||||
@ -381,7 +385,7 @@ index 50cd3ea..6ceac57 100644
|
||||
src_dc = front->hDC;
|
||||
window = swapchain->win_handle;
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index b38805e..f067a87 100644
|
||||
index 7650f36..7e7df06 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -774,7 +774,7 @@ static void texture2d_sub_resource_add_dirty_region(struct wined3d_resource *sub
|
||||
@ -394,7 +398,7 @@ index b38805e..f067a87 100644
|
||||
wined3d_resource_invalidate_location(&surface->resource, ~surface->resource.map_binding);
|
||||
}
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 37b37f2..297bdda 100644
|
||||
index e970088..c5c1442 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2460,8 +2460,6 @@ void surface_load_ds_location(struct wined3d_surface *surface,
|
||||
@ -407,5 +411,5 @@ index 37b37f2..297bdda 100644
|
||||
void wined3d_surface_prepare(struct wined3d_surface *surface, struct wined3d_context *context,
|
||||
DWORD location) DECLSPEC_HIDDEN;
|
||||
--
|
||||
2.6.1
|
||||
2.6.2
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From f37230817cf62ee3f7e6d805107bcf1f455d0d9a Mon Sep 17 00:00:00 2001
|
||||
From 4ca448b9c9fb4ed0e94eaa82b98d7677d486a92c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Thu, 19 Sep 2013 18:00:23 +0200
|
||||
Subject: wined3d: Use resource_map for surface_map.
|
||||
@ -10,10 +10,10 @@ Subject: wined3d: Use resource_map for surface_map.
|
||||
3 files changed, 18 insertions(+), 90 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
|
||||
index e5af445..9c40d42 100644
|
||||
index 7743a40..74cb6c1 100644
|
||||
--- a/dlls/wined3d/resource.c
|
||||
+++ b/dlls/wined3d/resource.c
|
||||
@@ -867,7 +867,7 @@ HRESULT wined3d_resource_unmap(struct wined3d_resource *resource)
|
||||
@@ -883,7 +883,7 @@ HRESULT wined3d_resource_unmap(struct wined3d_resource *resource)
|
||||
if (!resource->map_count)
|
||||
{
|
||||
WARN("Trying to unlock an unlocked resource %p.\n", resource);
|
||||
@ -23,10 +23,10 @@ index e5af445..9c40d42 100644
|
||||
|
||||
if (device->d3d_initialized)
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 37f9b40..1d77682 100644
|
||||
index f00f6c3..3f7f54c 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -2427,28 +2427,18 @@ struct wined3d_surface * CDECL wined3d_surface_from_resource(struct wined3d_reso
|
||||
@@ -2428,28 +2428,18 @@ struct wined3d_surface * CDECL wined3d_surface_from_resource(struct wined3d_reso
|
||||
|
||||
HRESULT CDECL wined3d_surface_unmap(struct wined3d_surface *surface)
|
||||
{
|
||||
@ -60,7 +60,7 @@ index 37f9b40..1d77682 100644
|
||||
}
|
||||
|
||||
HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
|
||||
@@ -2456,18 +2446,6 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
|
||||
@@ -2457,18 +2447,6 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
|
||||
{
|
||||
const struct wined3d_format *format = surface->resource.format;
|
||||
unsigned int fmt_flags = surface->container->resource.format_flags;
|
||||
@ -79,7 +79,7 @@ index 37f9b40..1d77682 100644
|
||||
|
||||
if ((fmt_flags & WINED3DFMT_FLAG_BLOCKS) && box
|
||||
&& !surface_check_block_align(surface, box))
|
||||
@@ -2479,11 +2457,6 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
|
||||
@@ -2480,11 +2458,6 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@ -91,7 +91,7 @@ index 37f9b40..1d77682 100644
|
||||
/* Performance optimization: Count how often a surface is mapped, if it is
|
||||
* mapped regularly do not throw away the system memory copy. This avoids
|
||||
* the need to download the surface from OpenGL all the time. The surface
|
||||
@@ -2499,72 +2472,22 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
|
||||
@@ -2500,72 +2473,22 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
|
||||
}
|
||||
}
|
||||
|
||||
@ -130,7 +130,7 @@ index 37f9b40..1d77682 100644
|
||||
- map_desc->row_pitch = surface->resource.width * format->byte_count;
|
||||
else
|
||||
- wined3d_resource_get_pitch(&surface->resource, &map_desc->row_pitch, &map_desc->slice_pitch);
|
||||
- map_desc->slice_pitch = 0;
|
||||
- map_desc->slice_pitch = surface->resource.height * map_desc->row_pitch;
|
||||
-
|
||||
- if (!box)
|
||||
{
|
||||
@ -171,10 +171,10 @@ index 37f9b40..1d77682 100644
|
||||
|
||||
HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
|
||||
diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
|
||||
index 85894d1..43c9092 100644
|
||||
index a237bf6..0e97cd1 100644
|
||||
--- a/dlls/wined3d/volume.c
|
||||
+++ b/dlls/wined3d/volume.c
|
||||
@@ -423,7 +423,12 @@ HRESULT wined3d_volume_map(struct wined3d_volume *volume,
|
||||
@@ -402,7 +402,12 @@ HRESULT wined3d_volume_map(struct wined3d_volume *volume,
|
||||
|
||||
HRESULT wined3d_volume_unmap(struct wined3d_volume *volume)
|
||||
{
|
||||
@ -189,5 +189,5 @@ index 85894d1..43c9092 100644
|
||||
|
||||
static ULONG volume_resource_incref(struct wined3d_resource *resource)
|
||||
--
|
||||
2.6.0
|
||||
2.6.2
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 4ce0b7d84cd9b320205d4b1626f3486b73e95c03 Mon Sep 17 00:00:00 2001
|
||||
From 99c21f03b539568231b746938b4b0cb5ba664720 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Sun, 6 Oct 2013 16:20:32 +0200
|
||||
Subject: wined3d: Clean up texture resources through the cs.
|
||||
@ -10,7 +10,7 @@ Subject: wined3d: Clean up texture resources through the cs.
|
||||
3 files changed, 60 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 997c7d8..f7ede92 100644
|
||||
index 91b76f5..ba8d19e 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -87,6 +87,7 @@ enum wined3d_cs_op
|
||||
@ -34,7 +34,7 @@ index 997c7d8..f7ede92 100644
|
||||
static void wined3d_cs_mt_submit(struct wined3d_cs *cs, size_t size)
|
||||
{
|
||||
LONG new_val = (cs->queue.head + size) & (WINED3D_CS_QUEUE_SIZE - 1);
|
||||
@@ -2559,6 +2566,26 @@ void wined3d_cs_emit_surface_cleanup(struct wined3d_cs *cs, struct wined3d_surfa
|
||||
@@ -2560,6 +2567,26 @@ void wined3d_cs_emit_surface_cleanup(struct wined3d_cs *cs, struct wined3d_surfa
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@ -61,7 +61,7 @@ index 997c7d8..f7ede92 100644
|
||||
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
|
||||
@@ -2624,6 +2651,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -2625,6 +2652,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_BUFFER_CLEANUP */ wined3d_cs_exec_buffer_cleanup,
|
||||
/* WINED3D_CS_OP_VOLUME_CLEANUP */ wined3d_cs_exec_volume_cleanup,
|
||||
/* WINED3D_CS_OP_SURFACE_CLEANUP */ wined3d_cs_exec_surface_cleanup,
|
||||
@ -70,7 +70,7 @@ index 997c7d8..f7ede92 100644
|
||||
|
||||
static inline void *_wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size, BOOL prio)
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index c94dc5b..63e0668 100644
|
||||
index 61ef22e..85abaa4 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -114,17 +114,26 @@ static void wined3d_texture_unload_gl_texture(struct wined3d_texture *texture)
|
||||
@ -114,7 +114,7 @@ index c94dc5b..63e0668 100644
|
||||
}
|
||||
|
||||
void wined3d_texture_set_swapchain(struct wined3d_texture *texture, struct wined3d_swapchain *swapchain)
|
||||
@@ -419,9 +425,10 @@ ULONG CDECL wined3d_texture_decref(struct wined3d_texture *texture)
|
||||
@@ -423,9 +429,10 @@ ULONG CDECL wined3d_texture_decref(struct wined3d_texture *texture)
|
||||
|
||||
if (!refcount)
|
||||
{
|
||||
@ -127,7 +127,7 @@ index c94dc5b..63e0668 100644
|
||||
}
|
||||
|
||||
return refcount;
|
||||
@@ -1003,6 +1010,7 @@ static HRESULT cubetexture_init(struct wined3d_texture *texture, const struct wi
|
||||
@@ -1028,6 +1035,7 @@ static HRESULT cubetexture_init(struct wined3d_texture *texture, const struct wi
|
||||
if (WINED3DFMT_UNKNOWN >= desc->format)
|
||||
{
|
||||
WARN("(%p) : Texture cannot be created with a format of WINED3DFMT_UNKNOWN.\n", texture);
|
||||
@ -135,7 +135,7 @@ index c94dc5b..63e0668 100644
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@@ -1012,12 +1020,14 @@ static HRESULT cubetexture_init(struct wined3d_texture *texture, const struct wi
|
||||
@@ -1037,12 +1045,14 @@ static HRESULT cubetexture_init(struct wined3d_texture *texture, const struct wi
|
||||
if (!gl_info->supported[SGIS_GENERATE_MIPMAP])
|
||||
{
|
||||
WARN("No mipmap generation support, returning D3DERR_INVALIDCALL.\n");
|
||||
@ -150,7 +150,7 @@ index c94dc5b..63e0668 100644
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
}
|
||||
@@ -1038,6 +1048,7 @@ static HRESULT cubetexture_init(struct wined3d_texture *texture, const struct wi
|
||||
@@ -1063,6 +1073,7 @@ static HRESULT cubetexture_init(struct wined3d_texture *texture, const struct wi
|
||||
else
|
||||
{
|
||||
WARN("Attempted to create a NPOT cube texture (edge length %u) without GL support.\n", desc->width);
|
||||
@ -158,15 +158,15 @@ index c94dc5b..63e0668 100644
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
}
|
||||
@@ -1047,6 +1058,7 @@ static HRESULT cubetexture_init(struct wined3d_texture *texture, const struct wi
|
||||
surface_flags, device, parent, parent_ops, &texture_resource_ops)))
|
||||
@@ -1072,6 +1083,7 @@ static HRESULT cubetexture_init(struct wined3d_texture *texture, const struct wi
|
||||
surface_flags, device, parent, parent_ops, &texture2d_resource_ops)))
|
||||
{
|
||||
WARN("Failed to initialize texture, returning %#x\n", hr);
|
||||
+ HeapFree(GetProcessHeap(), 0, texture);
|
||||
return hr;
|
||||
}
|
||||
|
||||
@@ -1109,6 +1121,7 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
|
||||
@@ -1134,6 +1146,7 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
|
||||
if (WINED3DFMT_UNKNOWN >= desc->format)
|
||||
{
|
||||
WARN("(%p) : Texture cannot be created with a format of WINED3DFMT_UNKNOWN.\n", texture);
|
||||
@ -174,7 +174,7 @@ index c94dc5b..63e0668 100644
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@@ -1139,6 +1152,7 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
|
||||
@@ -1164,6 +1177,7 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
|
||||
else
|
||||
{
|
||||
WARN("Attempted to create a mipmapped NPOT texture without unconditional NPOT support.\n");
|
||||
@ -182,7 +182,7 @@ index c94dc5b..63e0668 100644
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
}
|
||||
@@ -1151,12 +1165,14 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
|
||||
@@ -1176,12 +1190,14 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
|
||||
if (!gl_info->supported[SGIS_GENERATE_MIPMAP])
|
||||
{
|
||||
WARN("No mipmap generation support, returning WINED3DERR_INVALIDCALL.\n");
|
||||
@ -197,15 +197,15 @@ index c94dc5b..63e0668 100644
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
}
|
||||
@@ -1165,6 +1181,7 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
|
||||
surface_flags, device, parent, parent_ops, &texture_resource_ops)))
|
||||
@@ -1190,6 +1206,7 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
|
||||
surface_flags, device, parent, parent_ops, &texture2d_resource_ops)))
|
||||
{
|
||||
WARN("Failed to initialize texture, returning %#x.\n", hr);
|
||||
+ HeapFree(GetProcessHeap(), 0, texture);
|
||||
return hr;
|
||||
}
|
||||
|
||||
@@ -1337,12 +1354,14 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct
|
||||
@@ -1392,12 +1409,14 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct
|
||||
if (WINED3DFMT_UNKNOWN >= desc->format)
|
||||
{
|
||||
WARN("(%p) : Texture cannot be created with a format of WINED3DFMT_UNKNOWN.\n", texture);
|
||||
@ -220,7 +220,7 @@ index c94dc5b..63e0668 100644
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@@ -1352,12 +1371,14 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct
|
||||
@@ -1407,12 +1426,14 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct
|
||||
if (!gl_info->supported[SGIS_GENERATE_MIPMAP])
|
||||
{
|
||||
WARN("No mipmap generation support, returning D3DERR_INVALIDCALL.\n");
|
||||
@ -235,7 +235,7 @@ index c94dc5b..63e0668 100644
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
}
|
||||
@@ -1385,6 +1406,7 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct
|
||||
@@ -1440,6 +1461,7 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct
|
||||
{
|
||||
WARN("Attempted to create a NPOT volume texture (%u, %u, %u) without GL support.\n",
|
||||
desc->width, desc->height, desc->depth);
|
||||
@ -243,15 +243,15 @@ index c94dc5b..63e0668 100644
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
}
|
||||
@@ -1394,6 +1416,7 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct
|
||||
0, device, parent, parent_ops, &texture_resource_ops)))
|
||||
@@ -1449,6 +1471,7 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct
|
||||
0, device, parent, parent_ops, &texture3d_resource_ops)))
|
||||
{
|
||||
WARN("Failed to initialize texture, returning %#x.\n", hr);
|
||||
+ HeapFree(GetProcessHeap(), 0, texture);
|
||||
return hr;
|
||||
}
|
||||
|
||||
@@ -1470,7 +1493,6 @@ HRESULT CDECL wined3d_texture_create(struct wined3d_device *device, const struct
|
||||
@@ -1549,7 +1572,6 @@ HRESULT CDECL wined3d_texture_create(struct wined3d_device *device, const struct
|
||||
if (FAILED(hr))
|
||||
{
|
||||
WARN("Failed to initialize texture, returning %#x.\n", hr);
|
||||
@ -260,10 +260,10 @@ index c94dc5b..63e0668 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index b40d7d3..a0e9871 100644
|
||||
index 55b057c..e5baaa4 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2343,6 +2343,7 @@ static inline struct gl_texture *wined3d_texture_get_gl_texture(struct wined3d_t
|
||||
@@ -2393,6 +2393,7 @@ static inline struct gl_texture *wined3d_texture_get_gl_texture(struct wined3d_t
|
||||
|
||||
void wined3d_texture_apply_sampler_desc(struct wined3d_texture *texture,
|
||||
const struct wined3d_sampler_desc *sampler_desc, const struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN;
|
||||
@ -271,7 +271,7 @@ index b40d7d3..a0e9871 100644
|
||||
void wined3d_texture_bind(struct wined3d_texture *texture,
|
||||
struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN;
|
||||
void wined3d_texture_bind_and_dirtify(struct wined3d_texture *texture,
|
||||
@@ -2772,6 +2773,7 @@ void wined3d_cs_emit_resource_cleanup(struct wined3d_cs *cs,
|
||||
@@ -2827,6 +2828,7 @@ void wined3d_cs_emit_resource_cleanup(struct wined3d_cs *cs,
|
||||
void wined3d_cs_emit_buffer_cleanup(struct wined3d_cs *cs, struct wined3d_buffer *buffer) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_volume_cleanup(struct wined3d_cs *cs, struct wined3d_volume *volume) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_surface_cleanup(struct wined3d_cs *cs, struct wined3d_surface *surface) DECLSPEC_HIDDEN;
|
||||
@ -280,5 +280,5 @@ index b40d7d3..a0e9871 100644
|
||||
/* Direct3D terminology with little modifications. We do not have an issued state
|
||||
* because only the driver knows about it, but we have a created state because d3d
|
||||
--
|
||||
2.4.2
|
||||
2.6.2
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user