Rebase against ffee96a80c0585fb5fcb041382540e2014d2f77b.

This commit is contained in:
Sebastian Lackner 2015-12-04 18:59:12 +01:00
parent a605ae9359
commit 78ed3fc7e9
7 changed files with 233 additions and 247 deletions

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "71bbd8da87109161448c7c6d7f6fcfa721b6c746"
echo "ffee96a80c0585fb5fcb041382540e2014d2f77b"
}
# Show version information

View File

@ -1,4 +1,4 @@
From 52759529f11102038adaa8501a44b03d9b0024ae Mon Sep 17 00:00:00 2001
From 8ac3b701d1b19249fff35e7db8bc4e12212c0886 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Sun, 17 Nov 2013 20:25:01 +0100
Subject: wined3d: Make surface_load_location return nothing.
@ -9,10 +9,10 @@ Subject: wined3d: Make surface_load_location return nothing.
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 89c8ecf..0b10444 100644
index 0f16f79..6490235 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -4231,7 +4231,7 @@ static void surface_multisample_resolve(struct wined3d_surface *surface, struct
@@ -4239,7 +4239,7 @@ static void surface_load_renderbuffer(struct wined3d_surface *surface, struct wi
}
/* Context activation is done by the caller. Context may be NULL in ddraw-only mode. */
@ -21,7 +21,7 @@ index 89c8ecf..0b10444 100644
{
HRESULT hr;
@@ -4243,26 +4243,26 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
@@ -4251,26 +4251,26 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
&& surface->locations & (WINED3D_LOCATION_DRAWABLE | WINED3D_LOCATION_DISCARDED))
{
surface_load_ds_location(surface, context, location);
@ -52,16 +52,16 @@ index 89c8ecf..0b10444 100644
}
if (WARN_ON(d3d_surface))
@@ -4277,7 +4277,7 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
@@ -4284,7 +4284,7 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
if (!surface->locations)
{
ERR("Surface %p does not have any up to date location.\n", surface);
surface->flags |= SFLAG_LOST;
- return WINED3DERR_DEVICELOST;
- return WINED3DERR_INVALIDCALL;
+ return;
}
switch (location)
@@ -4291,7 +4291,7 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
@@ -4298,7 +4298,7 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
case WINED3D_LOCATION_DRAWABLE:
if (FAILED(hr = surface_load_drawable(surface, context)))
@ -70,7 +70,7 @@ index 89c8ecf..0b10444 100644
break;
case WINED3D_LOCATION_RB_RESOLVED:
@@ -4302,7 +4302,7 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
@@ -4310,7 +4310,7 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
case WINED3D_LOCATION_TEXTURE_SRGB:
if (FAILED(hr = surface_load_texture(surface, context,
location == WINED3D_LOCATION_TEXTURE_SRGB)))
@ -79,7 +79,7 @@ index 89c8ecf..0b10444 100644
break;
default:
@@ -4315,7 +4315,7 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
@@ -4323,7 +4323,7 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
if (location != WINED3D_LOCATION_SYSMEM && (surface->locations & WINED3D_LOCATION_SYSMEM))
surface_evict_sysmem(surface);
@ -89,10 +89,10 @@ index 89c8ecf..0b10444 100644
static HRESULT ffp_blit_alloc(struct wined3d_device *device) { return WINED3D_OK; }
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 8bbb1ab..9cff40e 100644
index 593456e..c120937 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2457,7 +2457,7 @@ void surface_load_ds_location(struct wined3d_surface *surface,
@@ -2463,7 +2463,7 @@ void surface_load_ds_location(struct wined3d_surface *surface,
struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
void surface_load_fb_texture(struct wined3d_surface *surface, BOOL srgb,
struct wined3d_context *context) DECLSPEC_HIDDEN;
@ -102,5 +102,5 @@ index 8bbb1ab..9cff40e 100644
void surface_modify_ds_location(struct wined3d_surface *surface, DWORD location, UINT w, UINT h) DECLSPEC_HIDDEN;
void wined3d_surface_prepare(struct wined3d_surface *surface, struct wined3d_context *context,
--
2.6.1
2.6.2

View File

@ -1,4 +1,4 @@
From 135a0ad96a413720dd7bc3af682b39b8bc6de16f Mon Sep 17 00:00:00 2001
From 295469bf469171a96412e3b336a960b86d639b94 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Tue, 21 Jan 2014 12:22:30 +0100
Subject: wined3d: Move surface locations into the resource.
@ -25,7 +25,7 @@ index 2af9845..e8526d8 100644
&& !wined3d_resource_is_offscreen(&src_surface->container->resource))
{
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 170536d..14f28a6 100644
index 057ae18..2312267 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -236,7 +236,7 @@ static void prepare_ds_clear(struct wined3d_surface *ds, struct wined3d_context
@ -60,7 +60,7 @@ index 3761830..943a829 100644
else
SetRectEmpty(&current_rect);
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index e9af37e..dd26bb0 100644
index 6490235..50282c0 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -556,7 +556,7 @@ static void surface_prepare_system_memory(struct wined3d_surface *surface)
@ -90,7 +90,7 @@ index e9af37e..dd26bb0 100644
{
TRACE("Not dirtified, nothing to do.\n");
return;
@@ -1693,7 +1693,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
@@ -1687,7 +1687,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
surface_load_location(dst_surface, context, WINED3D_LOCATION_TEXTURE_RGB);
wined3d_texture_bind_and_dirtify(dst_surface->container, context, FALSE);
@ -99,7 +99,7 @@ index e9af37e..dd26bb0 100644
wined3d_resource_get_pitch(&src_surface->resource, &src_row_pitch, &src_slice_pitch);
wined3d_surface_upload_data(dst_surface, gl_info, src_format, src_rect,
@@ -1816,7 +1816,7 @@ void surface_load(struct wined3d_surface *surface, struct wined3d_context *conte
@@ -1810,7 +1810,7 @@ void surface_load(struct wined3d_surface *surface, struct wined3d_context *conte
if (surface->resource.pool == WINED3D_POOL_SCRATCH)
ERR("Not supported on scratch surfaces.\n");
@ -108,7 +108,7 @@ index e9af37e..dd26bb0 100644
{
TRACE("surface is already in texture\n");
return;
@@ -2082,7 +2082,7 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
@@ -2060,7 +2060,7 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
create_dib = TRUE;
}
@ -117,7 +117,7 @@ index e9af37e..dd26bb0 100644
wined3d_resource_free_sysmem(&surface->resource);
width = texture_resource->width;
@@ -3258,7 +3258,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
@@ -3236,7 +3236,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
checkGLcall("glEnable(texture_target)");
/* For now invalidate the texture copy of the back buffer. Drawable and sysmem copy are untouched */
@ -126,7 +126,7 @@ index e9af37e..dd26bb0 100644
}
/* Make sure that the top pixel is always above the bottom pixel, and keep a separate upside down flag
@@ -3785,13 +3785,14 @@ void surface_modify_ds_location(struct wined3d_surface *surface,
@@ -3763,13 +3763,14 @@ void surface_modify_ds_location(struct wined3d_surface *surface,
{
TRACE("surface %p, new location %#x, w %u, h %u.\n", surface, location, w, h);
@ -144,7 +144,7 @@ index e9af37e..dd26bb0 100644
}
/* Context activation is done by the caller. */
@@ -3806,7 +3807,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
@@ -3784,7 +3785,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
/* TODO: Make this work for modes other than FBO */
if (wined3d_settings.offscreen_rendering_mode != ORM_FBO) return;
@ -153,7 +153,7 @@ index e9af37e..dd26bb0 100644
{
w = surface->ds_current_size.cx;
h = surface->ds_current_size.cy;
@@ -3832,21 +3833,21 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
@@ -3810,21 +3811,21 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
return;
}
@ -180,7 +180,7 @@ index e9af37e..dd26bb0 100644
surface->ds_current_size.cx = surface->resource.width;
surface->ds_current_size.cy = surface->resource.height;
return;
@@ -3934,7 +3935,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
@@ -3912,7 +3913,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
ERR("Invalid location (%#x) specified.\n", location);
}
@ -189,7 +189,7 @@ index e9af37e..dd26bb0 100644
surface->ds_current_size.cx = surface->resource.width;
surface->ds_current_size.cy = surface->resource.height;
}
@@ -3943,7 +3944,7 @@ void surface_validate_location(struct wined3d_surface *surface, DWORD location)
@@ -3921,7 +3922,7 @@ void surface_validate_location(struct wined3d_surface *surface, DWORD location)
{
TRACE("surface %p, location %s.\n", surface, wined3d_debug_location(location));
@ -198,7 +198,7 @@ index e9af37e..dd26bb0 100644
}
void surface_invalidate_location(struct wined3d_surface *surface, DWORD location)
@@ -3952,9 +3953,9 @@ void surface_invalidate_location(struct wined3d_surface *surface, DWORD location
@@ -3930,9 +3931,9 @@ void surface_invalidate_location(struct wined3d_surface *surface, DWORD location
if (location & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB))
wined3d_texture_set_dirty(surface->container);
@ -210,7 +210,7 @@ index e9af37e..dd26bb0 100644
ERR("Surface %p does not have any up to date location.\n", surface);
}
@@ -3990,7 +3991,7 @@ static void surface_copy_simple_location(struct wined3d_surface *surface, DWORD
@@ -3968,7 +3969,7 @@ static void surface_copy_simple_location(struct wined3d_surface *surface, DWORD
UINT size = surface->resource.size;
surface_get_memory(surface, &dst, location);
@ -219,7 +219,7 @@ index e9af37e..dd26bb0 100644
if (dst.buffer_object)
{
@@ -4023,33 +4024,33 @@ static void surface_load_sysmem(struct wined3d_surface *surface,
@@ -4001,33 +4002,33 @@ static void surface_load_sysmem(struct wined3d_surface *surface,
{
const struct wined3d_gl_info *gl_info = context->gl_info;
@ -259,7 +259,7 @@ index e9af37e..dd26bb0 100644
}
/* Context activation is done by the caller. */
@@ -4089,14 +4090,14 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4067,14 +4068,14 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
if (wined3d_settings.offscreen_rendering_mode != ORM_FBO
&& wined3d_resource_is_offscreen(&texture->resource)
@ -276,7 +276,7 @@ index e9af37e..dd26bb0 100644
&& (surface->container->resource.format_flags & WINED3DFMT_FLAG_FBO_ATTACHABLE_SRGB)
&& fbo_blit_supported(gl_info, WINED3D_BLIT_OP_COLOR_BLIT,
NULL, surface->resource.usage, surface->resource.pool, surface->resource.format,
@@ -4112,13 +4113,13 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4090,13 +4091,13 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
return WINED3D_OK;
}
@ -292,7 +292,7 @@ index e9af37e..dd26bb0 100644
WINED3D_LOCATION_RB_RESOLVED : WINED3D_LOCATION_RB_MULTISAMPLE;
DWORD dst_location = srgb ? WINED3D_LOCATION_TEXTURE_SRGB : WINED3D_LOCATION_TEXTURE_RGB;
RECT rect = {0, 0, surface->resource.width, surface->resource.height};
@@ -4133,7 +4134,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4111,7 +4112,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
if (srgb)
{
@ -301,7 +301,7 @@ index e9af37e..dd26bb0 100644
== WINED3D_LOCATION_TEXTURE_RGB)
{
/* Performance warning... */
@@ -4144,7 +4145,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4122,7 +4123,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
}
else
{
@ -310,7 +310,7 @@ index e9af37e..dd26bb0 100644
== WINED3D_LOCATION_TEXTURE_SRGB)
{
/* Performance warning... */
@@ -4154,7 +4155,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4132,7 +4133,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
}
}
@ -319,7 +319,7 @@ index e9af37e..dd26bb0 100644
{
WARN("Trying to load a texture from sysmem, but no simple location is valid.\n");
/* Lets hope we get it from somewhere... */
@@ -4189,7 +4190,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4167,7 +4168,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
surface_remove_pbo(surface, gl_info);
}
@ -328,7 +328,7 @@ index e9af37e..dd26bb0 100644
if (format.convert)
{
/* This code is entered for texture formats which need a fixup. */
@@ -4247,11 +4248,11 @@ static void surface_load_renderbuffer(struct wined3d_surface *surface, struct wi
@@ -4225,11 +4226,11 @@ static void surface_load_renderbuffer(struct wined3d_surface *surface, struct wi
const RECT rect = {0, 0, surface->resource.width, surface->resource.height};
DWORD src_location;
@ -343,7 +343,7 @@ index e9af37e..dd26bb0 100644
src_location = WINED3D_LOCATION_TEXTURE_SRGB;
else /* surface_blt_fbo will load the source location if necessary. */
src_location = WINED3D_LOCATION_TEXTURE_RGB;
@@ -4270,12 +4271,12 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
@@ -4248,12 +4249,12 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
if (surface->resource.usage & WINED3DUSAGE_DEPTHSTENCIL)
{
if (location == WINED3D_LOCATION_TEXTURE_RGB
@ -358,7 +358,7 @@ index e9af37e..dd26bb0 100644
&& surface->container->resource.draw_binding != WINED3D_LOCATION_DRAWABLE)
{
/* Already up to date, nothing to do. */
@@ -4284,12 +4285,12 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
@@ -4262,12 +4263,12 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
else
{
FIXME("Unimplemented copy from %s to %s for depth/stencil buffers.\n",
@ -373,7 +373,7 @@ index e9af37e..dd26bb0 100644
{
TRACE("Location already up to date.\n");
return;
@@ -4303,7 +4304,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
@@ -4281,7 +4282,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
required_access, surface->resource.access_flags);
}
@ -381,8 +381,8 @@ index e9af37e..dd26bb0 100644
+ if (!surface->resource.locations)
{
ERR("Surface %p does not have any up to date location.\n", surface);
surface->flags |= SFLAG_LOST;
@@ -4343,7 +4344,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
return;
@@ -4320,7 +4321,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
surface_validate_location(surface, location);
@ -391,7 +391,7 @@ index e9af37e..dd26bb0 100644
surface_evict_sysmem(surface);
return;
@@ -5395,8 +5396,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
@@ -5372,8 +5373,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
/* In principle this would apply to depth blits as well, but we don't
* implement those in the CPU blitter at the moment. */
@ -402,7 +402,7 @@ index e9af37e..dd26bb0 100644
{
if (scale)
TRACE("Not doing sysmem blit because of scaling.\n");
@@ -5436,8 +5437,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
@@ -5413,8 +5414,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
color_key = &src_surface->container->async.src_blt_color_key;
blit_op = WINED3D_BLIT_OP_COLOR_BLIT_CKEY;
}
@ -414,7 +414,7 @@ index e9af37e..dd26bb0 100644
/* Upload */
if (scale)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index ea31e35..5abda05 100644
index 6c6a3d3..87cd0d0 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2407,7 +2407,6 @@ struct wined3d_surface

View File

@ -1,4 +1,4 @@
From 808dc946d520997b207c6dbea8c034465ea26c41 Mon Sep 17 00:00:00 2001
From 803e39eb0ca711ad7a2867bdac796cc4360c4c27 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.
@ -26,10 +26,10 @@ index e8526d8..a87b09b 100644
}
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 14f28a6..12bc454 100644
index 2312267..c10c1fc 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -397,7 +397,7 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
@@ -398,7 +398,7 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
if (rt)
{
@ -38,7 +38,7 @@ index 14f28a6..12bc454 100644
surface_invalidate_location(rt, ~rt->container->resource.draw_binding);
}
}
@@ -4018,7 +4018,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
@@ -4047,7 +4047,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
context_release(context);
@ -48,7 +48,7 @@ index 14f28a6..12bc454 100644
}
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index dd26bb0..afbb97e 100644
index 50282c0..4fb2578 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -1158,14 +1158,14 @@ static void surface_unload(struct wined3d_resource *resource)
@ -67,8 +67,8 @@ index dd26bb0..afbb97e 100644
+ wined3d_resource_validate_location(&surface->resource, WINED3D_LOCATION_SYSMEM);
surface_invalidate_location(surface, ~WINED3D_LOCATION_SYSMEM);
}
@@ -1701,7 +1701,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
}
@@ -1695,7 +1695,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
context_release(context);
@ -77,7 +77,7 @@ index dd26bb0..afbb97e 100644
surface_invalidate_location(dst_surface, ~WINED3D_LOCATION_TEXTURE_RGB);
return WINED3D_OK;
@@ -2155,7 +2155,7 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
@@ -2133,7 +2133,7 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
valid_location = WINED3D_LOCATION_SYSMEM;
}
@ -86,7 +86,7 @@ index dd26bb0..afbb97e 100644
return WINED3D_OK;
}
@@ -2701,7 +2701,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
@@ -2679,7 +2679,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));
@ -95,7 +95,7 @@ index dd26bb0..afbb97e 100644
}
else
{
@@ -3189,7 +3189,7 @@ static void fb_copy_to_texture_direct(struct wined3d_surface *dst_surface, struc
@@ -3167,7 +3167,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. */
@ -104,7 +104,7 @@ index dd26bb0..afbb97e 100644
surface_invalidate_location(dst_surface, ~WINED3D_LOCATION_TEXTURE_RGB);
}
@@ -3462,7 +3462,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
@@ -3440,7 +3440,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. */
@ -113,7 +113,7 @@ index dd26bb0..afbb97e 100644
surface_invalidate_location(dst_surface, ~WINED3D_LOCATION_TEXTURE_RGB);
}
@@ -3940,13 +3940,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
@@ -3918,13 +3918,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
surface->ds_current_size.cy = surface->resource.height;
}
@ -127,7 +127,7 @@ index dd26bb0..afbb97e 100644
void surface_invalidate_location(struct wined3d_surface *surface, DWORD location)
{
TRACE("surface %p, location %s.\n", surface, wined3d_debug_location(location));
@@ -4342,7 +4335,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
@@ -4319,7 +4312,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
break;
}
@ -136,7 +136,7 @@ index dd26bb0..afbb97e 100644
if (location != WINED3D_LOCATION_SYSMEM && (surface->resource.locations & WINED3D_LOCATION_SYSMEM))
surface_evict_sysmem(surface);
@@ -4516,7 +4509,7 @@ static void ffp_blit_blit_surface(struct wined3d_device *device, DWORD filter,
@@ -4493,7 +4486,7 @@ static void ffp_blit_blit_surface(struct wined3d_device *device, DWORD filter,
wined3d_texture_set_color_key(src_surface->container, WINED3D_CKEY_SRC_BLT,
(old_color_key_flags & WINED3D_CKEY_SRC_BLT) ? &old_blt_key : NULL);
@ -145,7 +145,7 @@ index dd26bb0..afbb97e 100644
surface_invalidate_location(dst_surface, ~dst_surface->container->resource.draw_binding);
}
@@ -5497,7 +5490,7 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
@@ -5474,7 +5467,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);
@ -154,7 +154,7 @@ index dd26bb0..afbb97e 100644
surface_invalidate_location(dst_surface, ~dst_surface->container->resource.draw_binding);
return WINED3D_OK;
@@ -5587,7 +5580,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
@@ -5564,7 +5557,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
}
surface->container = container;
@ -163,7 +163,7 @@ index dd26bb0..afbb97e 100644
list_init(&surface->renderbuffers);
list_init(&surface->overlays);
@@ -5619,7 +5612,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
@@ -5596,7 +5589,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);
@ -210,7 +210,7 @@ index 0f40a3c..6b41db8 100644
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 5abda05..b0b0d0b 100644
index 87cd0d0..3848e76 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2477,7 +2477,6 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,

View File

@ -1,4 +1,4 @@
From b868f6317602bb184f3f0ef13c191905096ad342 Mon Sep 17 00:00:00 2001
From c1235a5f6ed86eefc1b797df0836a1b61d6fceb7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Sat, 4 Jan 2014 01:02:15 +0100
Subject: wined3d: Remove surface_invalidate_location.
@ -28,10 +28,10 @@ index a87b09b..4df6e2f 100644
static HRESULT arbfp_blit_color_fill(struct wined3d_device *device, struct wined3d_surface *dst_surface,
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 0e8b32b..52fb407 100644
index 1e357e7..230946d 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -3298,7 +3298,7 @@ static void context_setup_target(struct wined3d_context *context, struct wined3d
@@ -3311,7 +3311,7 @@ static void context_setup_target(struct wined3d_context *context, struct wined3d
if (texture->texture_srgb.name)
wined3d_texture_load(texture, context, TRUE);
wined3d_texture_load(texture, context, FALSE);
@ -41,10 +41,10 @@ index 0e8b32b..52fb407 100644
}
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 58478ba..77ea1e9 100644
index 58edac3..143cf9c 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -398,7 +398,7 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
@@ -399,7 +399,7 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
if (rt)
{
wined3d_resource_validate_location(&rt->resource, rt->container->resource.draw_binding);
@ -53,7 +53,7 @@ index 58478ba..77ea1e9 100644
}
}
@@ -4019,7 +4019,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
@@ -4048,7 +4048,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
context_release(context);
wined3d_resource_validate_location(&surface->resource, WINED3D_LOCATION_TEXTURE_RGB);
@ -76,7 +76,7 @@ index 943a829..95245a9 100644
else
{
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 74d3878..35e7adf 100644
index ad43381..7c0594f 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -599,7 +599,7 @@ static void surface_evict_sysmem(struct wined3d_surface *surface)
@ -97,7 +97,7 @@ index 74d3878..35e7adf 100644
}
static ULONG surface_resource_incref(struct wined3d_resource *resource)
@@ -1159,14 +1159,14 @@ static void surface_unload(struct wined3d_resource *resource)
@@ -1159,21 +1159,21 @@ static void surface_unload(struct wined3d_resource *resource)
if (resource->usage & WINED3DUSAGE_DEPTHSTENCIL)
{
wined3d_resource_validate_location(&surface->resource, WINED3D_LOCATION_DISCARDED);
@ -112,9 +112,8 @@ index 74d3878..35e7adf 100644
- surface_invalidate_location(surface, ~WINED3D_LOCATION_SYSMEM);
+ wined3d_resource_invalidate_location(&surface->resource, ~WINED3D_LOCATION_SYSMEM);
}
/* We also get here when the ddraw swapchain is destroyed, for example
@@ -1179,7 +1179,7 @@ static void surface_unload(struct wined3d_resource *resource)
}
else
{
surface_prepare_map_memory(surface);
surface_load_location(surface, context, surface->resource.map_binding);
@ -123,7 +122,7 @@ index 74d3878..35e7adf 100644
}
/* Destroy PBOs, but load them into real sysmem before */
@@ -1230,7 +1230,10 @@ static HRESULT surface_resource_sub_resource_unmap(struct wined3d_resource *reso
@@ -1224,7 +1224,10 @@ static HRESULT surface_resource_sub_resource_unmap(struct wined3d_resource *reso
static void wined3d_surface_location_invalidated(struct wined3d_resource *resource, DWORD location)
{
@ -135,7 +134,7 @@ index 74d3878..35e7adf 100644
}
static const struct wined3d_resource_ops surface_resource_ops =
@@ -1708,7 +1711,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
@@ -1702,7 +1705,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
context_release(context);
wined3d_resource_validate_location(&dst_surface->resource, WINED3D_LOCATION_TEXTURE_RGB);
@ -144,7 +143,7 @@ index 74d3878..35e7adf 100644
return WINED3D_OK;
}
@@ -2724,7 +2727,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
@@ -2702,7 +2705,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
}
if (!(flags & (WINED3D_MAP_NO_DIRTY_UPDATE | WINED3D_MAP_READONLY)))
@ -153,7 +152,7 @@ index 74d3878..35e7adf 100644
switch (surface->resource.map_binding)
{
@@ -2840,7 +2843,7 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
@@ -2818,7 +2821,7 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
}
surface_load_location(surface, context, WINED3D_LOCATION_DIB);
@ -162,7 +161,7 @@ index 74d3878..35e7adf 100644
if (context)
context_release(context);
@@ -2889,7 +2892,7 @@ HRESULT CDECL wined3d_surface_releasedc(struct wined3d_surface *surface, HDC dc)
@@ -2867,7 +2870,7 @@ HRESULT CDECL wined3d_surface_releasedc(struct wined3d_surface *surface, HDC dc)
context = context_acquire(device, NULL);
surface_load_location(surface, context, surface->resource.map_binding);
@ -171,7 +170,7 @@ index 74d3878..35e7adf 100644
if (context)
context_release(context);
}
@@ -3196,7 +3199,7 @@ static void fb_copy_to_texture_direct(struct wined3d_surface *dst_surface, struc
@@ -3174,7 +3177,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. */
wined3d_resource_validate_location(&dst_surface->resource, WINED3D_LOCATION_TEXTURE_RGB);
@ -180,7 +179,7 @@ index 74d3878..35e7adf 100644
}
/* Uses the hardware to stretch and flip the image */
@@ -3264,7 +3267,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
@@ -3242,7 +3245,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
checkGLcall("glEnable(texture_target)");
/* For now invalidate the texture copy of the back buffer. Drawable and sysmem copy are untouched */
@ -189,7 +188,7 @@ index 74d3878..35e7adf 100644
}
/* Make sure that the top pixel is always above the bottom pixel, and keep a separate upside down flag
@@ -3469,7 +3472,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
@@ -3447,7 +3450,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. */
wined3d_resource_validate_location(&dst_surface->resource, WINED3D_LOCATION_TEXTURE_RGB);
@ -198,7 +197,7 @@ index 74d3878..35e7adf 100644
}
/* Front buffer coordinates are always full screen coordinates, but our GL
@@ -3946,18 +3949,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
@@ -3924,18 +3927,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
surface->ds_current_size.cy = surface->resource.height;
}
@ -217,7 +216,7 @@ index 74d3878..35e7adf 100644
static DWORD resource_access_from_location(DWORD location)
{
switch (location)
@@ -4516,7 +4507,7 @@ static void ffp_blit_blit_surface(struct wined3d_device *device, DWORD filter,
@@ -4493,7 +4484,7 @@ static void ffp_blit_blit_surface(struct wined3d_device *device, DWORD filter,
(old_color_key_flags & WINED3D_CKEY_SRC_BLT) ? &old_blt_key : NULL);
wined3d_resource_validate_location(&dst_surface->resource, dst_surface->container->resource.draw_binding);
@ -226,7 +225,7 @@ index 74d3878..35e7adf 100644
}
const struct blit_shader ffp_blit = {
@@ -5497,7 +5488,7 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
@@ -5474,7 +5465,7 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
context_release(context);
wined3d_resource_validate_location(&dst_surface->resource, dst_surface->container->resource.draw_binding);
@ -235,7 +234,7 @@ index 74d3878..35e7adf 100644
return WINED3D_OK;
}
@@ -5619,7 +5610,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
@@ -5596,7 +5587,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
{
wined3d_resource_free_sysmem(&surface->resource);
wined3d_resource_validate_location(&surface->resource, WINED3D_LOCATION_DIB);
@ -300,7 +299,7 @@ index 7e31832..be378fc 100644
static void texture2d_sub_resource_validate_location(struct wined3d_resource *sub_resource, DWORD location)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 4c1e3e4..3e07a16 100644
index ed013a9..54f95e3 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2458,7 +2458,6 @@ HRESULT surface_color_fill(struct wined3d_surface *s,

View File

@ -1,4 +1,4 @@
From 5a18a8e392bd8e65126b384670e94297b6095aa1 Mon Sep 17 00:00:00 2001
From d558ec01776d048c7fbbdfee48388df336292b68 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Sat, 4 Jan 2014 13:20:25 +0100
Subject: wined3d: Discard implicit surfaces on unload.
@ -8,7 +8,7 @@ Subject: wined3d: Discard implicit surfaces on unload.
1 file changed, 3 insertions(+), 18 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 38af18c..5d97899 100644
index f8a360b..ee4a422 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -1124,24 +1124,9 @@ static void surface_unload(struct wined3d_resource *resource)
@ -36,9 +36,9 @@ index 38af18c..5d97899 100644
+ * opengl resources, so we cannot leave early. */
+ wined3d_resource_validate_location(&surface->resource, WINED3D_LOCATION_DISCARDED);
+ wined3d_resource_invalidate_location(&surface->resource, ~WINED3D_LOCATION_DISCARDED);
/* We also get here when the ddraw swapchain is destroyed, for example
* for a mode switch. In this case this surface won't necessarily be
}
else
{
--
2.6.2

File diff suppressed because it is too large Load Diff