Synchronize CSMT patchset with https://github.com/stefand/wine.

This commit is contained in:
Sebastian Lackner 2015-01-14 01:39:10 +01:00
parent b7ec4c3294
commit 322a32547f
20 changed files with 459 additions and 512 deletions

1
debian/changelog vendored
View File

@ -1,6 +1,7 @@
wine-staging (1.7.35) UNRELEASED; urgency=low
* Add support for patchinstall.sh parameters '--no-patchlist' and '--no-autoconf'.
* Add support for Gentoo epatch backend to patchinstall.sh.
* Synchronize CSMT patchset with https://github.com/stefand/wine.
* Added patch to implement support for DDS file format in D3DXSaveTextureToFileInMemory.
* Added patch to avoid appending duplicate NULL character when importing keys with regedit.
* Removed patch to set last error on success in WSARecv (accepted upstream).

View File

@ -1,4 +1,4 @@
From 366b6fe7fb45ebe1010417aedfa3dfab9cd6360b Mon Sep 17 00:00:00 2001
From baf99f4a2a809d820805212096d4fc9deb30fe68 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.
@ -10,9 +10,9 @@ Subject: wined3d: Merge get_pitch functions.
dlls/wined3d/texture.c | 2 +-
dlls/wined3d/volume.c | 28 ++---------------
dlls/wined3d/wined3d.spec | 2 +-
dlls/wined3d/wined3d_private.h | 2 +-
dlls/wined3d/wined3d_private.h | 3 +-
include/wine/wined3d.h | 3 +-
8 files changed, 75 insertions(+), 75 deletions(-)
8 files changed, 75 insertions(+), 76 deletions(-)
diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
index a387d12..9a8d94f 100644
@ -97,7 +97,7 @@ index 0ab55dc..8032a4c 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 fb27c8a..3ffec05 100644
index d7d2b8d..d48a2df 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)
@ -221,7 +221,7 @@ index fb27c8a..3ffec05 100644
else
surface->resource.size = wined3d_format_calculate_size(texture_resource->format,
texture_resource->device->surface_alignment, width, height, 1);
@@ -2681,7 +2665,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
@@ -2834,7 +2818,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
if (format->flags & WINED3DFMT_FLAG_BROKEN_PITCH)
map_desc->row_pitch = surface->resource.width * format->byte_count;
else
@ -230,7 +230,7 @@ index fb27c8a..3ffec05 100644
map_desc->slice_pitch = 0;
if (!rect)
@@ -2861,7 +2845,9 @@ static void read_from_framebuffer(struct wined3d_surface *surface, DWORD dst_loc
@@ -3014,7 +2998,9 @@ static void read_from_framebuffer(struct wined3d_surface *surface, DWORD dst_loc
{
/* glReadPixels returns the image upside down, and there is no way to prevent this.
* Flip the lines in software. */
@ -241,7 +241,7 @@ index fb27c8a..3ffec05 100644
if (!(row = HeapAlloc(GetProcessHeap(), 0, pitch)))
goto error;
@@ -4093,7 +4079,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4246,7 +4232,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
const struct wined3d_color_key_conversion *conversion;
struct wined3d_texture *texture = surface->container;
struct wined3d_context *context;
@ -250,7 +250,7 @@ index fb27c8a..3ffec05 100644
struct wined3d_bo_address data;
struct wined3d_format format;
POINT dst_point = {0, 0};
@@ -4188,7 +4174,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4341,7 +4327,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
else surface->flags &= ~SFLAG_GLCKEY;
width = surface->resource.width;
@ -259,7 +259,7 @@ index fb27c8a..3ffec05 100644
format = *texture->resource.format;
if ((conversion = wined3d_format_get_color_key_conversion(texture, TRUE)))
@@ -4227,9 +4213,9 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4380,9 +4366,9 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
context_release(context);
return E_OUTOFMEMORY;
}
@ -271,7 +271,7 @@ index fb27c8a..3ffec05 100644
data.addr = mem;
}
else if (conversion)
@@ -4249,14 +4235,14 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4402,14 +4388,14 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
}
if (texture->swapchain && texture->swapchain->palette)
palette = texture->swapchain->palette;
@ -290,7 +290,7 @@ index fb27c8a..3ffec05 100644
context_release(context);
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index d33bad1..0a8a550 100644
index d33bad1..1f06f39 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -1340,7 +1340,7 @@ static void texture3d_sub_resource_upload_data(struct wined3d_resource *sub_reso
@ -298,7 +298,7 @@ index d33bad1..0a8a550 100644
unsigned int row_pitch, slice_pitch;
- wined3d_volume_get_pitch(volume, &row_pitch, &slice_pitch);
+ wined3d_resource_get_pitch(&volume->resource, &row_pitch, &slice_pitch);
+ wined3d_resource_get_pitch(sub_resource, &row_pitch, &slice_pitch);
if (row_pitch != data->row_pitch || slice_pitch != data->slice_pitch)
FIXME("Ignoring row/slice pitch (%u/%u).\n", data->row_pitch, data->slice_pitch);
@ -356,7 +356,7 @@ index b5ab862..87b6ab6 100644
if (!box)
diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec
index 7a77003..95885c7 100644
index 9ce4981..c2dda2c 100644
--- a/dlls/wined3d/wined3d.spec
+++ b/dlls/wined3d/wined3d.spec
@@ -181,6 +181,7 @@
@ -376,7 +376,7 @@ index 7a77003..95885c7 100644
@ cdecl wined3d_surface_get_resource(ptr)
@ cdecl wined3d_surface_getdc(ptr ptr)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 047946b..d3af1c0 100644
index 6ebb210..bfb7bcb 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2091,6 +2091,7 @@ struct wined3d_resource
@ -387,7 +387,15 @@ index 047946b..d3af1c0 100644
struct list resource_list_entry;
void *parent;
@@ -2314,7 +2315,6 @@ struct wined3d_surface
@@ -2264,7 +2265,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;
-void wined3d_volume_get_pitch(const struct wined3d_volume *volume, UINT *row_pitch, UINT *slice_pitch) DECLSPEC_HIDDEN;
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;
@@ -2314,7 +2314,6 @@ struct wined3d_surface
DWORD flags;
@ -396,7 +404,7 @@ index 047946b..d3af1c0 100644
UINT pow2Height;
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index 6e06388..cd8fd28 100644
index 92e8169..49b8d25 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -2418,6 +2418,8 @@ static inline HRESULT wined3d_private_store_set_private_data(struct wined3d_priv
@ -417,5 +425,5 @@ index 6e06388..cd8fd28 100644
struct wined3d_surface *render_target);
struct wined3d_resource * __cdecl wined3d_surface_get_resource(struct wined3d_surface *surface);
--
1.9.1
2.2.1

View File

@ -1,43 +1,42 @@
From 8f5ecefe9fba62e68e71b8931b94a658e4b32602 Mon Sep 17 00:00:00 2001
From e872730f9d2dbdb4220860cc6ee5588860971223 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 3 Oct 2013 12:34:13 +0200
Subject: wined3d: Move validate_location to resource.c.
---
dlls/wined3d/resource.c | 7 +++++++
dlls/wined3d/texture.c | 2 +-
dlls/wined3d/texture.c | 4 +---
dlls/wined3d/volume.c | 19 ++++++-------------
dlls/wined3d/wined3d_private.h | 2 +-
4 files changed, 15 insertions(+), 15 deletions(-)
dlls/wined3d/wined3d_private.h | 1 +
4 files changed, 15 insertions(+), 16 deletions(-)
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
index 7594a0d..dd80490 100644
index 8032a4c..2731f27 100644
--- a/dlls/wined3d/resource.c
+++ b/dlls/wined3d/resource.c
@@ -335,6 +335,13 @@ void wined3d_resource_update_draw_binding(struct wined3d_resource *resource)
resource->draw_binding = WINED3D_LOCATION_TEXTURE_RGB;
}
@@ -362,3 +362,10 @@ void CDECL wined3d_resource_get_pitch(const struct wined3d_resource *resource, U
TRACE("Returning row pitch %u, slice pitch %u.\n", *row_pitch, *slice_pitch);
}
+
+void wined3d_resource_validate_location(struct wined3d_resource *resource, DWORD location)
+{
+ 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));
+}
+
void CDECL wined3d_resource_get_pitch(const struct wined3d_resource *resource, UINT *row_pitch,
UINT *slice_pitch)
{
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index 1ff27bc..315a8d0 100644
index 9fe7d25..92f7744 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -1333,7 +1333,7 @@ static void texture3d_sub_resource_validate_location(struct wined3d_resource *su
{
struct wined3d_volume *volume = volume_from_resource(sub_resource);
@@ -1331,9 +1331,7 @@ static void texture3d_sub_resource_invalidate_location(struct wined3d_resource *
static void texture3d_sub_resource_validate_location(struct wined3d_resource *sub_resource, DWORD location)
{
- struct wined3d_volume *volume = volume_from_resource(sub_resource);
-
- wined3d_volume_validate_location(volume, location);
+ wined3d_resource_validate_location(&volume->resource, location);
+ wined3d_resource_validate_location(sub_resource, location);
}
static void texture3d_sub_resource_upload_data(struct wined3d_resource *sub_resource,
@ -114,7 +113,7 @@ index 62eb5ed..e1fa454 100644
else if (!(volume->resource.locations & WINED3D_LOCATION_SYSMEM))
{
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 004969d..edbc066 100644
index a431453..f47c2fb 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2125,6 +2125,7 @@ GLenum wined3d_resource_gl_legacy_map_flags(DWORD d3d_flags) DECLSPEC_HIDDEN;
@ -125,14 +124,6 @@ index 004969d..edbc066 100644
/* Tests show that the start address of resources is 32 byte aligned */
#define RESOURCE_ALIGNMENT 16
@@ -2270,7 +2271,6 @@ void wined3d_volume_get_pitch(const struct wined3d_volume *volume, UINT *row_pit
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;
-void wined3d_volume_validate_location(struct wined3d_volume *volume, DWORD location) DECLSPEC_HIDDEN;
void wined3d_volume_upload_data(struct wined3d_volume *volume, const struct wined3d_context *context,
const struct wined3d_const_bo_address *data) DECLSPEC_HIDDEN;
--
1.9.1
2.2.1

View File

@ -1,4 +1,4 @@
From 988e5a90aab7988d0b301c438c101d9c0a04f699 Mon Sep 17 00:00:00 2001
From 1a7049fa8831453c9a041085a93413b05adc9e2a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Sat, 4 Jan 2014 00:53:47 +0100
Subject: wined3d: Remove surface_validate_location.
@ -8,12 +8,12 @@ Subject: wined3d: Remove surface_validate_location.
dlls/wined3d/device.c | 2 +-
dlls/wined3d/surface.c | 29 +++++++++++------------------
dlls/wined3d/swapchain.c | 12 ++++++------
dlls/wined3d/texture.c | 2 +-
dlls/wined3d/texture.c | 4 +---
dlls/wined3d/wined3d_private.h | 1 -
6 files changed, 20 insertions(+), 28 deletions(-)
6 files changed, 20 insertions(+), 30 deletions(-)
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
index c1b3b6d..08f92cb 100644
index b85f41e..93ecb99 100644
--- a/dlls/wined3d/arb_program_shader.c
+++ b/dlls/wined3d/arb_program_shader.c
@@ -7686,7 +7686,7 @@ HRESULT arbfp_blit_surface(struct wined3d_device *device, DWORD filter,
@ -39,7 +39,7 @@ index 4ac9c3e..99f4e96 100644
}
}
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 93c93bc..d2bbd44 100644
index afe3c57..909d405 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -1224,7 +1224,7 @@ static void surface_unload(struct wined3d_resource *resource)
@ -69,7 +69,7 @@ index 93c93bc..d2bbd44 100644
return WINED3D_OK;
}
@@ -2790,7 +2790,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
@@ -2799,7 +2799,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
{
TRACE("WINED3D_MAP_DISCARD flag passed, marking %s as up to date.\n",
wined3d_debug_location(surface->resource.map_binding));
@ -78,7 +78,7 @@ index 93c93bc..d2bbd44 100644
}
else
{
@@ -3345,7 +3345,7 @@ static void fb_copy_to_texture_direct(struct wined3d_surface *dst_surface, struc
@@ -3354,7 +3354,7 @@ static void fb_copy_to_texture_direct(struct wined3d_surface *dst_surface, struc
/* The texture is now most up to date - If the surface is a render target
* and has a drawable, this path is never entered. */
@ -87,7 +87,7 @@ index 93c93bc..d2bbd44 100644
surface_invalidate_location(dst_surface, ~WINED3D_LOCATION_TEXTURE_RGB);
}
@@ -3619,7 +3619,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
@@ -3628,7 +3628,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
/* The texture is now most up to date - If the surface is a render target
* and has a drawable, this path is never entered. */
@ -96,7 +96,7 @@ index 93c93bc..d2bbd44 100644
surface_invalidate_location(dst_surface, ~WINED3D_LOCATION_TEXTURE_RGB);
}
@@ -3932,7 +3932,7 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE
@@ -3941,7 +3941,7 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE
wined3d_texture_set_color_key(src_surface->container, WINEDDCKEY_SRCBLT,
(old_color_key_flags & WINEDDSD_CKSRCBLT) ? &old_blt_key : NULL);
@ -105,7 +105,7 @@ index 93c93bc..d2bbd44 100644
surface_invalidate_location(dst_surface, ~dst_surface->container->resource.draw_binding);
return WINED3D_OK;
@@ -4177,13 +4177,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
@@ -4186,13 +4186,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
surface->ds_current_size.cy = surface->resource.height;
}
@ -119,7 +119,7 @@ index 93c93bc..d2bbd44 100644
void surface_invalidate_location(struct wined3d_surface *surface, DWORD location)
{
TRACE("surface %p, location %s.\n", surface, wined3d_debug_location(location));
@@ -4579,7 +4572,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
@@ -4588,7 +4581,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
break;
}
@ -128,7 +128,7 @@ index 93c93bc..d2bbd44 100644
if (location != WINED3D_LOCATION_SYSMEM && (surface->resource.locations & WINED3D_LOCATION_SYSMEM))
surface_evict_sysmem(surface);
@@ -5674,7 +5667,7 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
@@ -5683,7 +5676,7 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
dst_surface, dst_surface->container->resource.draw_binding, &dst_rect);
context_release(context);
@ -137,7 +137,7 @@ index 93c93bc..d2bbd44 100644
surface_invalidate_location(dst_surface, ~dst_surface->container->resource.draw_binding);
return WINED3D_OK;
@@ -5771,7 +5764,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
@@ -5780,7 +5773,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
}
surface->container = container;
@ -146,7 +146,7 @@ index 93c93bc..d2bbd44 100644
list_init(&surface->renderbuffers);
list_init(&surface->overlays);
@@ -5803,7 +5796,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
@@ -5812,7 +5805,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
if (surface->resource.map_binding == WINED3D_LOCATION_DIB)
{
wined3d_resource_free_sysmem(&surface->resource);
@ -202,20 +202,22 @@ index 601d3ad..bdb4b67 100644
}
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index 315a8d0..5bcbd12 100644
index 92f7744..6692118 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -876,7 +876,7 @@ static void texture2d_sub_resource_validate_location(struct wined3d_resource *su
{
struct wined3d_surface *surface = surface_from_resource(sub_resource);
@@ -874,9 +874,7 @@ static void texture2d_sub_resource_invalidate_location(struct wined3d_resource *
static void texture2d_sub_resource_validate_location(struct wined3d_resource *sub_resource, DWORD location)
{
- struct wined3d_surface *surface = surface_from_resource(sub_resource);
-
- surface_validate_location(surface, location);
+ wined3d_resource_validate_location(&surface->resource, location);
+ wined3d_resource_validate_location(sub_resource, location);
}
static void texture2d_sub_resource_upload_data(struct wined3d_resource *sub_resource,
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 8203200..1a5cc7b 100644
index 9186720..3e13ae8 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2383,7 +2383,6 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,

View File

@ -1,4 +1,4 @@
From e91b559bcccc65140b04128ad41db21413065cf9 Mon Sep 17 00:00:00 2001
From 025d8d22909fa65d7315f97042cc12efa5809657 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 3 Oct 2013 12:36:46 +0200
Subject: wined3d: Move invalidate_location to resource.c.
@ -8,8 +8,8 @@ Subject: wined3d: Move invalidate_location to resource.c.
dlls/wined3d/resource.c | 7 +++++++
dlls/wined3d/texture.c | 4 +---
dlls/wined3d/volume.c | 21 +++++++--------------
dlls/wined3d/wined3d_private.h | 2 +-
5 files changed, 17 insertions(+), 19 deletions(-)
dlls/wined3d/wined3d_private.h | 3 +--
5 files changed, 17 insertions(+), 20 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 99f4e96..bde37b1 100644
@ -25,28 +25,25 @@ index 99f4e96..bde37b1 100644
context_release(context);
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
index dd80490..534cf80 100644
index 2731f27..89865ef 100644
--- a/dlls/wined3d/resource.c
+++ b/dlls/wined3d/resource.c
@@ -342,6 +342,13 @@ void wined3d_resource_validate_location(struct wined3d_resource *resource, DWORD
@@ -369,3 +369,10 @@ void wined3d_resource_validate_location(struct wined3d_resource *resource, DWORD
resource->locations |= location;
TRACE("new location flags are %s.\n", wined3d_debug_location(resource->locations));
}
+
+void wined3d_resource_invalidate_location(struct wined3d_resource *resource, DWORD location)
+{
+ 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));
+}
+
void CDECL wined3d_resource_get_pitch(const struct wined3d_resource *resource, UINT *row_pitch,
UINT *slice_pitch)
{
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index 5bcbd12..0113efc 100644
index 6692118..522ffd6 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -1324,9 +1324,7 @@ static void texture3d_sub_resource_cleanup(struct wined3d_resource *sub_resource
@@ -1322,9 +1322,7 @@ static void texture3d_sub_resource_cleanup(struct wined3d_resource *sub_resource
static void texture3d_sub_resource_invalidate_location(struct wined3d_resource *sub_resource, DWORD location)
{
@ -137,7 +134,7 @@ index e1fa454..722f92e 100644
volume->resource.map_count++;
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 1a5cc7b..232e956 100644
index 3e13ae8..fd82ec3 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2126,6 +2126,7 @@ BOOL wined3d_resource_is_offscreen(struct wined3d_resource *resource) DECLSPEC_H
@ -148,14 +145,15 @@ index 1a5cc7b..232e956 100644
/* Tests show that the start address of resources is 32 byte aligned */
#define RESOURCE_ALIGNMENT 16
@@ -2270,7 +2271,6 @@ void wined3d_volume_destroy(struct wined3d_volume *volume) DECLSPEC_HIDDEN;
void wined3d_volume_get_pitch(const struct wined3d_volume *volume, UINT *row_pitch, UINT *slice_pitch) DECLSPEC_HIDDEN;
@@ -2269,8 +2270,6 @@ HRESULT wined3d_volume_create(struct wined3d_texture *container, const struct wi
void wined3d_volume_destroy(struct wined3d_volume *volume) DECLSPEC_HIDDEN;
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;
-void wined3d_volume_validate_location(struct wined3d_volume *volume, DWORD location) DECLSPEC_HIDDEN;
void wined3d_volume_upload_data(struct wined3d_volume *volume, const struct wined3d_context *context,
const struct wined3d_const_bo_address *data) DECLSPEC_HIDDEN;
--
1.9.1
2.2.1

View File

@ -1,4 +1,4 @@
From 39c0dd79f403ac4aac1cf660e207b0ed2703e81b Mon Sep 17 00:00:00 2001
From 28ac147348a282c737e546db1c83c213060915a0 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.
@ -35,20 +35,18 @@ index 989026f..d9bc820 100644
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 1ec27d3..9d2db2b 100644
index 89865ef..a63eab8 100644
--- a/dlls/wined3d/resource.c
+++ b/dlls/wined3d/resource.c
@@ -344,6 +344,8 @@ void wined3d_resource_invalidate_location(struct wined3d_resource *resource, DWO
@@ -375,4 +375,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));
+
+ resource->resource_ops->resource_location_invalidated(resource, location);
}
void CDECL wined3d_resource_get_pitch(const struct wined3d_resource *resource, UINT *row_pitch,
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index b56796e..6c2698a 100644
index 909d405..1a57219 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -1273,11 +1273,17 @@ static void surface_unload(struct wined3d_resource *resource)
@ -70,10 +68,10 @@ index b56796e..6c2698a 100644
static const struct wined3d_surface_ops surface_ops =
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index f003fa2..c42e475 100644
index 522ffd6..f2bba1a 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -986,11 +986,17 @@ static void wined3d_texture_unload(struct wined3d_resource *resource)
@@ -1036,11 +1036,17 @@ static void wined3d_texture_unload(struct wined3d_resource *resource)
wined3d_texture_unload_gl_texture(texture);
}
@ -92,10 +90,10 @@ index f003fa2..c42e475 100644
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 3b742d2..6921b87 100644
index 722f92e..2cc0baf 100644
--- a/dlls/wined3d/volume.c
+++ b/dlls/wined3d/volume.c
@@ -631,10 +631,7 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume,
@@ -632,10 +632,7 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume,
}
if (!(flags & (WINED3D_MAP_NO_DIRTY_UPDATE | WINED3D_MAP_READONLY)))
@ -106,7 +104,7 @@ index 3b742d2..6921b87 100644
volume->resource.map_count++;
@@ -688,11 +685,20 @@ static ULONG volume_resource_decref(struct wined3d_resource *resource)
@@ -689,11 +686,20 @@ static ULONG volume_resource_decref(struct wined3d_resource *resource)
return wined3d_volume_decref(volume_from_resource(resource));
}
@ -128,10 +126,10 @@ index 3b742d2..6921b87 100644
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 fd28fa5..60d1b56 100644
index fd82ec3..acee894 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2057,6 +2057,7 @@ struct wined3d_resource_ops
@@ -2068,6 +2068,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);
@ -140,5 +138,5 @@ index fd28fa5..60d1b56 100644
struct wined3d_resource
--
2.1.3
2.2.1

View File

@ -1,4 +1,4 @@
From 647e3b2622558e3a8350bb3521fdbd3119b92d95 Mon Sep 17 00:00:00 2001
From 2ccc91e1322be4c1cffed1dd28c04e42466955f2 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.
@ -41,13 +41,14 @@ index d9bc820..2e44f0f 100644
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 9d2db2b..63f8584 100644
index a63eab8..7f283f5 100644
--- a/dlls/wined3d/resource.c
+++ b/dlls/wined3d/resource.c
@@ -348,6 +348,56 @@ void wined3d_resource_invalidate_location(struct wined3d_resource *resource, DWO
@@ -378,3 +378,53 @@ void wined3d_resource_invalidate_location(struct wined3d_resource *resource, DWO
resource->resource_ops->resource_location_invalidated(resource, location);
}
+
+DWORD wined3d_resource_access_from_location(DWORD location)
+{
+ switch (location)
@ -97,12 +98,8 @@ index 9d2db2b..63f8584 100644
+
+ resource->resource_ops->resource_load_location(resource, context, location);
+}
+
void CDECL wined3d_resource_get_pitch(const struct wined3d_resource *resource, UINT *row_pitch,
UINT *slice_pitch)
{
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index c689880..de57d25 100644
index 738941e..73e74a6 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -1281,12 +1281,20 @@ static void wined3d_surface_location_invalidated(struct wined3d_resource *resour
@ -126,7 +123,7 @@ index c689880..de57d25 100644
};
static const struct wined3d_surface_ops surface_ops =
@@ -4041,7 +4049,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
@@ -4195,7 +4203,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
surface->ds_current_size.cy = surface->resource.height;
}
@ -135,7 +132,7 @@ index c689880..de57d25 100644
{
switch (location)
{
@@ -4380,7 +4388,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
@@ -4535,7 +4543,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
if (WARN_ON(d3d_surface))
{
@ -145,10 +142,10 @@ index c689880..de57d25 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 941d935..ea9eacc 100644
index 6d82ce6..fc0f6d6 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -989,12 +989,20 @@ static void wined3d_texture_load_location_invalidated(struct wined3d_resource *r
@@ -1039,12 +1039,20 @@ static void wined3d_texture_load_location_invalidated(struct wined3d_resource *r
ERR("Should not be called on textures.\n");
}
@ -170,10 +167,10 @@ index 941d935..ea9eacc 100644
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 6921b87..c93a1ef 100644
index 2cc0baf..3c51bdf 100644
--- a/dlls/wined3d/volume.c
+++ b/dlls/wined3d/volume.c
@@ -136,27 +136,6 @@ static void wined3d_volume_evict_sysmem(struct wined3d_volume *volume)
@@ -137,27 +137,6 @@ static void wined3d_volume_evict_sysmem(struct wined3d_volume *volume)
wined3d_resource_invalidate_location(&volume->resource, WINED3D_LOCATION_SYSMEM);
}
@ -201,7 +198,7 @@ index 6921b87..c93a1ef 100644
/* Context activation is done by the caller. */
static void wined3d_volume_srgb_transfer(struct wined3d_volume *volume,
struct wined3d_context *context, BOOL dest_is_srgb)
@@ -196,21 +175,17 @@ static BOOL wined3d_volume_can_evict(const struct wined3d_volume *volume)
@@ -197,21 +176,17 @@ static BOOL wined3d_volume_can_evict(const struct wined3d_volume *volume)
return TRUE;
}
@ -227,7 +224,7 @@ index 6921b87..c93a1ef 100644
if ((volume->resource.access_flags & required_access) != required_access)
{
ERR("Operation requires %#x access, but volume only has %#x.\n",
@@ -332,7 +307,7 @@ static void wined3d_volume_load_location(struct wined3d_volume *volume,
@@ -333,7 +308,7 @@ static void wined3d_volume_load_location(struct wined3d_volume *volume,
void wined3d_volume_load(struct wined3d_volume *volume, struct wined3d_context *context, BOOL srgb_mode)
{
wined3d_texture_prepare_texture(volume->container, context, srgb_mode);
@ -236,7 +233,7 @@ index 6921b87..c93a1ef 100644
srgb_mode ? WINED3D_LOCATION_TEXTURE_SRGB : WINED3D_LOCATION_TEXTURE_RGB);
}
@@ -391,7 +366,7 @@ static void volume_unload(struct wined3d_resource *resource)
@@ -392,7 +367,7 @@ static void volume_unload(struct wined3d_resource *resource)
if (volume_prepare_system_memory(volume))
{
context = context_acquire(device, NULL);
@ -245,7 +242,7 @@ index 6921b87..c93a1ef 100644
context_release(context);
wined3d_resource_invalidate_location(&volume->resource, ~WINED3D_LOCATION_SYSMEM);
}
@@ -546,7 +521,7 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume,
@@ -547,7 +522,7 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume,
if (flags & WINED3D_MAP_DISCARD)
wined3d_resource_validate_location(&volume->resource, WINED3D_LOCATION_BUFFER);
else
@ -254,7 +251,7 @@ index 6921b87..c93a1ef 100644
GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, volume->pbo));
@@ -584,7 +559,7 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume,
@@ -585,7 +560,7 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume,
else if (!(volume->resource.locations & WINED3D_LOCATION_SYSMEM))
{
context = context_acquire(device, NULL);
@ -263,7 +260,7 @@ index 6921b87..c93a1ef 100644
context_release(context);
}
base_memory = volume->resource.heap_memory;
@@ -699,6 +674,7 @@ static const struct wined3d_resource_ops volume_resource_ops =
@@ -700,6 +675,7 @@ static const struct wined3d_resource_ops volume_resource_ops =
volume_resource_decref,
volume_unload,
wined3d_volume_location_invalidated,
@ -272,10 +269,10 @@ index 6921b87..c93a1ef 100644
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 52280a7..b1e4cb6 100644
index b533108..4db209a 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2058,6 +2058,8 @@ struct wined3d_resource_ops
@@ -2069,6 +2069,8 @@ struct wined3d_resource_ops
ULONG (*resource_decref)(struct wined3d_resource *resource);
void (*resource_unload)(struct wined3d_resource *resource);
void (*resource_location_invalidated)(struct wined3d_resource *resource, DWORD location);
@ -284,7 +281,7 @@ index 52280a7..b1e4cb6 100644
};
struct wined3d_resource
@@ -2108,15 +2110,18 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
@@ -2119,15 +2121,18 @@ 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;
@ -305,5 +302,5 @@ index 52280a7..b1e4cb6 100644
/* Tests show that the start address of resources is 32 byte aligned */
#define RESOURCE_ALIGNMENT 16
--
2.1.3
2.2.1

View File

@ -1,4 +1,4 @@
From 437cae1236351d1ce2d0a6e5a2179de17932390b Mon Sep 17 00:00:00 2001
From f6dd61b4db19ba22e8e8f7d9d6bcf92e4419dc0f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 16 Jan 2014 22:07:17 +0100
Subject: wined3d: Move volume PBO infrastructure into the resource.
@ -10,10 +10,10 @@ Subject: wined3d: Move volume PBO infrastructure into the resource.
3 files changed, 82 insertions(+), 79 deletions(-)
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
index 6cbf120..ef7a52a 100644
index 7f283f5..c1ec97b 100644
--- a/dlls/wined3d/resource.c
+++ b/dlls/wined3d/resource.c
@@ -295,7 +295,7 @@ GLbitfield wined3d_resource_gl_map_flags(DWORD d3d_flags)
@@ -292,7 +292,7 @@ GLbitfield wined3d_resource_gl_map_flags(DWORD d3d_flags)
return ret;
}
@ -22,10 +22,11 @@ index 6cbf120..ef7a52a 100644
{
if (d3d_flags & WINED3D_MAP_READONLY)
return GL_READ_ONLY_ARB;
@@ -401,6 +401,68 @@ void wined3d_resource_load_location(struct wined3d_resource *resource,
@@ -428,3 +428,65 @@ void wined3d_resource_load_location(struct wined3d_resource *resource,
resource->resource_ops->resource_load_location(resource, context, location);
}
+
+BYTE *wined3d_resource_get_map_ptr(const struct wined3d_resource *resource,
+ const struct wined3d_context *context, DWORD flags)
+{
@ -87,10 +88,6 @@ index 6cbf120..ef7a52a 100644
+ return;
+ }
+}
+
void CDECL wined3d_resource_get_pitch(const struct wined3d_resource *resource, UINT *row_pitch,
UINT *slice_pitch)
{
diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
index 2e92dd7..c538e08 100644
--- a/dlls/wined3d/volume.c
@ -270,17 +267,17 @@ index 2e92dd7..c538e08 100644
volume->resource.map_count--;
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 342b900..ff2f205 100644
index 4934dc8..8cce2d9 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2094,6 +2094,7 @@ struct wined3d_resource
UINT size;
@@ -2095,6 +2095,7 @@ struct wined3d_resource
DWORD priority;
void *heap_memory, *user_memory, *bitmap_data;
+ GLuint buffer_object;
UINT custom_row_pitch, custom_slice_pitch;
+ GLuint buffer_object;
struct list resource_list_entry;
DWORD locations;
@@ -2124,12 +2125,15 @@ void resource_unload(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
DWORD wined3d_resource_access_from_location(DWORD location) DECLSPEC_HIDDEN;
BOOL wined3d_resource_allocate_sysmem(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
@ -307,5 +304,5 @@ index 342b900..ff2f205 100644
static inline struct wined3d_volume *volume_from_resource(struct wined3d_resource *resource)
--
1.9.1
2.2.1

View File

@ -1,4 +1,4 @@
From a95bca19bbfd77bc151a29981e4cdd5c759f8821 Mon Sep 17 00:00:00 2001
From bd0eabcb62d243fc8ff0dd5fbe200caf9b1db1e1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Wed, 18 Sep 2013 22:49:34 +0200
Subject: wined3d: Move buffer creation into the resource.
@ -8,17 +8,17 @@ Before doing that, surfaces and buffers have to be migrated to the new
location scheme. Otherwise the unimplemented buffer_load_location and
surface_load_location will write a lot of ERRs.
---
dlls/wined3d/resource.c | 66 ++++++++++++++++++++++++++++++++++++
dlls/wined3d/resource.c | 66 ++++++++++++++++++++++++++++++++++++++++++
dlls/wined3d/texture.c | 2 +-
dlls/wined3d/volume.c | 76 ++----------------------------------------
dlls/wined3d/volume.c | 63 ++--------------------------------------
dlls/wined3d/wined3d_private.h | 4 ++-
4 files changed, 72 insertions(+), 76 deletions(-)
4 files changed, 72 insertions(+), 63 deletions(-)
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
index b3c87ba..369ea52 100644
index ea146d1..1760969 100644
--- a/dlls/wined3d/resource.c
+++ b/dlls/wined3d/resource.c
@@ -145,6 +145,18 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
@@ -142,6 +142,18 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
return WINED3D_OK;
}
@ -37,7 +37,7 @@ index b3c87ba..369ea52 100644
void resource_cleanup(struct wined3d_resource *resource)
{
const struct wined3d *d3d = resource->device->wined3d;
@@ -157,6 +169,9 @@ void resource_cleanup(struct wined3d_resource *resource)
@@ -154,6 +166,9 @@ void resource_cleanup(struct wined3d_resource *resource)
adapter_adjust_memory(resource->device->adapter, (INT64)0 - resource->size);
}
@ -47,7 +47,7 @@ index b3c87ba..369ea52 100644
wined3d_resource_free_sysmem(resource);
device_resource_released(resource->device, resource);
@@ -167,6 +182,9 @@ void resource_unload(struct wined3d_resource *resource)
@@ -164,6 +179,9 @@ void resource_unload(struct wined3d_resource *resource)
if (resource->map_count)
ERR("Resource %p is being unloaded while mapped.\n", resource);
@ -57,10 +57,11 @@ index b3c87ba..369ea52 100644
context_resource_unloaded(resource->device,
resource, resource->type);
}
@@ -471,6 +489,54 @@ void wined3d_resource_release_map_ptr(const struct wined3d_resource *resource,
@@ -498,3 +516,51 @@ void wined3d_resource_release_map_ptr(const struct wined3d_resource *resource,
return;
}
}
+
+/* Context activation is done by the caller. */
+static void wined3d_resource_prepare_bo(struct wined3d_resource *resource, const struct wined3d_context *context)
+{
@ -108,15 +109,11 @@ index b3c87ba..369ea52 100644
+ return FALSE;
+ }
+}
+
void CDECL wined3d_resource_get_pitch(const struct wined3d_resource *resource, UINT *row_pitch,
UINT *slice_pitch)
{
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index 35010b0..91e8b72 100644
index 066219d..9981703 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -1378,7 +1378,7 @@ static void texture3d_prepare_texture(struct wined3d_texture *texture, struct wi
@@ -1374,7 +1374,7 @@ static void texture3d_prepare_texture(struct wined3d_texture *texture, struct wi
void *mem = NULL;
if (gl_info->supported[APPLE_CLIENT_STORAGE] && !format->convert
@ -126,30 +123,10 @@ index 35010b0..91e8b72 100644
TRACE("Enabling GL_UNPACK_CLIENT_STORAGE_APPLE for volume %p\n", volume);
gl_info->gl_ops.gl.p_glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE);
diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
index c538e08..4842170 100644
index c538e08..af2fbd1 100644
--- a/dlls/wined3d/volume.c
+++ b/dlls/wined3d/volume.c
@@ -27,19 +27,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(d3d_surface);
WINE_DECLARE_DEBUG_CHANNEL(d3d_perf);
-BOOL volume_prepare_system_memory(struct wined3d_volume *volume)
-{
- if (volume->resource.heap_memory)
- return TRUE;
-
- if (!wined3d_resource_allocate_sysmem(&volume->resource))
- {
- ERR("Failed to allocate system memory.\n");
- return FALSE;
- }
- return TRUE;
-}
-
/* Context activation is done by the caller. */
void wined3d_volume_upload_data(struct wined3d_volume *volume, const struct wined3d_context *context,
const struct wined3d_const_bo_address *data)
@@ -312,42 +299,10 @@ void wined3d_volume_load(struct wined3d_volume *volume, struct wined3d_context *
@@ -312,42 +312,10 @@ void wined3d_volume_load(struct wined3d_volume *volume, struct wined3d_context *
srgb_mode ? WINED3D_LOCATION_TEXTURE_SRGB : WINED3D_LOCATION_TEXTURE_RGB);
}
@ -192,7 +169,7 @@ index c538e08..4842170 100644
resource_cleanup(&volume->resource);
volume->resource.parent_ops->wined3d_object_destroyed(volume->resource.parent);
HeapFree(GetProcessHeap(), 0, volume);
@@ -364,7 +319,7 @@ static void volume_unload(struct wined3d_resource *resource)
@@ -364,7 +332,7 @@ static void volume_unload(struct wined3d_resource *resource)
TRACE("texture %p.\n", resource);
@ -201,7 +178,7 @@ index c538e08..4842170 100644
{
context = context_acquire(device, NULL);
wined3d_resource_load_location(&volume->resource, context, WINED3D_LOCATION_SYSMEM);
@@ -378,15 +333,6 @@ static void volume_unload(struct wined3d_resource *resource)
@@ -378,15 +346,6 @@ static void volume_unload(struct wined3d_resource *resource)
wined3d_resource_invalidate_location(&volume->resource, ~WINED3D_LOCATION_DISCARDED);
}
@ -217,7 +194,7 @@ index c538e08..4842170 100644
/* The texture name is managed by the container. */
volume->flags &= ~WINED3D_VFLAG_CLIENT_STORAGE;
@@ -476,24 +422,6 @@ static BOOL wined3d_volume_check_box_dimensions(const struct wined3d_volume *vol
@@ -476,24 +435,6 @@ static BOOL wined3d_volume_check_box_dimensions(const struct wined3d_volume *vol
return TRUE;
}
@ -242,7 +219,7 @@ index c538e08..4842170 100644
HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume,
struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags)
{
@@ -531,7 +459,7 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume,
@@ -531,7 +472,7 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume,
flags = wined3d_resource_sanitize_map_flags(&volume->resource, flags);
context = context_acquire(device, NULL);
@ -252,7 +229,7 @@ index c538e08..4842170 100644
WARN("Out of memory.\n");
map_desc->data = NULL;
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index a924009..26d2d5d 100644
index 7efecd4..4605542 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2132,6 +2132,9 @@ void wined3d_resource_invalidate_location(struct wined3d_resource *resource, DWO
@ -274,5 +251,5 @@ index a924009..26d2d5d 100644
unsigned int level, struct wined3d_volume **volume) DECLSPEC_HIDDEN;
void wined3d_volume_destroy(struct wined3d_volume *volume) DECLSPEC_HIDDEN;
--
1.9.1
2.2.1

View File

@ -1,4 +1,4 @@
From 56c5228fce24415412c59b16744c1eab1fb6e038 Mon Sep 17 00:00:00 2001
From ba90a0acc5f192214213ee08fe82285e89700f8e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 19 Sep 2013 14:55:00 +0200
Subject: wined3d: Move check_block_align to resource.c
@ -11,12 +11,12 @@ Subject: wined3d: Move check_block_align to resource.c
4 files changed, 43 insertions(+), 45 deletions(-)
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
index 94c06ac..947fe8d 100644
index 8a1d8a1..d559fe8 100644
--- a/dlls/wined3d/resource.c
+++ b/dlls/wined3d/resource.c
@@ -606,3 +606,31 @@ void CDECL wined3d_resource_get_pitch(const struct wined3d_resource *resource, U
TRACE("Returning row pitch %u, slice pitch %u.\n", *row_pitch, *slice_pitch);
@@ -606,3 +606,31 @@ BOOL wined3d_resource_prepare_map_memory(struct wined3d_resource *resource, stru
return FALSE;
}
}
+
+BOOL wined3d_resource_check_block_align(const struct wined3d_resource *resource,
@ -47,10 +47,10 @@ index 94c06ac..947fe8d 100644
+ return TRUE;
+}
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 50d7e74..6fa2576 100644
index 44e3f72..527017a 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -1531,23 +1531,18 @@ static void surface_upload_data(struct wined3d_surface *surface, const struct wi
@@ -1531,23 +1531,18 @@ void wined3d_surface_upload_data(struct wined3d_surface *surface, const struct w
static BOOL surface_check_block_align(struct wined3d_surface *surface, const RECT *rect)
{
@ -86,10 +86,10 @@ index 50d7e74..6fa2576 100644
HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const POINT *dst_point,
diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
index 9ad7d75..c11c98c 100644
index d77fc21..7808ed5 100644
--- a/dlls/wined3d/volume.c
+++ b/dlls/wined3d/volume.c
@@ -361,34 +361,6 @@ struct wined3d_resource * CDECL wined3d_volume_get_resource(struct wined3d_volum
@@ -375,34 +375,6 @@ struct wined3d_resource * CDECL wined3d_volume_get_resource(struct wined3d_volum
return &volume->resource;
}
@ -124,7 +124,7 @@ index 9ad7d75..c11c98c 100644
static BOOL wined3d_volume_check_box_dimensions(const struct wined3d_volume *volume,
const struct wined3d_box *box)
{
@@ -438,7 +410,8 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume,
@@ -452,7 +424,8 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume,
WARN("Map box is invalid.\n");
return WINED3DERR_INVALIDCALL;
}
@ -135,10 +135,10 @@ index 9ad7d75..c11c98c 100644
WARN("Map box is misaligned for %ux%u blocks.\n",
format->block_width, format->block_height);
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index d69a581..35f2445 100644
index e7fd8ad..e32d650 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2113,6 +2113,8 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
@@ -2124,6 +2124,8 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
void resource_unload(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
DWORD wined3d_resource_access_from_location(DWORD location) DECLSPEC_HIDDEN;
BOOL wined3d_resource_allocate_sysmem(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
@ -148,5 +148,5 @@ index d69a581..35f2445 100644
BYTE *wined3d_resource_get_map_ptr(const struct wined3d_resource *resource,
const struct wined3d_context *context, DWORD flags) DECLSPEC_HIDDEN;
--
2.1.3
2.2.1

View File

@ -1,4 +1,4 @@
From d8d04cd60fafff413cb9f04efe1e5807eebf95b5 Mon Sep 17 00:00:00 2001
From 3b80eec8bd2af7858157bdd2b821f7946023081f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Mon, 29 Apr 2013 18:49:53 +0200
Subject: wined3d: Send blits through the command stream.
@ -108,10 +108,10 @@ index 949bd6b..dcaedfd 100644
{
struct wined3d_cs_block *block;
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index e2cc4c2..8536927 100644
index 6e8e2f5..8a833d5 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -5083,14 +5083,13 @@ const struct blit_shader cpu_blit = {
@@ -5092,14 +5092,13 @@ const struct blit_shader cpu_blit = {
cpu_blit_depth_fill,
};
@ -128,7 +128,7 @@ index e2cc4c2..8536927 100644
BOOL scale, convert;
static const DWORD simple_blit = WINEDDBLT_ASYNC
@@ -5099,111 +5098,6 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
@@ -5108,111 +5107,6 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
| WINEDDBLT_DEPTHFILL
| WINEDDBLT_DONOTWAIT;
@ -240,7 +240,7 @@ index e2cc4c2..8536927 100644
if (!device->d3d_initialized)
{
WARN("D3D not initialized, using fallback.\n");
@@ -5246,8 +5140,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
@@ -5255,8 +5149,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
}
scale = src_surface
@ -251,7 +251,7 @@ index e2cc4c2..8536927 100644
convert = src_surface && src_surface->resource.format->id != dst_surface->resource.format->id;
dst_ds_flags = dst_surface->resource.format->flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL);
@@ -5265,22 +5159,16 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
@@ -5274,22 +5168,16 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
TRACE("Depth fill.\n");
if (!surface_convert_depth_to_float(dst_surface, fx->u5.dwFillDepth, &depth))
@ -279,7 +279,7 @@ index e2cc4c2..8536927 100644
}
}
else
@@ -5307,8 +5195,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
@@ -5316,8 +5204,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
if (!surface_convert_color_to_float(dst_surface, fx->u5.dwFillColor, &color))
goto fallback;
@ -290,7 +290,7 @@ index e2cc4c2..8536927 100644
}
else
{
@@ -5324,9 +5212,9 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
@@ -5333,9 +5221,9 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
TRACE("Not doing upload because of format conversion.\n");
else
{
@ -302,7 +302,7 @@ index e2cc4c2..8536927 100644
{
if (!wined3d_resource_is_offscreen(&dst_surface->container->resource))
{
@@ -5335,7 +5223,7 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
@@ -5344,7 +5232,7 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
dst_surface->container->resource.draw_binding);
context_release(context);
}
@ -311,7 +311,7 @@ index e2cc4c2..8536927 100644
}
}
}
@@ -5360,51 +5248,192 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
@@ -5369,51 +5257,192 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
wined3d_swapchain_present(dst_swapchain, NULL, NULL, dst_swapchain->win_handle, NULL, 0);
dst_swapchain->desc.swap_effect = swap_effect;
@ -518,20 +518,20 @@ index e2cc4c2..8536927 100644
static const struct wined3d_resource_ops surface_resource_ops =
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 3c04b1b..6889bd8 100644
index 041feb3..342577c 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2424,6 +2424,9 @@ HRESULT wined3d_surface_create(struct wined3d_texture *container, const struct w
GLenum target, unsigned int level, unsigned int layer, DWORD flags,
struct wined3d_surface **surface) DECLSPEC_HIDDEN;
void wined3d_surface_destroy(struct wined3d_surface *surface) DECLSPEC_HIDDEN;
+void surface_blt_ugly(struct wined3d_surface *dst_surface, const RECT *dst_rect_in,
+ struct wined3d_surface *src_surface, const RECT *src_rect_in, DWORD flags,
+ const WINEDDBLTFX *fx, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
@@ -2426,6 +2426,9 @@ void wined3d_surface_destroy(struct wined3d_surface *surface) DECLSPEC_HIDDEN;
void wined3d_surface_upload_data(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info,
const struct wined3d_format *format, const RECT *src_rect, UINT src_pitch, const POINT *dst_point,
BOOL srgb, const struct wined3d_const_bo_address *data) DECLSPEC_HIDDEN;
@@ -2571,6 +2574,7 @@ struct wined3d_cs
+void surface_blt_ugly(struct wined3d_surface *dst_surface, const RECT *dst_rect_in,
+ struct wined3d_surface *src_surface, const RECT *src_rect_in, DWORD flags,
+ const WINEDDBLTFX *fx, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
void draw_textured_quad(const struct wined3d_surface *src_surface, struct wined3d_context *context,
const RECT *src_rect, const RECT *dst_rect, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
@@ -2570,6 +2573,7 @@ struct wined3d_cs
struct wined3d_device *device;
struct wined3d_state state;
HANDLE thread;
@ -539,7 +539,7 @@ index 3c04b1b..6889bd8 100644
DWORD tls_idx;
struct wined3d_surface *onscreen_depth_stencil;
@@ -2647,6 +2651,10 @@ void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs,
@@ -2646,6 +2650,10 @@ void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs,
GLenum primitive_type) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light_info *light) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, UINT idx, BOOL enable) DECLSPEC_HIDDEN;
@ -551,5 +551,5 @@ index 3c04b1b..6889bd8 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
--
1.9.1
2.2.1

View File

@ -1,4 +1,4 @@
From 69549fe872a05e2bfb752d583f7342cf52dd6228 Mon Sep 17 00:00:00 2001
From 4189bd1a023b867ae97450130cbff011128b87fd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Wed, 20 Aug 2014 14:14:23 +0200
Subject: wined3d: Put update_surface checks back in place
@ -96,7 +96,7 @@ index 5242028..a4d1c53 100644
{
FIXME("Waiting for cs.\n");
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 8536927..01bee3e 100644
index 8a833d5..7c47055 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -1420,7 +1420,7 @@ void wined3d_surface_upload_data(struct wined3d_surface *surface, const struct w
@ -109,17 +109,17 @@ index 8536927..01bee3e 100644
struct wined3d_box box;
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 6889bd8..c3b1c28 100644
index 342577c..5eec3c6 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2427,6 +2427,7 @@ void wined3d_surface_destroy(struct wined3d_surface *surface) DECLSPEC_HIDDEN;
@@ -2429,6 +2429,7 @@ void wined3d_surface_upload_data(struct wined3d_surface *surface, const struct w
void surface_blt_ugly(struct wined3d_surface *dst_surface, const RECT *dst_rect_in,
struct wined3d_surface *src_surface, const RECT *src_rect_in, DWORD flags,
const WINEDDBLTFX *fx, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
+BOOL surface_check_block_align(struct wined3d_surface *surface, const RECT *rect) DECLSPEC_HIDDEN;
void wined3d_surface_upload_data(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info,
const struct wined3d_format *format, const RECT *src_rect, UINT src_pitch, const POINT *dst_point,
BOOL srgb, const struct wined3d_const_bo_address *data) DECLSPEC_HIDDEN;
void draw_textured_quad(const struct wined3d_surface *src_surface, struct wined3d_context *context,
const RECT *src_rect, const RECT *dst_rect, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
--
1.9.1
2.2.1

View File

@ -1,4 +1,4 @@
From 25b2ad076f6f9725353b5b7413ee062c68a89d6f Mon Sep 17 00:00:00 2001
From c2397e25c4bce8e65cddb924047ee0fff1c7a397 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 29 Aug 2013 22:25:14 +0200
Subject: wined3d: Don't lock the src volume in device_update_volume
@ -9,15 +9,19 @@ assumption of the work queue.
FIXME: Maybe merge this with the previous patch or change their order.
---
dlls/wined3d/device.c | 17 ++++-------------
1 file changed, 4 insertions(+), 13 deletions(-)
dlls/wined3d/device.c | 31 +++++++------------------------
1 file changed, 7 insertions(+), 24 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 5333f23..b2e3db7 100644
index 5333f23..4a54025 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -3401,9 +3401,7 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device
static HRESULT device_update_volume(struct wined3d_context *context,
@@ -3398,12 +3398,10 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device
}
/* This is a helper function for UpdateTexture, there is no UpdateVolume method in D3D. */
-static HRESULT device_update_volume(struct wined3d_context *context,
+static void device_update_volume(struct wined3d_context *context,
struct wined3d_volume *src_volume, struct wined3d_volume *dst_volume)
{
- struct wined3d_const_bo_address data;
@ -27,8 +31,20 @@ index 5333f23..b2e3db7 100644
TRACE("src_volume %p, dst_volume %p.\n",
src_volume, dst_volume);
@@ -3421,20 +3419,13 @@ static HRESULT device_update_volume(struct wined3d_context *context,
return WINED3DERR_INVALIDCALL;
@@ -3411,30 +3409,21 @@ static HRESULT device_update_volume(struct wined3d_context *context,
if (src_volume->resource.format != dst_volume->resource.format)
{
FIXME("Source and destination formats do not match.\n");
- return WINED3DERR_INVALIDCALL;
+ return;
}
if (src_volume->resource.width != dst_volume->resource.width
|| src_volume->resource.height != dst_volume->resource.height
|| src_volume->resource.depth != dst_volume->resource.depth)
{
FIXME("Source and destination sizes do not match.\n");
- return WINED3DERR_INVALIDCALL;
+ return;
}
- if (FAILED(hr = wined3d_volume_map(src_volume, &src, NULL, WINED3D_MAP_READONLY)))
@ -43,14 +59,30 @@ index 5333f23..b2e3db7 100644
+ wined3d_resource_get_memory(&src_volume->resource, src_volume->resource.map_binding, &data);
+ wined3d_volume_upload_data(dst_volume, context, wined3d_const_bo_address(&data));
wined3d_resource_invalidate_location(&dst_volume->resource, ~WINED3D_LOCATION_TEXTURE_RGB);
-
- hr = wined3d_volume_unmap(src_volume);
-
- return hr;
+ return WINED3D_OK;
}
/* Context activation is done by the caller */
@@ -3483,15 +3472,9 @@ void device_exec_update_texture(struct wined3d_context *context, struct wined3d_
{
for (i = 0; i < level_count; ++i)
{
- HRESULT hr;
- hr = device_update_volume(context,
+ device_update_volume(context,
volume_from_resource(wined3d_texture_get_sub_resource(src_texture, i)),
volume_from_resource(wined3d_texture_get_sub_resource(dst_texture, i)));
- if (FAILED(hr))
- {
- WARN("Failed to update volume, hr %#x.\n", hr);
- return;
- }
}
break;
}
--
2.2.1

View File

@ -1,4 +1,4 @@
From 7c8966629ab3faabae68c46d1cf63e3d42c89c99 Mon Sep 17 00:00:00 2001
From cba6a35d48886d00959d29d4fef9115a46143589 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Wed, 20 Aug 2014 18:01:36 +0200
Subject: wined3d: Introduce resource fencing.
@ -61,18 +61,18 @@ index 11aa133..1197eef 100644
}
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index a2bee4d..b4e5679 100644
index 570f5e3..10d0789 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2118,6 +2118,7 @@ struct wined3d_resource
UINT custom_row_pitch, custom_slice_pitch;
@@ -2129,6 +2129,7 @@ struct wined3d_resource
GLuint buffer_object;
struct list resource_list_entry;
DWORD locations;
+ LONG access_fence;
void *parent;
const struct wined3d_parent_ops *parent_ops;
@@ -2171,6 +2172,21 @@ void wined3d_resource_unmap_internal(struct wined3d_resource *resource) DECLSPEC
@@ -2182,6 +2183,21 @@ void wined3d_resource_unmap_internal(struct wined3d_resource *resource) DECLSPEC
void wined3d_resource_update_draw_binding(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
void wined3d_resource_validate_location(struct wined3d_resource *resource, DWORD location) DECLSPEC_HIDDEN;
@ -95,5 +95,5 @@ index a2bee4d..b4e5679 100644
#define RESOURCE_ALIGNMENT 16
--
2.1.3
2.2.1

View File

@ -1,4 +1,4 @@
From a9c5139b4af3710105931fb127431ac153b48062 Mon Sep 17 00:00:00 2001
From 7690fa9323a0c910cb788ae09f474657d298acf6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Fri, 30 Aug 2013 17:00:35 +0200
Subject: wined3d: Wrap GL BOs in a structure
@ -14,10 +14,10 @@ them for DISCARD maps.
5 files changed, 86 insertions(+), 28 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index c9723ea..c57bd77 100644
index 6a5fc5a..bd53a1f 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -4990,3 +4990,56 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
@@ -4981,3 +4981,56 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
else
return CallWindowProcA(proc, window, message, wparam, lparam);
}
@ -75,10 +75,10 @@ index c9723ea..c57bd77 100644
+ wined3d_device_destroy_bo(device, context, bo);
+}
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
index f84b3ee..885075e 100644
index 788c8e6..ba4b85b 100644
--- a/dlls/wined3d/resource.c
+++ b/dlls/wined3d/resource.c
@@ -148,12 +148,10 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
@@ -145,12 +145,10 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
void wined3d_resource_free_bo(struct wined3d_resource *resource)
{
struct wined3d_context *context = context_acquire(resource->device, NULL);
@ -94,7 +94,7 @@ index f84b3ee..885075e 100644
context_release(context);
}
@@ -169,7 +167,7 @@ void resource_cleanup(struct wined3d_resource *resource)
@@ -166,7 +164,7 @@ void resource_cleanup(struct wined3d_resource *resource)
adapter_adjust_memory(resource->device->adapter, (INT64)0 - resource->size);
}
@ -103,7 +103,7 @@ index f84b3ee..885075e 100644
wined3d_resource_free_bo(resource);
wined3d_resource_free_sysmem(resource);
@@ -182,7 +180,7 @@ void resource_unload(struct wined3d_resource *resource)
@@ -179,7 +177,7 @@ void resource_unload(struct wined3d_resource *resource)
if (resource->map_count)
ERR("Resource %p is being unloaded while mapped.\n", resource);
@ -112,7 +112,7 @@ index f84b3ee..885075e 100644
wined3d_resource_free_bo(resource);
context_resource_unloaded(resource->device,
@@ -400,7 +398,7 @@ void wined3d_resource_get_memory(const struct wined3d_resource *resource,
@@ -428,7 +426,7 @@ void wined3d_resource_get_memory(const struct wined3d_resource *resource,
{
if (location & WINED3D_LOCATION_BUFFER)
{
@ -121,7 +121,7 @@ index f84b3ee..885075e 100644
data->addr = NULL;
return;
}
@@ -509,7 +507,7 @@ BYTE *wined3d_resource_get_map_ptr(const struct wined3d_resource *resource,
@@ -537,7 +535,7 @@ BYTE *wined3d_resource_get_map_ptr(const struct wined3d_resource *resource,
{
case WINED3D_LOCATION_BUFFER:
gl_info = context->gl_info;
@ -130,7 +130,7 @@ index f84b3ee..885075e 100644
if (gl_info->supported[ARB_MAP_BUFFER_RANGE])
{
@@ -552,7 +550,7 @@ void wined3d_resource_release_map_ptr(const struct wined3d_resource *resource,
@@ -580,7 +578,7 @@ void wined3d_resource_release_map_ptr(const struct wined3d_resource *resource,
{
case WINED3D_LOCATION_BUFFER:
gl_info = context->gl_info;
@ -139,7 +139,7 @@ index f84b3ee..885075e 100644
GL_EXTCALL(glUnmapBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB));
GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0));
checkGLcall("Unmap GL buffer");
@@ -570,20 +568,14 @@ void wined3d_resource_release_map_ptr(const struct wined3d_resource *resource,
@@ -598,20 +596,14 @@ void wined3d_resource_release_map_ptr(const struct wined3d_resource *resource,
}
/* Context activation is done by the caller. */
@ -166,7 +166,7 @@ index f84b3ee..885075e 100644
BOOL wined3d_resource_prepare_system_memory(struct wined3d_resource *resource)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 7a65abc..8881490 100644
index d093744..4d8dd01 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -48,7 +48,7 @@ static void surface_cleanup(struct wined3d_surface *surface)
@ -178,7 +178,7 @@ index 7a65abc..8881490 100644
|| surface->rb_resolved || !list_empty(&surface->renderbuffers))
{
struct wined3d_renderbuffer_entry *entry, *entry2;
@@ -2660,7 +2660,7 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
@@ -2669,7 +2669,7 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
}
if (!(surface->resource.map_binding == WINED3D_LOCATION_USER_MEMORY
|| surface->container->flags & WINED3D_TEXTURE_PIN_SYSMEM
@ -187,7 +187,7 @@ index 7a65abc..8881490 100644
surface->resource.map_binding = WINED3D_LOCATION_DIB;
}
@@ -4025,7 +4025,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4034,7 +4034,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
/* Don't use PBOs for converted surfaces. During PBO conversion we look at
* WINED3D_TEXTURE_CONVERTED but it isn't set (yet) in all cases it is
* getting called. */
@ -197,10 +197,10 @@ index 7a65abc..8881490 100644
TRACE("Removing the pbo attached to surface %p.\n", surface);
diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
index 6532ab5..9d6583d 100644
index 53d73e3..7b040f0 100644
--- a/dlls/wined3d/volume.c
+++ b/dlls/wined3d/volume.c
@@ -203,7 +203,7 @@ static void wined3d_volume_load_location(struct wined3d_resource *resource,
@@ -216,7 +216,7 @@ static void wined3d_volume_load_location(struct wined3d_resource *resource,
}
else if (volume->resource.locations & WINED3D_LOCATION_BUFFER)
{
@ -209,7 +209,7 @@ index 6532ab5..9d6583d 100644
wined3d_volume_upload_data(volume, context, &data);
}
else if (volume->resource.locations & WINED3D_LOCATION_TEXTURE_RGB)
@@ -252,12 +252,12 @@ static void wined3d_volume_load_location(struct wined3d_resource *resource,
@@ -265,12 +265,12 @@ static void wined3d_volume_load_location(struct wined3d_resource *resource,
break;
case WINED3D_LOCATION_BUFFER:
@ -225,7 +225,7 @@ index 6532ab5..9d6583d 100644
if (volume->resource.locations & WINED3D_LOCATION_TEXTURE_RGB)
wined3d_texture_bind_and_dirtify(volume->container, context, FALSE);
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index e2e5423..b1ec269 100644
index 4a99939..ff64215 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -1971,6 +1971,14 @@ struct wined3d_state
@ -255,15 +255,15 @@ index e2e5423..b1ec269 100644
static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD state)
{
@@ -2125,7 +2138,7 @@ struct wined3d_resource
UINT size;
@@ -2126,7 +2139,7 @@ struct wined3d_resource
DWORD priority;
void *heap_memory, *user_memory, *bitmap_data;
UINT custom_row_pitch, custom_slice_pitch;
- GLuint buffer_object;
+ struct wined3d_gl_bo *buffer;
UINT custom_row_pitch, custom_slice_pitch;
struct list resource_list_entry;
DWORD locations;
LONG access_fence;
--
1.9.1
2.2.1

View File

@ -1,4 +1,4 @@
From 71bd4bdb1014498b5877d04834bf58413220c408 Mon Sep 17 00:00:00 2001
From 4a9d09e89a1ae33ae766eec2af1a1c07276b7a94 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Fri, 30 Aug 2013 17:06:29 +0200
Subject: wined3d: Separate resource map and draw buffers
@ -9,7 +9,7 @@ Subject: wined3d: Separate resource map and draw buffers
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
index 4fc4ce9..65e8f55 100644
index ba4b85b..83f3b30 100644
--- a/dlls/wined3d/resource.c
+++ b/dlls/wined3d/resource.c
@@ -146,8 +146,12 @@ void wined3d_resource_free_bo(struct wined3d_resource *resource)
@ -25,7 +25,7 @@ index 4fc4ce9..65e8f55 100644
context_release(context);
}
@@ -504,7 +508,7 @@ BYTE *wined3d_resource_get_map_ptr(const struct wined3d_resource *resource,
@@ -535,7 +539,7 @@ BYTE *wined3d_resource_get_map_ptr(const struct wined3d_resource *resource,
{
case WINED3D_LOCATION_BUFFER:
gl_info = context->gl_info;
@ -34,7 +34,7 @@ index 4fc4ce9..65e8f55 100644
if (gl_info->supported[ARB_MAP_BUFFER_RANGE])
{
@@ -547,7 +551,7 @@ void wined3d_resource_release_map_ptr(const struct wined3d_resource *resource,
@@ -578,7 +582,7 @@ void wined3d_resource_release_map_ptr(const struct wined3d_resource *resource,
{
case WINED3D_LOCATION_BUFFER:
gl_info = context->gl_info;
@ -43,7 +43,7 @@ index 4fc4ce9..65e8f55 100644
GL_EXTCALL(glUnmapBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB));
GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0));
checkGLcall("Unmap GL buffer");
@@ -572,6 +576,7 @@ static void wined3d_resource_prepare_bo(struct wined3d_resource *resource, struc
@@ -603,6 +607,7 @@ static void wined3d_resource_prepare_bo(struct wined3d_resource *resource, struc
resource->buffer = wined3d_device_get_bo(resource->device, resource->size,
GL_STREAM_DRAW_ARB, GL_PIXEL_UNPACK_BUFFER_ARB, context);
@ -52,18 +52,18 @@ index 4fc4ce9..65e8f55 100644
}
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 8477d0c..eb84cbc 100644
index ff64215..374dbc2 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2127,7 +2127,7 @@ struct wined3d_resource
UINT size;
@@ -2139,7 +2139,7 @@ struct wined3d_resource
DWORD priority;
void *heap_memory, *user_memory, *bitmap_data;
UINT custom_row_pitch, custom_slice_pitch;
- struct wined3d_gl_bo *buffer;
+ struct wined3d_gl_bo *buffer, *map_buffer;
UINT custom_row_pitch, custom_slice_pitch;
struct list resource_list_entry;
DWORD locations;
LONG access_fence;
--
2.1.3
2.2.1

View File

@ -1,4 +1,4 @@
From 2483911906a4adfe52afe00f061cd473a2b7ec5b Mon Sep 17 00:00:00 2001
From 8494f0465c33b7d735d4a4dbeb2c5b9ea3ce9430 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Fri, 27 Sep 2013 19:24:21 +0200
Subject: wined3d: Implement DISCARD resource maps with heap memory.
@ -61,7 +61,7 @@ index d86aa59..9307246 100644
cs->ops->submit(cs, sizeof(*op));
}
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
index 8d9757c..ef0b213 100644
index 5e62915..ebb9ff3 100644
--- a/dlls/wined3d/resource.c
+++ b/dlls/wined3d/resource.c
@@ -119,6 +119,7 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
@ -89,7 +89,7 @@ index 8d9757c..ef0b213 100644
return TRUE;
}
@@ -528,7 +530,7 @@ BYTE *wined3d_resource_get_map_ptr(const struct wined3d_resource *resource,
@@ -559,7 +561,7 @@ BYTE *wined3d_resource_get_map_ptr(const struct wined3d_resource *resource,
return ptr;
case WINED3D_LOCATION_SYSMEM:
@ -98,7 +98,7 @@ index 8d9757c..ef0b213 100644
case WINED3D_LOCATION_DIB:
return resource->bitmap_data;
@@ -590,6 +592,7 @@ BOOL wined3d_resource_prepare_system_memory(struct wined3d_resource *resource)
@@ -621,6 +623,7 @@ BOOL wined3d_resource_prepare_system_memory(struct wined3d_resource *resource)
ERR("Failed to allocate system memory.\n");
return FALSE;
}
@ -175,7 +175,7 @@ index 8d9757c..ef0b213 100644
wined3d_resource_invalidate_location(resource, ~resource->map_binding);
}
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 7c532f0..73160ff 100644
index 4d8dd01..03f49a8 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -487,6 +487,7 @@ static void surface_evict_sysmem(struct wined3d_surface *surface)
@ -186,7 +186,7 @@ index 7c532f0..73160ff 100644
wined3d_resource_invalidate_location(&surface->resource, WINED3D_LOCATION_SYSMEM);
}
@@ -1996,6 +1997,7 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
@@ -1997,6 +1998,7 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
surface->resource.locations = 0;
wined3d_resource_free_sysmem(&surface->resource);
@ -194,7 +194,7 @@ index 7c532f0..73160ff 100644
width = texture_resource->width;
height = texture_resource->height;
@@ -5334,6 +5336,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
@@ -5489,6 +5491,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
if (surface->resource.map_binding == WINED3D_LOCATION_DIB)
{
wined3d_resource_free_sysmem(&surface->resource);
@ -203,10 +203,10 @@ index 7c532f0..73160ff 100644
wined3d_resource_invalidate_location(&surface->resource, WINED3D_LOCATION_SYSMEM);
}
diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
index 467169f..34b72d1 100644
index 7b040f0..829cb8a 100644
--- a/dlls/wined3d/volume.c
+++ b/dlls/wined3d/volume.c
@@ -120,6 +120,7 @@ static void wined3d_volume_download_data(struct wined3d_volume *volume,
@@ -134,6 +134,7 @@ static void wined3d_volume_download_data(struct wined3d_volume *volume,
static void wined3d_volume_evict_sysmem(struct wined3d_volume *volume)
{
wined3d_resource_free_sysmem(&volume->resource);
@ -214,7 +214,7 @@ index 467169f..34b72d1 100644
wined3d_resource_invalidate_location(&volume->resource, WINED3D_LOCATION_SYSMEM);
}
@@ -502,6 +503,7 @@ static HRESULT volume_init(struct wined3d_volume *volume, struct wined3d_texture
@@ -516,6 +517,7 @@ static HRESULT volume_init(struct wined3d_volume *volume, struct wined3d_texture
{
wined3d_resource_free_sysmem(&volume->resource);
volume->resource.map_binding = WINED3D_LOCATION_BUFFER;
@ -223,19 +223,19 @@ index 467169f..34b72d1 100644
volume->container = container;
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 15d63e2..270162f 100644
index abf3ca2..ac4aeb3 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2126,7 +2126,7 @@ struct wined3d_resource
@@ -2137,7 +2137,7 @@ struct wined3d_resource
UINT depth;
UINT size;
DWORD priority;
- void *heap_memory, *user_memory, *bitmap_data;
+ void *heap_memory, *map_heap_memory, *user_memory, *bitmap_data;
struct wined3d_gl_bo *buffer, *map_buffer;
UINT custom_row_pitch, custom_slice_pitch;
struct wined3d_gl_bo *buffer, *map_buffer;
struct list resource_list_entry;
@@ -2160,7 +2160,7 @@ void resource_unload(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
@@ -2171,7 +2171,7 @@ void resource_unload(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
DWORD wined3d_resource_access_from_location(DWORD location) DECLSPEC_HIDDEN;
BOOL wined3d_resource_allocate_sysmem(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
void wined3d_resource_changed(struct wined3d_resource *resource,
@ -244,7 +244,7 @@ index 15d63e2..270162f 100644
BOOL wined3d_resource_check_block_align(const struct wined3d_resource *resource,
const struct wined3d_box *box) DECLSPEC_HIDDEN;
void wined3d_resource_free_bo(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
@@ -2678,7 +2678,7 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
@@ -2695,7 +2695,7 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarget_view *view,
const RECT *rect, const struct wined3d_color *color) DECLSPEC_HIDDEN;
void wined3d_cs_emit_resource_changed(struct wined3d_cs *cs, struct wined3d_resource *resource,
@ -254,5 +254,5 @@ index 15d63e2..270162f 100644
DWORD flags) DECLSPEC_HIDDEN;
void wined3d_cs_emit_resource_unmap(struct wined3d_cs *cs, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
--
2.1.3
2.2.1

View File

@ -1,4 +1,4 @@
From 4cd3608532db258e1b970b68b696437e273cddde Mon Sep 17 00:00:00 2001
From 91a76b0dd0c52b3745dd0ecd1dfc79acad7ccba7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Sun, 6 Oct 2013 16:12:24 +0200
Subject: wined3d: Clean up surfaces through the cs.
@ -70,7 +70,7 @@ index 9cba57b..7675214 100644
static inline void *_wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size, BOOL prio)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 89c4c59..65bffab 100644
index ac5f6bb..fcd7d63 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -36,20 +36,10 @@ WINE_DECLARE_DEBUG_CHANNEL(d3d);
@ -135,7 +135,7 @@ index 89c4c59..65bffab 100644
}
void surface_get_drawable_size(const struct wined3d_surface *surface, const struct wined3d_context *context,
@@ -5470,8 +5467,6 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
@@ -5479,8 +5476,6 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
{
ERR("Private setup failed, hr %#x.\n", hr);
surface_cleanup(surface);
@ -144,7 +144,7 @@ index 89c4c59..65bffab 100644
return hr;
}
@@ -5514,7 +5509,7 @@ HRESULT wined3d_surface_create(struct wined3d_texture *container, const struct w
@@ -5523,7 +5518,7 @@ HRESULT wined3d_surface_create(struct wined3d_texture *container, const struct w
if (FAILED(hr = surface_init(object, container, desc, target, level, layer, flags)))
{
WARN("Failed to initialize surface, returning %#x.\n", hr);
@ -154,18 +154,18 @@ index 89c4c59..65bffab 100644
}
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 8537000..5b1a286 100644
index d201a5c..c28554f 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2470,6 +2470,7 @@ void surface_blt_ugly(struct wined3d_surface *dst_surface, const RECT *dst_rect_
@@ -2472,6 +2472,7 @@ void surface_blt_ugly(struct wined3d_surface *dst_surface, const RECT *dst_rect_
struct wined3d_surface *src_surface, const RECT *src_rect_in, DWORD flags,
const WINEDDBLTFX *fx, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
BOOL surface_check_block_align(struct wined3d_surface *surface, const RECT *rect) DECLSPEC_HIDDEN;
+void wined3d_surface_cleanup_cs(struct wined3d_surface *surface) DECLSPEC_HIDDEN;
void wined3d_surface_upload_data(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info,
const struct wined3d_format *format, const RECT *src_rect, UINT src_pitch, const POINT *dst_point,
BOOL srgb, const struct wined3d_const_bo_address *data) DECLSPEC_HIDDEN;
@@ -2730,6 +2731,7 @@ void wined3d_cs_emit_resource_cleanup(struct wined3d_cs *cs,
void draw_textured_quad(const struct wined3d_surface *src_surface, struct wined3d_context *context,
const RECT *src_rect, const RECT *dst_rect, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
@@ -2729,6 +2730,7 @@ void wined3d_cs_emit_resource_cleanup(struct wined3d_cs *cs,
struct wined3d_resource *resource) DECLSPEC_HIDDEN;
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;
@ -174,5 +174,5 @@ index 8537000..5b1a286 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
--
1.9.1
2.2.1

View File

@ -1,4 +1,4 @@
From a08ec4508ae2f63e2545b51a6b177e672c7dbdaf Mon Sep 17 00:00:00 2001
From eeb143600d8ab2c4ea0c43a14e1a7035d9dcf9c6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Sun, 16 Mar 2014 14:13:42 +0100
Subject: wined3d: Send getdc and releasedc through the command stream.
@ -104,10 +104,10 @@ index b152a0d..44930c1 100644
static inline void *_wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size, BOOL prio)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 0221ebd..b6bb67e 100644
index b1ae752..9aa26e3 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -2613,48 +2613,23 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
@@ -2622,48 +2622,23 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
return wined3d_resource_map(&surface->resource, map_desc, rect ? &box : NULL, flags);
}
@ -159,7 +159,7 @@ index 0221ebd..b6bb67e 100644
}
if (!(surface->resource.map_binding == WINED3D_LOCATION_USER_MEMORY
|| surface->container->flags & WINED3D_TEXTURE_PIN_SYSMEM
@@ -2667,35 +2642,40 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
@@ -2676,35 +2651,40 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
if (context)
context_release(context);
@ -220,7 +220,7 @@ index 0221ebd..b6bb67e 100644
&& surface->resource.map_binding != WINED3D_LOCATION_DIB))
{
/* The game Salammbo modifies the surface contents without mapping the surface between
@@ -2716,6 +2696,26 @@ HRESULT CDECL wined3d_surface_releasedc(struct wined3d_surface *surface, HDC dc)
@@ -2725,6 +2705,26 @@ HRESULT CDECL wined3d_surface_releasedc(struct wined3d_surface *surface, HDC dc)
if (context)
context_release(context);
}
@ -248,19 +248,19 @@ index 0221ebd..b6bb67e 100644
return WINED3D_OK;
}
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 3f491e0..19596f3 100644
index 9e548bb..24c1ce8 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2474,6 +2474,8 @@ void surface_blt_ugly(struct wined3d_surface *dst_surface, const RECT *dst_rect_
@@ -2475,6 +2475,8 @@ void surface_blt_ugly(struct wined3d_surface *dst_surface, const RECT *dst_rect_
const WINEDDBLTFX *fx, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
BOOL surface_check_block_align(struct wined3d_surface *surface, const RECT *rect) DECLSPEC_HIDDEN;
void wined3d_surface_cleanup_cs(struct wined3d_surface *surface) DECLSPEC_HIDDEN;
+void wined3d_surface_getdc_cs(struct wined3d_surface *surface) DECLSPEC_HIDDEN;
+void wined3d_surface_releasedc_cs(struct wined3d_surface *surface) DECLSPEC_HIDDEN;
void wined3d_surface_upload_data(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info,
const struct wined3d_format *format, const RECT *src_rect, UINT src_pitch, const POINT *dst_point,
BOOL srgb, const struct wined3d_const_bo_address *data) DECLSPEC_HIDDEN;
@@ -2746,6 +2748,8 @@ HRESULT wined3d_cs_emit_create_swapchain_context(struct wined3d_cs *cs,
void draw_textured_quad(const struct wined3d_surface *src_surface, struct wined3d_context *context,
const RECT *src_rect, const RECT *dst_rect, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
@@ -2744,6 +2746,8 @@ HRESULT wined3d_cs_emit_create_swapchain_context(struct wined3d_cs *cs,
struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
void wined3d_cs_emit_delete_opengl_contexts(struct wined3d_cs *cs,
struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
@ -270,5 +270,5 @@ index 3f491e0..19596f3 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
--
1.9.1
2.2.1

File diff suppressed because it is too large Load Diff