Rebase against 14f024048b301cd6ccc7e15e731d069cd68b13c0.

This commit is contained in:
Sebastian Lackner 2015-10-17 00:37:47 +02:00
parent 188b345d2e
commit 3bf5b8762a
6 changed files with 224 additions and 221 deletions

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "31e0755ea664e02f05a1e500a19fb5f584c1c1cc"
echo "14f024048b301cd6ccc7e15e731d069cd68b13c0"
}
# Show version information

View File

@ -1,4 +1,4 @@
From c87f87830176d05d7a14297174cb439f877c83c9 Mon Sep 17 00:00:00 2001
From 44c42e12f894a08810a54bb0cc69c3ad5dac323e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Sun, 17 Nov 2013 20:19:24 +0100
Subject: wined3d: Pass a context to surface_load_location.
@ -14,10 +14,10 @@ Subject: wined3d: Pass a context to surface_load_location.
7 files changed, 108 insertions(+), 78 deletions(-)
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 79125d1..b900417 100644
index dc4199a..eee0274 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -2263,7 +2263,7 @@ static BOOL match_depth_stencil_format(const struct wined3d_format *existing,
@@ -2277,7 +2277,7 @@ static BOOL match_depth_stencil_format(const struct wined3d_format *existing,
return TRUE;
}
@ -26,7 +26,7 @@ index 79125d1..b900417 100644
static void context_validate_onscreen_formats(struct wined3d_context *context,
const struct wined3d_rendertarget_view *depth_stencil)
{
@@ -2279,7 +2279,7 @@ static void context_validate_onscreen_formats(struct wined3d_context *context,
@@ -2293,7 +2293,7 @@ static void context_validate_onscreen_formats(struct wined3d_context *context,
WARN("Depth stencil format is not supported by WGL, rendering the backbuffer in an FBO\n");
/* The currently active context is the necessary context to access the swapchain's onscreen buffers */
@ -36,7 +36,7 @@ index 79125d1..b900417 100644
swapchain_update_draw_bindings(swapchain);
context_set_render_offscreen(context, TRUE);
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 880f77c..67baca1 100644
index 0d607ee..3a55e04 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -300,6 +300,15 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
@ -76,7 +76,7 @@ index 880f77c..67baca1 100644
if (target)
{
render_offscreen = context->render_offscreen;
@@ -4049,7 +4049,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
@@ -4015,7 +4015,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
&& src_rect.bottom == sub_resource->height)
wined3d_texture_prepare_texture(texture, context, FALSE);
else
@ -86,7 +86,7 @@ index 880f77c..67baca1 100644
wined3d_surface_upload_data(surface, gl_info, resource->format,
diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c
index 7a6a6e9..cec092f 100644
index dcfebe4..d2d3bce 100644
--- a/dlls/wined3d/drawprim.c
+++ b/dlls/wined3d/drawprim.c
@@ -611,6 +611,15 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
@ -129,7 +129,7 @@ index 7a6a6e9..cec092f 100644
{
/* Note that this depends on the context_acquire() call above to set
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 537ac09..186e702 100644
index efc0300..f425b5a 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -753,7 +753,16 @@ static void surface_unmap(struct wined3d_surface *surface)
@ -188,7 +188,7 @@ index 537ac09..186e702 100644
if (src_location == WINED3D_LOCATION_DRAWABLE) required_rt = src_surface;
else if (dst_location == WINED3D_LOCATION_DRAWABLE) required_rt = dst_surface;
@@ -1145,6 +1154,9 @@ static void surface_unload(struct wined3d_resource *resource)
@@ -1136,6 +1145,9 @@ static void surface_unload(struct wined3d_resource *resource)
TRACE("surface %p.\n", surface);
@ -198,7 +198,7 @@ index 537ac09..186e702 100644
if (resource->pool == WINED3D_POOL_DEFAULT)
{
/* Default pool resources are supposed to be destroyed before Reset is called.
@@ -1170,13 +1182,10 @@ static void surface_unload(struct wined3d_resource *resource)
@@ -1161,13 +1173,10 @@ static void surface_unload(struct wined3d_resource *resource)
else
{
surface_prepare_map_memory(surface);
@ -213,7 +213,7 @@ index 537ac09..186e702 100644
/* Destroy PBOs, but load them into real sysmem before */
if (surface->pbo)
surface_remove_pbo(surface, gl_info);
@@ -1663,7 +1672,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
@@ -1661,7 +1670,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
if (update_w == dst_w && update_h == dst_h)
wined3d_texture_prepare_texture(dst_surface->container, context, FALSE);
else
@ -222,7 +222,7 @@ index 537ac09..186e702 100644
wined3d_texture_bind_and_dirtify(dst_surface->container, context, FALSE);
surface_get_memory(src_surface, &data, src_surface->locations);
@@ -1779,7 +1788,8 @@ GLenum surface_get_gl_buffer(const struct wined3d_surface *surface)
@@ -1777,7 +1786,8 @@ GLenum surface_get_gl_buffer(const struct wined3d_surface *surface)
return GL_BACK;
}
@ -232,7 +232,7 @@ index 537ac09..186e702 100644
{
DWORD location = srgb ? WINED3D_LOCATION_TEXTURE_SRGB : WINED3D_LOCATION_TEXTURE_RGB;
@@ -1795,7 +1805,7 @@ void surface_load(struct wined3d_surface *surface, BOOL srgb)
@@ -1793,7 +1803,7 @@ void surface_load(struct wined3d_surface *surface, BOOL srgb)
}
TRACE("Reloading because surface is dirty.\n");
@ -241,7 +241,7 @@ index 537ac09..186e702 100644
surface_evict_sysmem(surface);
}
@@ -2709,10 +2719,16 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
@@ -2675,10 +2685,16 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
}
else
{
@ -259,7 +259,7 @@ index 537ac09..186e702 100644
}
if (!(flags & (WINED3D_MAP_NO_DIRTY_UPDATE | WINED3D_MAP_READONLY)))
@@ -2794,6 +2810,8 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
@@ -2760,6 +2776,8 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
{
HRESULT hr;
@ -268,7 +268,7 @@ index 537ac09..186e702 100644
TRACE("surface %p, dc %p.\n", surface, dc);
@@ -2805,26 +2823,36 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
@@ -2771,26 +2789,36 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
if (surface->resource.map_count)
return WINED3DERR_INVALIDCALL;
@ -308,7 +308,7 @@ index 537ac09..186e702 100644
surface->flags |= SFLAG_DCINUSE;
surface->resource.map_count++;
@@ -2862,8 +2890,16 @@ HRESULT CDECL wined3d_surface_releasedc(struct wined3d_surface *surface, HDC dc)
@@ -2828,8 +2856,16 @@ HRESULT CDECL wined3d_surface_releasedc(struct wined3d_surface *surface, HDC dc)
* copied back to the DIB in the next getdc call.
*
* The same consideration applies to user memory surfaces. */
@ -326,7 +326,7 @@ index 537ac09..186e702 100644
}
return WINED3D_OK;
@@ -4107,7 +4143,7 @@ static void surface_load_sysmem(struct wined3d_surface *surface,
@@ -3991,7 +4027,7 @@ static void surface_load_sysmem(struct wined3d_surface *surface,
}
if (surface->locations & (WINED3D_LOCATION_RB_MULTISAMPLE | WINED3D_LOCATION_RB_RESOLVED))
@ -335,7 +335,7 @@ index 537ac09..186e702 100644
/* Download the surface to system memory. */
if (surface->locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB))
@@ -4143,7 +4179,7 @@ static HRESULT surface_load_drawable(struct wined3d_surface *surface,
@@ -4027,7 +4063,7 @@ static HRESULT surface_load_drawable(struct wined3d_surface *surface,
}
surface_get_rect(surface, NULL, &r);
@ -344,7 +344,7 @@ index 537ac09..186e702 100644
surface_blt_to_drawable(surface->resource.device, context,
WINED3D_TEXF_POINT, FALSE, surface, &r, surface, &r);
@@ -4216,7 +4252,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4100,7 +4136,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
/* Performance warning... */
FIXME("Downloading RGB surface %p to reload it as sRGB.\n", surface);
surface_prepare_map_memory(surface);
@ -353,7 +353,7 @@ index 537ac09..186e702 100644
}
}
else
@@ -4227,7 +4263,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4111,7 +4147,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
/* Performance warning... */
FIXME("Downloading sRGB surface %p to reload it as RGB.\n", surface);
surface_prepare_map_memory(surface);
@ -362,7 +362,7 @@ index 537ac09..186e702 100644
}
}
@@ -4236,7 +4272,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4120,7 +4156,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
WARN("Trying to load a texture from sysmem, but no simple location is valid.\n");
/* Lets hope we get it from somewhere... */
surface_prepare_system_memory(surface);
@ -371,7 +371,7 @@ index 537ac09..186e702 100644
}
wined3d_texture_prepare_texture(texture, context, srgb);
@@ -4262,7 +4298,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4146,7 +4182,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
surface->resource.map_binding = WINED3D_LOCATION_SYSMEM;
surface_prepare_map_memory(surface);
@ -380,7 +380,7 @@ index 537ac09..186e702 100644
surface_remove_pbo(surface, gl_info);
}
@@ -4330,11 +4366,10 @@ static void surface_multisample_resolve(struct wined3d_surface *surface, struct
@@ -4214,11 +4250,10 @@ static void surface_multisample_resolve(struct wined3d_surface *surface, struct
surface, WINED3D_LOCATION_RB_MULTISAMPLE, &rect, surface, WINED3D_LOCATION_RB_RESOLVED, &rect);
}
@ -394,7 +394,7 @@ index 537ac09..186e702 100644
TRACE("surface %p, location %s.\n", surface, wined3d_debug_location(location));
@@ -4343,9 +4378,7 @@ HRESULT surface_load_location(struct wined3d_surface *surface, DWORD location)
@@ -4227,9 +4262,7 @@ HRESULT surface_load_location(struct wined3d_surface *surface, DWORD location)
if (location == WINED3D_LOCATION_TEXTURE_RGB
&& surface->locations & (WINED3D_LOCATION_DRAWABLE | WINED3D_LOCATION_DISCARDED))
{
@ -404,7 +404,7 @@ index 537ac09..186e702 100644
return WINED3D_OK;
}
else if (location & surface->locations
@@ -4389,33 +4422,22 @@ HRESULT surface_load_location(struct wined3d_surface *surface, DWORD location)
@@ -4273,33 +4306,22 @@ HRESULT surface_load_location(struct wined3d_surface *surface, DWORD location)
case WINED3D_LOCATION_USER_MEMORY:
case WINED3D_LOCATION_SYSMEM:
case WINED3D_LOCATION_BUFFER:
@ -441,7 +441,7 @@ index 537ac09..186e702 100644
return hr;
break;
@@ -5532,7 +5554,11 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
@@ -5418,7 +5440,11 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
if (SUCCEEDED(surface_upload_from_surface(dst_surface, &dst_point, src_surface, &src_rect)))
{
if (!wined3d_resource_is_offscreen(&dst_surface->container->resource))
@ -455,7 +455,7 @@ index 537ac09..186e702 100644
}
}
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
index 2801215..9750c8c 100644
index 0a1373f..27bcf70 100644
--- a/dlls/wined3d/swapchain.c
+++ b/dlls/wined3d/swapchain.c
@@ -309,7 +309,7 @@ static void swapchain_blit(const struct wined3d_swapchain *swapchain,
@ -484,7 +484,7 @@ index 2801215..9750c8c 100644
}
if (swapchain->render_to_fbo)
@@ -640,7 +640,7 @@ void x11_copy_to_screen(const struct wined3d_swapchain *swapchain, const RECT *r
@@ -611,7 +611,7 @@ void x11_copy_to_screen(const struct wined3d_swapchain *swapchain, const RECT *r
TRACE("Copying surface %p to screen.\n", front);
@ -494,10 +494,10 @@ index 2801215..9750c8c 100644
src_dc = front->hDC;
window = swapchain->win_handle;
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index c7fc3a7..67bfa63 100644
index 5232053..fa6a464 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -768,16 +768,19 @@ static HRESULT wined3d_texture_upload_data(struct wined3d_texture *texture,
@@ -762,16 +762,19 @@ static HRESULT wined3d_texture_upload_data(struct wined3d_texture *texture,
static void texture2d_sub_resource_load(struct wined3d_resource *sub_resource,
struct wined3d_context *context, BOOL srgb)
{
@ -520,10 +520,10 @@ index c7fc3a7..67bfa63 100644
}
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 16336c3..92d179e 100644
index 204de58..0634812 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2429,11 +2429,12 @@ GLenum surface_get_gl_buffer(const struct wined3d_surface *surface) DECLSPEC_HID
@@ -2446,12 +2446,13 @@ GLenum surface_get_gl_buffer(const struct wined3d_surface *surface) DECLSPEC_HID
void surface_get_drawable_size(const struct wined3d_surface *surface, const struct wined3d_context *context,
unsigned int *width, unsigned int *height) DECLSPEC_HIDDEN;
void surface_invalidate_location(struct wined3d_surface *surface, DWORD location) DECLSPEC_HIDDEN;
@ -531,7 +531,8 @@ index 16336c3..92d179e 100644
+void surface_load(struct wined3d_surface *surface, struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN;
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) DECLSPEC_HIDDEN;
void surface_load_fb_texture(struct wined3d_surface *surface, BOOL srgb,
struct wined3d_context *context) DECLSPEC_HIDDEN;
-HRESULT surface_load_location(struct wined3d_surface *surface, DWORD location) DECLSPEC_HIDDEN;
+HRESULT surface_load_location(struct wined3d_surface *surface,
+ struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
@ -539,5 +540,5 @@ index 16336c3..92d179e 100644
void surface_prepare_rb(struct wined3d_surface *surface,
const struct wined3d_gl_info *gl_info, BOOL multisample) DECLSPEC_HIDDEN;
--
2.5.0
2.6.1

View File

@ -1,4 +1,4 @@
From 7059ae36100e7efafcbcefcf582c34c0ce99e435 Mon Sep 17 00:00:00 2001
From 58ff071aefe720abd2d0bb27b2c3f20b8604c279 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 66956df..8a14169 100644
index f425b5a..b9c36d1 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -4353,7 +4353,7 @@ static void surface_multisample_resolve(struct wined3d_surface *surface, struct
@@ -4251,7 +4251,7 @@ static void surface_multisample_resolve(struct wined3d_surface *surface, struct
}
/* Context activation is done by the caller. Context may be NULL in ddraw-only mode. */
@ -21,7 +21,7 @@ index 66956df..8a14169 100644
{
HRESULT hr;
@@ -4365,26 +4365,26 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
@@ -4263,26 +4263,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,7 +52,7 @@ index 66956df..8a14169 100644
}
if (WARN_ON(d3d_surface))
@@ -4399,7 +4399,7 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
@@ -4297,7 +4297,7 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
{
ERR("Surface %p does not have any up to date location.\n", surface);
surface->flags |= SFLAG_LOST;
@ -61,7 +61,7 @@ index 66956df..8a14169 100644
}
switch (location)
@@ -4413,7 +4413,7 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
@@ -4311,7 +4311,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 66956df..8a14169 100644
break;
case WINED3D_LOCATION_RB_RESOLVED:
@@ -4424,7 +4424,7 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
@@ -4322,7 +4322,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 66956df..8a14169 100644
break;
default:
@@ -4437,7 +4437,7 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
@@ -4335,7 +4335,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,18 +89,18 @@ index 66956df..8a14169 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 7115eca..f24808b 100644
index 0634812..db2b974 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2354,7 +2354,7 @@ void surface_load(struct wined3d_surface *surface, struct wined3d_context *conte
void surface_load_ds_location(struct wined3d_surface *surface,
@@ -2451,7 +2451,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) DECLSPEC_HIDDEN;
void surface_load_fb_texture(struct wined3d_surface *surface, BOOL srgb,
struct wined3d_context *context) DECLSPEC_HIDDEN;
-HRESULT surface_load_location(struct wined3d_surface *surface,
+void surface_load_location(struct wined3d_surface *surface,
struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
void surface_modify_ds_location(struct wined3d_surface *surface, DWORD location, UINT w, UINT h) DECLSPEC_HIDDEN;
void surface_prepare_rb(struct wined3d_surface *surface,
--
2.1.3
2.6.1

View File

@ -1,4 +1,4 @@
From 3774380efa36ca757552bbb624cfe3904ba7a4fc Mon Sep 17 00:00:00 2001
From 781e34c449de14ef40eec0aec6e25d04d5808806 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.
@ -12,10 +12,10 @@ Subject: wined3d: Move surface locations into the resource.
5 files changed, 51 insertions(+), 51 deletions(-)
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
index 6a321db..fc91209 100644
index 9ac6666..d576869 100644
--- a/dlls/wined3d/arb_program_shader.c
+++ b/dlls/wined3d/arb_program_shader.c
@@ -7849,7 +7849,7 @@ static void arbfp_blit_surface(struct wined3d_device *device, DWORD filter,
@@ -7850,7 +7850,7 @@ static void arbfp_blit_surface(struct wined3d_device *device, DWORD filter,
/* Now load the surface */
if (wined3d_settings.offscreen_rendering_mode != ORM_FBO
@ -25,7 +25,7 @@ index 6a321db..fc91209 100644
&& !wined3d_resource_is_offscreen(&src_surface->container->resource))
{
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 937fdb7..1ef681a 100644
index 3a55e04..b3816e0 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 d2d3bce..afccecd 100644
else
SetRectEmpty(&current_rect);
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 4bc38d8..d1493a2 100644
index b9c36d1..ad94c1f 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 4bc38d8..d1493a2 100644
{
TRACE("Not dirtified, nothing to do.\n");
return;
@@ -1675,7 +1675,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
@@ -1673,7 +1673,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 4bc38d8..d1493a2 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,
@@ -1798,7 +1798,7 @@ void surface_load(struct wined3d_surface *surface, struct wined3d_context *conte
@@ -1796,7 +1796,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 4bc38d8..d1493a2 100644
{
TRACE("surface is already in texture\n");
return;
@@ -2096,7 +2096,7 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
@@ -2062,7 +2062,7 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
create_dib = TRUE;
}
@ -117,7 +117,7 @@ index 4bc38d8..d1493a2 100644
wined3d_resource_free_sysmem(&surface->resource);
width = texture_resource->width;
@@ -3275,7 +3275,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
@@ -3238,7 +3238,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 4bc38d8..d1493a2 100644
}
/* Make sure that the top pixel is always above the bottom pixel, and keep a separate upside down flag
@@ -3813,13 +3813,14 @@ void surface_modify_ds_location(struct wined3d_surface *surface,
@@ -3765,13 +3765,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 4bc38d8..d1493a2 100644
}
/* Context activation is done by the caller. */
@@ -3834,7 +3835,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
@@ -3786,7 +3787,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 4bc38d8..d1493a2 100644
{
w = surface->ds_current_size.cx;
h = surface->ds_current_size.cy;
@@ -3860,7 +3861,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
@@ -3812,7 +3813,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
return;
}
@ -162,7 +162,7 @@ index 4bc38d8..d1493a2 100644
{
TRACE("Surface was discarded, no need copy data.\n");
switch (location)
@@ -3880,17 +3881,17 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
@@ -3832,17 +3833,17 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
default:
FIXME("Unhandled location %#x\n", location);
}
@ -184,7 +184,7 @@ index 4bc38d8..d1493a2 100644
surface->ds_current_size.cx = surface->resource.width;
surface->ds_current_size.cy = surface->resource.height;
return;
@@ -3979,7 +3980,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
@@ -3931,7 +3932,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
ERR("Invalid location (%#x) specified.\n", location);
}
@ -193,7 +193,7 @@ index 4bc38d8..d1493a2 100644
surface->ds_current_size.cx = surface->resource.width;
surface->ds_current_size.cy = surface->resource.height;
}
@@ -3988,7 +3989,7 @@ void surface_validate_location(struct wined3d_surface *surface, DWORD location)
@@ -3940,7 +3941,7 @@ void surface_validate_location(struct wined3d_surface *surface, DWORD location)
{
TRACE("surface %p, location %s.\n", surface, wined3d_debug_location(location));
@ -202,7 +202,7 @@ index 4bc38d8..d1493a2 100644
}
void surface_invalidate_location(struct wined3d_surface *surface, DWORD location)
@@ -3997,9 +3998,9 @@ void surface_invalidate_location(struct wined3d_surface *surface, DWORD location
@@ -3949,9 +3950,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);
@ -214,7 +214,7 @@ index 4bc38d8..d1493a2 100644
ERR("Surface %p does not have any up to date location.\n", surface);
}
@@ -4035,7 +4036,7 @@ static void surface_copy_simple_location(struct wined3d_surface *surface, DWORD
@@ -3987,7 +3988,7 @@ static void surface_copy_simple_location(struct wined3d_surface *surface, DWORD
UINT size = surface->resource.size;
surface_get_memory(surface, &dst, location);
@ -223,7 +223,7 @@ index 4bc38d8..d1493a2 100644
if (dst.buffer_object)
{
@@ -4068,33 +4069,33 @@ static void surface_load_sysmem(struct wined3d_surface *surface,
@@ -4020,33 +4021,33 @@ static void surface_load_sysmem(struct wined3d_surface *surface,
{
const struct wined3d_gl_info *gl_info = context->gl_info;
@ -263,14 +263,14 @@ index 4bc38d8..d1493a2 100644
}
/* Context activation is done by the caller. */
@@ -4134,14 +4135,14 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4086,14 +4087,14 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
if (wined3d_settings.offscreen_rendering_mode != ORM_FBO
&& wined3d_resource_is_offscreen(&texture->resource)
- && (surface->locations & WINED3D_LOCATION_DRAWABLE))
+ && (surface->resource.locations & WINED3D_LOCATION_DRAWABLE))
{
surface_load_fb_texture(surface, srgb);
surface_load_fb_texture(surface, srgb, context);
return WINED3D_OK;
}
@ -280,7 +280,7 @@ index 4bc38d8..d1493a2 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,
@@ -4157,13 +4158,13 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4109,13 +4110,13 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
return WINED3D_OK;
}
@ -296,7 +296,7 @@ index 4bc38d8..d1493a2 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};
@@ -4178,7 +4179,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4130,7 +4131,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
if (srgb)
{
@ -305,7 +305,7 @@ index 4bc38d8..d1493a2 100644
== WINED3D_LOCATION_TEXTURE_RGB)
{
/* Performance warning... */
@@ -4189,7 +4190,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4141,7 +4142,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
}
else
{
@ -314,7 +314,7 @@ index 4bc38d8..d1493a2 100644
== WINED3D_LOCATION_TEXTURE_SRGB)
{
/* Performance warning... */
@@ -4199,7 +4200,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4151,7 +4152,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
}
}
@ -323,7 +323,7 @@ index 4bc38d8..d1493a2 100644
{
WARN("Trying to load a texture from sysmem, but no simple location is valid.\n");
/* Lets hope we get it from somewhere... */
@@ -4234,7 +4235,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4186,7 +4187,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
surface_remove_pbo(surface, gl_info);
}
@ -332,7 +332,7 @@ index 4bc38d8..d1493a2 100644
if (format.convert)
{
/* This code is entered for texture formats which need a fixup. */
@@ -4290,7 +4291,7 @@ static void surface_multisample_resolve(struct wined3d_surface *surface, struct
@@ -4242,7 +4243,7 @@ static void surface_multisample_resolve(struct wined3d_surface *surface, struct
{
RECT rect = {0, 0, surface->resource.width, surface->resource.height};
@ -341,7 +341,7 @@ index 4bc38d8..d1493a2 100644
ERR("Trying to resolve multisampled surface %p, but location WINED3D_LOCATION_RB_MULTISAMPLE not current.\n",
surface);
@@ -4308,12 +4309,12 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
@@ -4260,12 +4261,12 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
if (surface->resource.usage & WINED3DUSAGE_DEPTHSTENCIL)
{
if (location == WINED3D_LOCATION_TEXTURE_RGB
@ -356,7 +356,7 @@ index 4bc38d8..d1493a2 100644
&& surface->container->resource.draw_binding != WINED3D_LOCATION_DRAWABLE)
{
/* Already up to date, nothing to do. */
@@ -4322,12 +4323,12 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
@@ -4274,12 +4275,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",
@ -371,7 +371,7 @@ index 4bc38d8..d1493a2 100644
{
TRACE("Location already up to date.\n");
return;
@@ -4341,7 +4342,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
@@ -4293,7 +4294,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
required_access, surface->resource.access_flags);
}
@ -380,7 +380,7 @@ index 4bc38d8..d1493a2 100644
{
ERR("Surface %p does not have any up to date location.\n", surface);
surface->flags |= SFLAG_LOST;
@@ -4380,7 +4381,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
@@ -4332,7 +4333,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
surface_validate_location(surface, location);
@ -389,7 +389,7 @@ index 4bc38d8..d1493a2 100644
surface_evict_sysmem(surface);
return;
@@ -5431,8 +5432,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
@@ -5384,8 +5385,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. */
@ -400,7 +400,7 @@ index 4bc38d8..d1493a2 100644
{
if (scale)
TRACE("Not doing sysmem blit because of scaling.\n");
@@ -5472,8 +5473,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
@@ -5425,8 +5426,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;
}
@ -412,10 +412,10 @@ index 4bc38d8..d1493a2 100644
/* Upload */
if (scale)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 638b99d..2353881 100644
index 0d12529..299babb 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2378,7 +2378,6 @@ struct wined3d_surface
@@ -2395,7 +2395,6 @@ struct wined3d_surface
const struct wined3d_surface_ops *surface_ops;
struct wined3d_texture *container;
void *user_memory;
@ -424,5 +424,5 @@ index 638b99d..2353881 100644
DWORD flags;
--
2.5.1
2.6.1

View File

@ -1,4 +1,4 @@
From ba7975a0842a03691b9ab43254df9be230d25754 Mon Sep 17 00:00:00 2001
From 03fcc50c5e40320fc211ce013ff5f3f8b9f5fd4a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Sun, 17 Nov 2013 20:33:17 +0100
Subject: wined3d: Replace surface_load_location with resource_load_location.
@ -15,10 +15,10 @@ FIXME: Check if this patch is complete enough to make sense.
7 files changed, 44 insertions(+), 87 deletions(-)
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 4752fff..5f70ce5 100644
index 9cefa23..b65ac9d 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -2279,7 +2279,7 @@ static void context_validate_onscreen_formats(struct wined3d_context *context,
@@ -2293,7 +2293,7 @@ static void context_validate_onscreen_formats(struct wined3d_context *context,
WARN("Depth stencil format is not supported by WGL, rendering the backbuffer in an FBO\n");
/* The currently active context is the necessary context to access the swapchain's onscreen buffers */
@ -28,7 +28,7 @@ index 4752fff..5f70ce5 100644
swapchain_update_draw_bindings(swapchain);
context_set_render_offscreen(context, TRUE);
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index a127f9d..1da2df4 100644
index 77a458b..749a517 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -323,7 +323,7 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
@ -40,7 +40,7 @@ index a127f9d..1da2df4 100644
}
}
@@ -4049,7 +4049,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
@@ -4015,7 +4015,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
&& src_rect.bottom == sub_resource->height)
wined3d_texture_prepare_texture(texture, context, FALSE);
else
@ -50,7 +50,7 @@ index a127f9d..1da2df4 100644
wined3d_surface_upload_data(surface, gl_info, resource->format,
diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c
index 8a27363..bafe7dd 100644
index d756182..0e1f4ec 100644
--- a/dlls/wined3d/drawprim.c
+++ b/dlls/wined3d/drawprim.c
@@ -628,7 +628,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
@ -63,7 +63,7 @@ index 8a27363..bafe7dd 100644
}
}
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 9a37dcd..4e8cf9b 100644
index 0e27348..83ed1e9 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -759,7 +759,7 @@ static void surface_unmap(struct wined3d_surface *surface)
@ -99,7 +99,7 @@ index 9a37dcd..4e8cf9b 100644
if (src_location == WINED3D_LOCATION_DRAWABLE) required_rt = src_surface;
else if (dst_location == WINED3D_LOCATION_DRAWABLE) required_rt = dst_surface;
@@ -1182,7 +1182,7 @@ static void surface_unload(struct wined3d_resource *resource)
@@ -1173,7 +1173,7 @@ static void surface_unload(struct wined3d_resource *resource)
else
{
surface_prepare_map_memory(surface);
@ -108,7 +108,7 @@ index 9a37dcd..4e8cf9b 100644
wined3d_resource_invalidate_location(&surface->resource, ~surface->resource.map_binding);
}
@@ -1227,22 +1227,6 @@ static void wined3d_surface_location_invalidated(struct wined3d_resource *resour
@@ -1218,22 +1218,6 @@ static void wined3d_surface_location_invalidated(struct wined3d_resource *resour
wined3d_texture_set_dirty(surface->container);
}
@ -131,7 +131,7 @@ index 9a37dcd..4e8cf9b 100644
static const struct wined3d_surface_ops surface_ops =
{
surface_private_setup,
@@ -1689,7 +1673,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
@@ -1687,7 +1671,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
if (update_w == dst_w && update_h == dst_h)
wined3d_texture_prepare_texture(dst_surface->container, context, FALSE);
else
@ -140,7 +140,7 @@ index 9a37dcd..4e8cf9b 100644
wined3d_texture_bind_and_dirtify(dst_surface->container, context, FALSE);
surface_get_memory(src_surface, &data, src_surface->resource.locations);
@@ -1822,7 +1806,7 @@ void surface_load(struct wined3d_surface *surface, struct wined3d_context *conte
@@ -1820,7 +1804,7 @@ void surface_load(struct wined3d_surface *surface, struct wined3d_context *conte
}
TRACE("Reloading because surface is dirty.\n");
@ -149,7 +149,7 @@ index 9a37dcd..4e8cf9b 100644
surface_evict_sysmem(surface);
}
@@ -2743,7 +2727,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
@@ -2709,7 +2693,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
if (surface->resource.device->d3d_initialized)
context = context_acquire(surface->resource.device, NULL);
@ -158,7 +158,7 @@ index 9a37dcd..4e8cf9b 100644
if (context)
context_release(context);
}
@@ -2848,7 +2832,7 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
@@ -2814,7 +2798,7 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
{
if (surface->flags & SFLAG_CLIENT)
{
@ -167,7 +167,7 @@ index 9a37dcd..4e8cf9b 100644
surface_release_client_storage(surface);
}
hr = surface_create_dib_section(surface);
@@ -2864,7 +2848,7 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
@@ -2830,7 +2814,7 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
surface->resource.map_binding = WINED3D_LOCATION_DIB;
}
@ -176,7 +176,7 @@ index 9a37dcd..4e8cf9b 100644
wined3d_resource_invalidate_location(&surface->resource, ~WINED3D_LOCATION_DIB);
if (context)
@@ -2913,7 +2897,7 @@ HRESULT CDECL wined3d_surface_releasedc(struct wined3d_surface *surface, HDC dc)
@@ -2879,7 +2863,7 @@ HRESULT CDECL wined3d_surface_releasedc(struct wined3d_surface *surface, HDC dc)
if (device->d3d_initialized)
context = context_acquire(device, NULL);
@ -185,7 +185,7 @@ index 9a37dcd..4e8cf9b 100644
wined3d_resource_invalidate_location(&surface->resource, WINED3D_LOCATION_DIB);
if (context)
context_release(context);
@@ -3628,8 +3612,8 @@ static void surface_blt_to_drawable(const struct wined3d_device *device,
@@ -3516,8 +3500,8 @@ static void surface_blt_to_drawable(const struct wined3d_device *device,
gl_info = context->gl_info;
/* Make sure the surface is up-to-date. This should probably use
@ -196,7 +196,7 @@ index 9a37dcd..4e8cf9b 100644
wined3d_texture_load(src_surface->container, context, FALSE);
/* Activate the destination context, set it up for blitting */
@@ -4070,29 +4054,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
@@ -3954,29 +3938,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
surface->ds_current_size.cy = surface->resource.height;
}
@ -226,7 +226,7 @@ index 9a37dcd..4e8cf9b 100644
static void surface_copy_simple_location(struct wined3d_surface *surface, DWORD location)
{
struct wined3d_device *device = surface->resource.device;
@@ -4142,7 +4103,7 @@ static void surface_load_sysmem(struct wined3d_surface *surface,
@@ -4026,7 +3987,7 @@ static void surface_load_sysmem(struct wined3d_surface *surface,
}
if (surface->resource.locations & (WINED3D_LOCATION_RB_MULTISAMPLE | WINED3D_LOCATION_RB_RESOLVED))
@ -235,7 +235,7 @@ index 9a37dcd..4e8cf9b 100644
/* Download the surface to system memory. */
if (surface->resource.locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB))
@@ -4178,7 +4139,7 @@ static HRESULT surface_load_drawable(struct wined3d_surface *surface,
@@ -4062,7 +4023,7 @@ static HRESULT surface_load_drawable(struct wined3d_surface *surface,
}
surface_get_rect(surface, NULL, &r);
@ -244,7 +244,7 @@ index 9a37dcd..4e8cf9b 100644
surface_blt_to_drawable(surface->resource.device, context,
WINED3D_TEXF_POINT, FALSE, surface, &r, surface, &r);
@@ -4251,7 +4212,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4135,7 +4096,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
/* Performance warning... */
FIXME("Downloading RGB surface %p to reload it as sRGB.\n", surface);
surface_prepare_map_memory(surface);
@ -253,7 +253,7 @@ index 9a37dcd..4e8cf9b 100644
}
}
else
@@ -4262,7 +4223,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4146,7 +4107,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
/* Performance warning... */
FIXME("Downloading sRGB surface %p to reload it as RGB.\n", surface);
surface_prepare_map_memory(surface);
@ -262,7 +262,7 @@ index 9a37dcd..4e8cf9b 100644
}
}
@@ -4271,7 +4232,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4155,7 +4116,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
WARN("Trying to load a texture from sysmem, but no simple location is valid.\n");
/* Lets hope we get it from somewhere... */
surface_prepare_system_memory(surface);
@ -271,7 +271,7 @@ index 9a37dcd..4e8cf9b 100644
}
wined3d_texture_prepare_texture(texture, context, srgb);
@@ -4297,7 +4258,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4181,7 +4142,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
surface->resource.map_binding = WINED3D_LOCATION_SYSMEM;
surface_prepare_map_memory(surface);
@ -280,7 +280,7 @@ index 9a37dcd..4e8cf9b 100644
surface_remove_pbo(surface, gl_info);
}
@@ -4365,9 +4326,11 @@ static void surface_multisample_resolve(struct wined3d_surface *surface, struct
@@ -4249,9 +4210,11 @@ static void surface_multisample_resolve(struct wined3d_surface *surface, struct
surface, WINED3D_LOCATION_RB_MULTISAMPLE, &rect, surface, WINED3D_LOCATION_RB_RESOLVED, &rect);
}
@ -294,7 +294,7 @@ index 9a37dcd..4e8cf9b 100644
HRESULT hr;
TRACE("surface %p, location %s.\n", surface, wined3d_debug_location(location));
@@ -4394,20 +4357,6 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
@@ -4278,20 +4241,6 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
}
}
@ -315,7 +315,7 @@ index 9a37dcd..4e8cf9b 100644
if (!surface->resource.locations)
{
ERR("Surface %p does not have any up to date location.\n", surface);
@@ -5555,7 +5504,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
@@ -5441,7 +5390,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
if (!wined3d_resource_is_offscreen(&dst_surface->container->resource))
{
struct wined3d_context *context = context_acquire(device, dst_surface);
@ -325,7 +325,7 @@ index 9a37dcd..4e8cf9b 100644
context_release(context);
}
return WINED3D_OK;
@@ -5628,6 +5578,15 @@ cpu:
@@ -5514,6 +5464,15 @@ cpu:
return surface_cpu_blt(dst_surface, &dst_rect, src_surface, &src_rect, flags, fx, filter);
}
@ -342,7 +342,7 @@ index 9a37dcd..4e8cf9b 100644
const struct wined3d_resource_desc *desc, GLenum target, unsigned int level, unsigned int layer, DWORD flags)
{
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
index 5fd09de..9ae610d 100644
index d0b8cf0..cf2543e 100644
--- a/dlls/wined3d/swapchain.c
+++ b/dlls/wined3d/swapchain.c
@@ -309,7 +309,7 @@ static void swapchain_blit(const struct wined3d_swapchain *swapchain,
@ -371,7 +371,7 @@ index 5fd09de..9ae610d 100644
}
if (swapchain->render_to_fbo)
@@ -640,7 +640,7 @@ void x11_copy_to_screen(const struct wined3d_swapchain *swapchain, const RECT *r
@@ -611,7 +611,7 @@ void x11_copy_to_screen(const struct wined3d_swapchain *swapchain, const RECT *r
TRACE("Copying surface %p to screen.\n", front);
@ -381,10 +381,10 @@ index 5fd09de..9ae610d 100644
src_dc = front->hDC;
window = swapchain->win_handle;
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index 813984a..561f9e6 100644
index 7694035..0241309 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -779,7 +779,7 @@ static void texture2d_sub_resource_add_dirty_region(struct wined3d_resource *sub
@@ -773,7 +773,7 @@ static void texture2d_sub_resource_add_dirty_region(struct wined3d_resource *sub
surface_prepare_map_memory(surface);
context = context_acquire(surface->resource.device, NULL);
@ -394,18 +394,18 @@ index 813984a..561f9e6 100644
wined3d_resource_invalidate_location(&surface->resource, ~surface->resource.map_binding);
}
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index dd4c07f..b68ebbe 100644
index bb12fe6..1eeab9e 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2436,8 +2436,6 @@ void surface_load(struct wined3d_surface *surface, struct wined3d_context *conte
void surface_load_ds_location(struct wined3d_surface *surface,
@@ -2454,8 +2454,6 @@ 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) DECLSPEC_HIDDEN;
void surface_load_fb_texture(struct wined3d_surface *surface, BOOL srgb,
struct wined3d_context *context) DECLSPEC_HIDDEN;
-void surface_load_location(struct wined3d_surface *surface,
- struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
void surface_modify_ds_location(struct wined3d_surface *surface, DWORD location, UINT w, UINT h) DECLSPEC_HIDDEN;
void surface_prepare_rb(struct wined3d_surface *surface,
const struct wined3d_gl_info *gl_info, BOOL multisample) DECLSPEC_HIDDEN;
--
2.5.0
2.6.1

View File

@ -2099,7 +2099,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
GLuint rb_multisample;
GLuint rb_resolved;
GLenum texture_target;
@@ -2529,10 +2681,19 @@
@@ -2529,11 +2681,21 @@
GLenum surface_get_gl_buffer(const struct wined3d_surface *surface) DECLSPEC_HIDDEN;
void surface_get_drawable_size(const struct wined3d_surface *surface, const struct wined3d_context *context,
unsigned int *width, unsigned int *height) DECLSPEC_HIDDEN;
@ -2107,19 +2107,21 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
void surface_load(struct wined3d_surface *surface, struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN;
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) DECLSPEC_HIDDEN;
void surface_load_fb_texture(struct wined3d_surface *surface, BOOL srgb,
struct wined3d_context *context) DECLSPEC_HIDDEN;
+#else /* STAGING_CSMT */
+void surface_invalidate_location(struct wined3d_surface *surface, DWORD location) DECLSPEC_HIDDEN;
+void surface_load(struct wined3d_surface *surface, BOOL srgb) DECLSPEC_HIDDEN;
+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) DECLSPEC_HIDDEN;
+void surface_load_fb_texture(struct wined3d_surface *surface, BOOL srgb,
+ struct wined3d_context *context) DECLSPEC_HIDDEN;
+HRESULT surface_load_location(struct wined3d_surface *surface, DWORD location) DECLSPEC_HIDDEN;
+#endif /* STAGING_CSMT */
void surface_modify_ds_location(struct wined3d_surface *surface, DWORD location, UINT w, UINT h) DECLSPEC_HIDDEN;
void surface_prepare_rb(struct wined3d_surface *surface,
const struct wined3d_gl_info *gl_info, BOOL multisample) DECLSPEC_HIDDEN;
@@ -2544,6 +2705,7 @@
@@ -2545,6 +2707,7 @@
const struct wined3d_gl_info *gl_info, void *mem, unsigned int pitch) DECLSPEC_HIDDEN;
HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const POINT *dst_point,
struct wined3d_surface *src_surface, const RECT *src_rect) DECLSPEC_HIDDEN;
@ -2127,7 +2129,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
HRESULT wined3d_surface_create(struct wined3d_texture *container, const struct wined3d_resource_desc *desc,
GLenum target, unsigned int level, unsigned int layer, DWORD flags,
struct wined3d_surface **surface) DECLSPEC_HIDDEN;
@@ -2558,6 +2720,17 @@
@@ -2559,6 +2722,17 @@
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;
@ -2145,7 +2147,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
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;
@@ -2580,8 +2753,10 @@
@@ -2581,8 +2755,10 @@
GLuint name;
};
@ -2156,7 +2158,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
struct wined3d_vertex_declaration_element
{
const struct wined3d_format *format;
@@ -2610,8 +2785,10 @@
@@ -2611,8 +2787,10 @@
BOOL half_float_conv_needed;
};
@ -2167,7 +2169,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
struct wined3d_saved_states
{
DWORD transform[(HIGHEST_TRANSFORMSTATE >> 5) + 1];
@@ -2679,6 +2856,7 @@
@@ -2680,6 +2858,7 @@
void stateblock_init_contained_states(struct wined3d_stateblock *stateblock) DECLSPEC_HIDDEN;
void state_cleanup(struct wined3d_state *state) DECLSPEC_HIDDEN;
@ -2175,7 +2177,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
HRESULT state_init(struct wined3d_state *state, const struct wined3d_gl_info *gl_info,
const struct wined3d_d3d_info *d3d_info, DWORD flags) DECLSPEC_HIDDEN;
void state_unbind_resources(struct wined3d_state *state) DECLSPEC_HIDDEN;
@@ -2729,6 +2907,32 @@
@@ -2730,6 +2909,32 @@
void wined3d_cs_destroy(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
void wined3d_cs_switch_onscreen_ds(struct wined3d_cs *cs, struct wined3d_context *context,
struct wined3d_surface *depth_stencil) DECLSPEC_HIDDEN;
@ -2208,7 +2210,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *rects,
DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil) DECLSPEC_HIDDEN;
@@ -2778,6 +2982,7 @@
@@ -2779,6 +2984,7 @@
void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs,
struct wined3d_vertex_declaration *declaration) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_viewport *viewport) DECLSPEC_HIDDEN;
@ -2216,7 +2218,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, UINT start_register, const float *constants,
UINT vector4f_count, enum wined3d_shader_type type) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, UINT start_register,
@@ -2841,6 +3046,7 @@
@@ -2842,6 +3048,7 @@
void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_resource *resource,
unsigned int sub_resource_idx, const struct wined3d_box *box, const void *data, unsigned int row_pitch,
unsigned int depth_pitch) DECLSPEC_HIDDEN;
@ -2224,7 +2226,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
/* 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
@@ -2855,8 +3061,12 @@
@@ -2856,8 +3063,12 @@
struct wined3d_query_ops
{
HRESULT (*query_get_data)(struct wined3d_query *query, void *data, DWORD data_size, DWORD flags);
@ -2237,7 +2239,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
};
struct wined3d_query
@@ -2870,12 +3080,16 @@
@@ -2871,12 +3082,16 @@
enum wined3d_query_type type;
DWORD data_size;
void *extendedData;
@ -2254,7 +2256,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
* fixed function semantics as D3DCOLOR or FLOAT16 */
@@ -2902,7 +3116,9 @@
@@ -2903,7 +3118,9 @@
GLenum buffer_object_usage;
GLenum buffer_type_hint;
DWORD flags;
@ -2264,7 +2266,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
void *map_ptr;
struct wined3d_map_range *maps;
@@ -2927,11 +3143,15 @@
@@ -2928,11 +3145,15 @@
BYTE *buffer_get_sysmem(struct wined3d_buffer *This, struct wined3d_context *context) DECLSPEC_HIDDEN;
void buffer_internal_preload(struct wined3d_buffer *buffer, struct wined3d_context *context,
const struct wined3d_state *state) DECLSPEC_HIDDEN;
@ -2280,7 +2282,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
struct wined3d_rendertarget_view
{
@@ -2970,8 +3190,10 @@
@@ -2971,8 +3192,10 @@
return surface_from_resource(resource);
}
@ -2291,7 +2293,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
struct wined3d_shader_resource_view
{
LONG refcount;
@@ -2984,8 +3206,12 @@
@@ -2985,8 +3208,12 @@
struct wined3d_swapchain_ops
{
void (*swapchain_present)(struct wined3d_swapchain *swapchain, const RECT *src_rect,
@ -2304,7 +2306,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
};
struct wined3d_swapchain
@@ -3024,8 +3250,10 @@
@@ -3025,8 +3252,10 @@
void swapchain_destroy_contexts(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
HDC swapchain_get_backup_dc(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
void swapchain_update_draw_bindings(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
@ -2315,7 +2317,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
/*****************************************************************************
* Utility function prototypes
@@ -3229,7 +3457,9 @@
@@ -3230,7 +3459,9 @@
void shader_generate_main(const struct wined3d_shader *shader, struct wined3d_string_buffer *buffer,
const struct wined3d_shader_reg_maps *reg_maps, const DWORD *byte_code, void *backend_ctx) DECLSPEC_HIDDEN;
BOOL shader_match_semantic(const char *semantic_name, enum wined3d_decl_usage usage) DECLSPEC_HIDDEN;
@ -7704,7 +7706,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if (!(row = HeapAlloc(GetProcessHeap(), 0, pitch)))
goto error;
@@ -2897,8 +3627,13 @@
@@ -2907,8 +3637,13 @@
/* The texture is now most up to date - If the surface is a render target
* and has a drawable, this path is never entered. */
@ -7718,7 +7720,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
/* Uses the hardware to stretch and flip the image */
@@ -2966,7 +3701,11 @@
@@ -2976,7 +3711,11 @@
checkGLcall("glEnable(texture_target)");
/* For now invalidate the texture copy of the back buffer. Drawable and sysmem copy are untouched */
@ -7730,7 +7732,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
/* Make sure that the top pixel is always above the bottom pixel, and keep a separate upside down flag
@@ -3163,6 +3902,7 @@
@@ -3173,6 +3912,7 @@
checkGLcall("glDeleteTextures(1, &backup)");
}
@ -7738,7 +7740,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if (wined3d_settings.cs_multithreaded)
gl_info->gl_ops.gl.p_glFinish();
else if (wined3d_settings.strict_draw_ordering)
@@ -3174,6 +3914,17 @@
@@ -3184,6 +3924,17 @@
* and has a drawable, this path is never entered. */
wined3d_resource_validate_location(&dst_surface->resource, WINED3D_LOCATION_TEXTURE_RGB);
wined3d_resource_invalidate_location(&dst_surface->resource, ~WINED3D_LOCATION_TEXTURE_RGB);
@ -7756,7 +7758,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
/* Front buffer coordinates are always full screen coordinates, but our GL
@@ -3228,9 +3979,15 @@
@@ -3238,9 +3989,15 @@
gl_info = context->gl_info;
@ -7772,7 +7774,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
wined3d_texture_load(src_surface->container, context, FALSE);
/* Activate the destination context, set it up for blitting */
@@ -3273,9 +4030,13 @@
@@ -3283,9 +4040,13 @@
/* Leave the opengl state valid for blitting */
device->blitter->unset_shader(context->gl_info);
@ -7786,7 +7788,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|| (dst_surface->container->swapchain
&& dst_surface->container->swapchain->front_buffer == dst_surface->container))
gl_info->gl_ops.gl.p_glFlush(); /* Flush to ensure ordering across contexts. */
@@ -3305,8 +4066,13 @@
@@ -3315,8 +4076,13 @@
enum wined3d_texture_filter_type filter)
{
struct wined3d_device *device = dst_surface->resource.device;
@ -7800,7 +7802,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
TRACE("dst_surface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#x, blt_fx %p, filter %s.\n",
dst_surface, wine_dbgstr_rect(dst_rect), src_surface, wine_dbgstr_rect(src_rect),
@@ -3497,6 +4263,7 @@
@@ -3507,6 +4273,7 @@
{
TRACE("surface %p, new location %#x, w %u, h %u.\n", surface, location, w, h);
@ -7808,7 +7810,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if (((surface->resource.locations & WINED3D_LOCATION_TEXTURE_RGB) && !(location & WINED3D_LOCATION_TEXTURE_RGB))
|| (!(surface->resource.locations & WINED3D_LOCATION_TEXTURE_RGB)
&& (location & WINED3D_LOCATION_TEXTURE_RGB)))
@@ -3505,6 +4272,15 @@
@@ -3515,6 +4282,15 @@
surface->ds_current_size.cx = w;
surface->ds_current_size.cy = h;
surface->resource.locations = location;
@ -7824,7 +7826,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
/* Context activation is done by the caller. */
@@ -3519,7 +4295,11 @@
@@ -3529,7 +4305,11 @@
/* TODO: Make this work for modes other than FBO */
if (wined3d_settings.offscreen_rendering_mode != ORM_FBO) return;
@ -7836,7 +7838,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
{
w = surface->ds_current_size.cx;
h = surface->ds_current_size.cy;
@@ -3545,7 +4325,11 @@
@@ -3555,7 +4335,11 @@
return;
}
@ -7848,7 +7850,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
{
TRACE("Surface was discarded, no need copy data.\n");
switch (location)
@@ -3565,6 +4349,7 @@
@@ -3575,6 +4359,7 @@
default:
FIXME("Unhandled location %#x\n", location);
}
@ -7856,7 +7858,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
surface->resource.locations &= ~WINED3D_LOCATION_DISCARDED;
surface->resource.locations |= location;
surface->ds_current_size.cx = surface->resource.width;
@@ -3576,6 +4361,19 @@
@@ -3586,6 +4371,19 @@
{
FIXME("No up to date depth stencil location.\n");
surface->resource.locations |= location;
@ -7876,7 +7878,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
surface->ds_current_size.cx = surface->resource.width;
surface->ds_current_size.cy = surface->resource.height;
return;
@@ -3640,9 +4438,13 @@
@@ -3650,9 +4448,13 @@
context_invalidate_state(context, STATE_FRAMEBUFFER);
@ -7890,7 +7892,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
gl_info->gl_ops.gl.p_glFlush(); /* Flush to ensure ordering across contexts. */
}
else if (location == WINED3D_LOCATION_DRAWABLE)
@@ -3658,9 +4460,13 @@
@@ -3668,9 +4470,13 @@
context_invalidate_state(context, STATE_FRAMEBUFFER);
@ -7904,7 +7906,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
gl_info->gl_ops.gl.p_glFlush(); /* Flush to ensure ordering across contexts. */
}
else
@@ -3668,6 +4474,7 @@
@@ -3678,6 +4484,7 @@
ERR("Invalid location (%#x) specified.\n", location);
}
@ -7912,7 +7914,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
surface->resource.locations |= location;
surface->ds_current_size.cx = surface->resource.width;
surface->ds_current_size.cy = surface->resource.height;
@@ -3700,6 +4507,124 @@
@@ -3710,6 +4517,124 @@
FIXME("Can't load surface %p with location flags %s into sysmem.\n",
surface, wined3d_debug_location(surface->resource.locations));
@ -8037,7 +8039,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
/* Context activation is done by the caller. */
@@ -3708,12 +4633,14 @@
@@ -3718,12 +4643,14 @@
{
RECT r;
@ -8052,7 +8054,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if (wined3d_settings.offscreen_rendering_mode == ORM_FBO
&& wined3d_resource_is_offscreen(&surface->container->resource))
{
@@ -3722,7 +4649,11 @@
@@ -3732,7 +4659,11 @@
}
surface_get_rect(surface, NULL, &r);
@ -8064,7 +8066,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
surface_blt_to_drawable(surface->resource.device, context,
WINED3D_TEXF_POINT, FALSE, surface, &r, surface, &r);
@@ -3737,6 +4668,7 @@
@@ -3747,6 +4678,7 @@
struct wined3d_device *device = surface->resource.device;
const struct wined3d_color_key_conversion *conversion;
struct wined3d_texture *texture = surface->container;
@ -8072,7 +8074,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
UINT width, src_row_pitch, src_slice_pitch, dst_pitch;
struct wined3d_bo_address data;
struct wined3d_format format;
@@ -3763,6 +4695,24 @@
@@ -3773,6 +4705,24 @@
}
if (surface->resource.locations & (WINED3D_LOCATION_TEXTURE_SRGB | WINED3D_LOCATION_TEXTURE_RGB)
@ -8087,7 +8089,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
+ && wined3d_resource_is_offscreen(&texture->resource)
+ && (surface->locations & WINED3D_LOCATION_DRAWABLE))
+ {
+ surface_load_fb_texture(surface, srgb);
+ surface_load_fb_texture(surface, srgb, context);
+
+ return WINED3D_OK;
+ }
@ -8097,7 +8099,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
&& (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,
@@ -3778,6 +4728,7 @@
@@ -3788,6 +4738,7 @@
return WINED3D_OK;
}
@ -8105,7 +8107,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if (surface->resource.locations & (WINED3D_LOCATION_RB_MULTISAMPLE | WINED3D_LOCATION_RB_RESOLVED)
&& (!srgb || (surface->container->resource.format_flags & WINED3DFMT_FLAG_FBO_ATTACHABLE_SRGB))
&& fbo_blit_supported(gl_info, WINED3D_BLIT_OP_COLOR_BLIT,
@@ -3785,6 +4736,15 @@
@@ -3795,6 +4746,15 @@
NULL, surface->resource.usage, surface->resource.pool, surface->resource.format))
{
DWORD src_location = surface->resource.locations & WINED3D_LOCATION_RB_RESOLVED ?
@ -8121,7 +8123,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
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};
@@ -3799,6 +4759,7 @@
@@ -3809,6 +4769,7 @@
if (srgb)
{
@ -8129,7 +8131,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if ((surface->resource.locations & (WINED3D_LOCATION_TEXTURE_RGB | surface->resource.map_binding))
== WINED3D_LOCATION_TEXTURE_RGB)
{
@@ -3833,6 +4794,42 @@
@@ -3843,6 +4804,42 @@
width = surface->resource.width;
wined3d_resource_get_pitch(&surface->resource, &src_row_pitch, &src_slice_pitch);
@ -8172,7 +8174,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
format = *texture->resource.format;
if ((conversion = wined3d_format_get_color_key_conversion(texture, TRUE)))
@@ -3841,7 +4838,11 @@
@@ -3851,7 +4848,11 @@
/* 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. */
@ -8184,7 +8186,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
{
TRACE("Removing the pbo attached to surface %p.\n", surface);
@@ -3850,6 +4851,7 @@
@@ -3860,6 +4861,7 @@
else
surface->resource.map_binding = WINED3D_LOCATION_SYSMEM;
@ -8192,7 +8194,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
wined3d_resource_prepare_map_memory(&surface->resource, context);
wined3d_resource_load_location(&surface->resource, context, surface->resource.map_binding);
wined3d_resource_free_bo(&surface->resource);
@@ -3857,6 +4859,14 @@
@@ -3867,6 +4869,14 @@
}
wined3d_resource_get_memory(&surface->resource, surface->resource.locations, &data);
@ -8207,7 +8209,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if (format.convert)
{
/* This code is entered for texture formats which need a fixup. */
@@ -3871,9 +4881,15 @@
@@ -3881,9 +4891,15 @@
context_release(context);
return E_OUTOFMEMORY;
}
@ -8223,7 +8225,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
data.addr = mem;
}
else if (conversion)
@@ -3893,6 +4909,7 @@
@@ -3903,6 +4919,7 @@
}
if (texture->swapchain && texture->swapchain->palette)
palette = texture->swapchain->palette;
@ -8231,7 +8233,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
conversion->convert(data.addr, src_row_pitch, mem, dst_pitch,
width, height, palette, &texture->async.gl_color_key);
src_row_pitch = dst_pitch;
@@ -3901,9 +4918,19 @@
@@ -3911,9 +4928,19 @@
wined3d_surface_upload_data(surface, gl_info, &format, &src_rect,
src_row_pitch, &dst_point, srgb, wined3d_const_bo_address(&data));
@ -8253,7 +8255,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
return WINED3D_OK;
}
@@ -3912,7 +4939,11 @@
@@ -3922,7 +4949,11 @@
{
RECT rect = {0, 0, surface->resource.width, surface->resource.height};
@ -8265,7 +8267,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
ERR("Trying to resolve multisampled surface %p, but location WINED3D_LOCATION_RB_MULTISAMPLE not current.\n",
surface);
@@ -3920,6 +4951,7 @@
@@ -3930,6 +4961,7 @@
surface, WINED3D_LOCATION_RB_MULTISAMPLE, &rect, surface, WINED3D_LOCATION_RB_RESOLVED, &rect);
}
@ -8273,7 +8275,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
/* Context activation is done by the caller. */
static void wined3d_surface_load_location(struct wined3d_resource *resource,
struct wined3d_context *context, DWORD location)
@@ -3956,6 +4988,59 @@
@@ -3966,6 +4998,59 @@
ERR("Surface %p does not have any up to date location.\n", surface);
surface->flags |= SFLAG_LOST;
return;
@ -8333,7 +8335,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
switch (location)
@@ -3964,6 +5049,7 @@
@@ -3974,6 +5059,7 @@
case WINED3D_LOCATION_USER_MEMORY:
case WINED3D_LOCATION_SYSMEM:
case WINED3D_LOCATION_BUFFER:
@ -8341,7 +8343,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
surface_load_sysmem(surface, context, location);
break;
@@ -3981,6 +5067,36 @@
@@ -3991,6 +5077,36 @@
if (FAILED(hr = surface_load_texture(surface, context,
location == WINED3D_LOCATION_TEXTURE_SRGB)))
return;
@ -8378,7 +8380,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
break;
default:
@@ -3988,12 +5104,21 @@
@@ -3998,12 +5114,21 @@
break;
}
@ -8400,7 +8402,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
static HRESULT ffp_blit_alloc(struct wined3d_device *device) { return WINED3D_OK; }
@@ -4101,6 +5226,7 @@
@@ -4111,6 +5236,7 @@
const RECT *dst_rect, const struct wined3d_color *color)
{
const RECT draw_rect = {0, 0, dst_surface->resource.width, dst_surface->resource.height};
@ -8408,7 +8410,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
struct wined3d_rendertarget_view view, *view_ptr = &view;
struct wined3d_fb_state fb = {&view_ptr, NULL, 1};
struct wined3d_texture *texture = dst_surface->container;
@@ -4121,6 +5247,21 @@
@@ -4131,6 +5257,21 @@
view.sub_resource_idx = dst_surface->texture_layer * texture->level_count + dst_surface->texture_level;
device_clear_render_targets(device, 1, &fb, 1, dst_rect, &draw_rect, WINED3DCLEAR_TARGET, color, 0.0f, 0);
@ -8430,7 +8432,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
return WINED3D_OK;
}
@@ -4129,6 +5270,7 @@
@@ -4139,6 +5280,7 @@
const RECT *dst_rect, float depth)
{
const RECT draw_rect = {0, 0, dst_surface->resource.width, dst_surface->resource.height};
@ -8438,7 +8440,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
struct wined3d_rendertarget_view view;
struct wined3d_fb_state fb = {NULL, &view};
struct wined3d_texture *texture = dst_surface->container;
@@ -4144,6 +5286,20 @@
@@ -4154,6 +5296,20 @@
view.sub_resource_idx = dst_surface->texture_layer * texture->level_count + dst_surface->texture_level;
device_clear_render_targets(device, 0, &fb, 1, dst_rect, &draw_rect, WINED3DCLEAR_ZBUFFER, 0, depth, 0);
@ -8459,7 +8461,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
return WINED3D_OK;
}
@@ -4172,8 +5328,13 @@
@@ -4182,8 +5338,13 @@
wined3d_texture_set_color_key(src_surface->container, WINED3D_CKEY_SRC_BLT,
(old_color_key_flags & WINED3D_CKEY_SRC_BLT) ? &old_blt_key : NULL);
@ -8473,7 +8475,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
const struct blit_shader ffp_blit = {
@@ -4329,6 +5490,7 @@
@@ -4339,6 +5500,7 @@
struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags,
const WINEDDBLTFX *fx, enum wined3d_texture_filter_type filter)
{
@ -8481,7 +8483,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
int bpp, srcheight, srcwidth, dstheight, dstwidth, width;
const struct wined3d_format *src_format, *dst_format;
unsigned int src_fmt_flags, dst_fmt_flags;
@@ -4363,6 +5525,28 @@
@@ -4373,6 +5535,28 @@
wined3d_resource_get_pitch(&dst_surface->resource, &dst_row_pitch, &dst_slice_pitch);
src_data = dst_data;
src_row_pitch = dst_row_pitch;
@ -8510,7 +8512,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
src_format = dst_surface->resource.format;
dst_format = src_format;
dst_fmt_flags = dst_surface->container->resource.format_flags;
@@ -4374,12 +5558,14 @@
@@ -4384,12 +5568,14 @@
dst_fmt_flags = dst_surface->container->resource.format_flags;
if (src_surface)
{
@ -8525,7 +8527,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if (dst_surface->resource.format->id != src_surface->resource.format->id)
{
if (!(src_texture = surface_convert_format(src_surface, dst_format->id)))
@@ -4390,9 +5576,13 @@
@@ -4400,9 +5586,13 @@
}
src_surface = surface_from_resource(wined3d_texture_get_sub_resource(src_texture, 0));
}
@ -8539,7 +8541,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
src_format = src_surface->resource.format;
src_fmt_flags = src_surface->container->resource.format_flags;
}
@@ -4402,8 +5592,12 @@
@@ -4412,8 +5602,12 @@
src_fmt_flags = dst_fmt_flags;
}
@ -8552,7 +8554,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
bpp = dst_surface->resource.format->byte_count;
@@ -4414,12 +5608,24 @@
@@ -4424,12 +5618,24 @@
width = (dst_rect->right - dst_rect->left) * bpp;
if (src_surface)
@ -8577,7 +8579,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if (src_fmt_flags & dst_fmt_flags & WINED3DFMT_FLAG_BLOCKS)
{
@@ -4454,7 +5660,11 @@
@@ -4464,7 +5670,11 @@
}
hr = surface_cpu_blt_compressed(sbase, dbuf,
@ -8589,7 +8591,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
src_format, flags, fx);
goto release;
}
@@ -4462,7 +5672,11 @@
@@ -4472,7 +5682,11 @@
/* First, all the 'source-less' blits */
if (flags & WINEDDBLT_COLORFILL)
{
@ -8601,7 +8603,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
flags &= ~WINEDDBLT_COLORFILL;
}
@@ -4511,6 +5725,7 @@
@@ -4521,6 +5735,7 @@
for (y = 0; y < dstheight; ++y)
{
memcpy(dbuf, sbuf, width);
@ -8609,7 +8611,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
sbuf += src_row_pitch;
dbuf += dst_row_pitch;
}
@@ -4524,6 +5739,21 @@
@@ -4534,6 +5749,21 @@
{
sbuf -= src_row_pitch;
dbuf -= dst_row_pitch;
@ -8631,7 +8633,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
memcpy(dbuf, sbuf, width);
}
}
@@ -4533,8 +5763,13 @@
@@ -4543,8 +5773,13 @@
for (y = 0; y < dstheight; ++y)
{
memmove(dbuf, sbuf, width);
@ -8645,7 +8647,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
}
}
@@ -4543,9 +5778,15 @@
@@ -4553,9 +5788,15 @@
/* Stretching in y direction only. */
for (y = sy = 0; y < dstheight; ++y, sy += yinc)
{
@ -8661,7 +8663,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
}
}
@@ -4555,6 +5796,7 @@
@@ -4565,6 +5806,7 @@
int last_sy = -1;
for (y = sy = 0; y < dstheight; ++y, sy += yinc)
{
@ -8669,7 +8671,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
sbuf = sbase + (sy >> 16) * src_row_pitch;
if ((sy >> 16) == (last_sy >> 16))
@@ -4562,6 +5804,15 @@
@@ -4572,6 +5814,15 @@
/* This source row is the same as last source row -
* Copy the already stretched row. */
memcpy(dbuf, dbuf - dst_row_pitch, width);
@ -8685,7 +8687,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
else
{
@@ -4608,6 +5859,7 @@
@@ -4618,6 +5869,7 @@
}
#undef STRETCH_ROW
}
@ -8693,7 +8695,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
dbuf += dst_row_pitch;
last_sy = sy;
}
@@ -4616,6 +5868,16 @@
@@ -4626,6 +5878,16 @@
else
{
LONG dstyinc = dst_row_pitch, dstxinc = bpp;
@ -8710,7 +8712,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
DWORD keylow = 0xffffffff, keyhigh = 0, keymask = 0xffffffff;
DWORD destkeylow = 0x0, destkeyhigh = 0xffffffff, destkeymask = 0xffffffff;
if (flags & (WINEDDBLT_KEYSRC | WINEDDBLT_KEYDEST | WINEDDBLT_KEYSRCOVERRIDE | WINEDDBLT_KEYDESTOVERRIDE))
@@ -4665,7 +5927,11 @@
@@ -4675,7 +5937,11 @@
LONG tmpxy;
dTopLeft = dbuf;
dTopRight = dbuf + ((dstwidth - 1) * bpp);
@ -8722,7 +8724,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
dBottomRight = dBottomLeft + ((dstwidth - 1) * bpp);
if (fx->dwDDFX & WINEDDBLTFX_ARITHSTRETCHY)
@@ -4742,6 +6008,7 @@
@@ -4752,6 +6018,7 @@
flags &= ~(WINEDDBLT_DDFX);
}
@ -8730,7 +8732,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
#define COPY_COLORKEY_FX(type) \
do { \
const type *s; \
@@ -4763,6 +6030,29 @@
@@ -4773,6 +6040,29 @@
d = (type *)(((BYTE *)d) + dstyinc); \
} \
} while(0)
@ -8760,7 +8762,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
switch (bpp)
{
@@ -4781,7 +6071,11 @@
@@ -4791,7 +6081,11 @@
BYTE *d = dbuf, *dx;
for (y = sy = 0; y < dstheight; ++y, sy += yinc)
{
@ -8772,7 +8774,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
dx = d;
for (x = sx = 0; x < dstwidth; ++x, sx+= xinc)
{
@@ -4812,10 +6106,12 @@
@@ -4822,10 +6116,12 @@
}
}
@ -8785,7 +8787,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
error:
if (flags && FIXME_ON(d3d_surface))
{
@@ -4823,6 +6119,7 @@
@@ -4833,6 +6129,7 @@
}
release:
@ -8793,7 +8795,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if (dst_data)
{
wined3d_resource_release_map_ptr(&dst_surface->resource, context);
@@ -4841,6 +6138,14 @@
@@ -4851,6 +6148,14 @@
wined3d_texture_decref(src_texture);
if (context)
context_release(context);
@ -8808,7 +8810,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
return hr;
}
@@ -4885,6 +6190,7 @@
@@ -4895,6 +6200,7 @@
cpu_blit_blit_surface,
};
@ -8816,7 +8818,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
void surface_blt_ugly(struct wined3d_surface *dst_surface, const RECT *dst_rect,
struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags,
const WINEDDBLTFX *fx, enum wined3d_texture_filter_type filter)
@@ -4892,6 +6198,16 @@
@@ -4902,6 +6208,16 @@
struct wined3d_swapchain *src_swapchain, *dst_swapchain;
struct wined3d_device *device = dst_surface->resource.device;
DWORD src_ds_flags, dst_ds_flags;
@ -8833,7 +8835,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
BOOL scale, convert;
static const DWORD simple_blit = WINEDDBLT_ASYNC
@@ -4902,6 +6218,106 @@
@@ -4912,6 +6228,106 @@
| WINEDDBLT_DEPTHFILL
| WINEDDBLT_DONOTWAIT;
@ -8940,7 +8942,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if (!device->d3d_initialized)
{
WARN("D3D not initialized, using fallback.\n");
@@ -4944,8 +6360,13 @@
@@ -4954,8 +6370,13 @@
}
scale = src_surface
@ -8954,7 +8956,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
convert = src_surface && src_surface->resource.format->id != dst_surface->resource.format->id;
dst_ds_flags = dst_surface->container->resource.format_flags
@@ -4965,6 +6386,7 @@
@@ -4975,6 +6396,7 @@
TRACE("Depth fill.\n");
if (!surface_convert_depth_to_float(dst_surface, fx->u5.dwFillDepth, &depth))
@ -8962,7 +8964,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
return;
if (SUCCEEDED(wined3d_surface_depth_fill(dst_surface, dst_rect, depth)))
@@ -4975,6 +6397,24 @@
@@ -4985,6 +6407,24 @@
if (SUCCEEDED(wined3d_surface_depth_blt(src_surface, src_surface->container->resource.draw_binding,
src_rect, dst_surface, dst_surface->container->resource.draw_binding, dst_rect)))
return;
@ -8987,7 +8989,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
}
else
@@ -4983,8 +6423,13 @@
@@ -4993,8 +6433,13 @@
/* In principle this would apply to depth blits as well, but we don't
* implement those in the CPU blitter at the moment. */
@ -9001,7 +9003,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
{
if (scale)
TRACE("Not doing sysmem blit because of scaling.\n");
@@ -5005,8 +6450,13 @@
@@ -5015,8 +6460,13 @@
palette, fx->u5.dwFillColor, &color))
goto fallback;
@ -9015,7 +9017,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
else
{
@@ -5024,8 +6474,13 @@
@@ -5034,8 +6484,13 @@
color_key = &src_surface->container->async.src_blt_color_key;
blit_op = WINED3D_BLIT_OP_COLOR_BLIT_CKEY;
}
@ -9029,7 +9031,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
{
/* Upload */
if (scale)
@@ -5034,6 +6489,7 @@
@@ -5044,6 +6499,7 @@
TRACE("Not doing upload because of format conversion.\n");
else
{
@ -9037,7 +9039,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
POINT dst_point = {dst_rect->left, dst_rect->top};
if (SUCCEEDED(surface_upload_from_surface(dst_surface, &dst_point, src_surface, src_rect)))
@@ -5046,6 +6502,15 @@
@@ -5056,6 +6512,15 @@
context_release(context);
}
return;
@ -9053,7 +9055,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
}
}
@@ -5069,6 +6534,7 @@
@@ -5079,6 +6544,7 @@
wined3d_swapchain_present(dst_swapchain, NULL, NULL, dst_swapchain->win_handle, NULL, 0);
dst_swapchain->desc.swap_effect = swap_effect;
@ -9061,7 +9063,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
return;
}
@@ -5274,6 +6740,53 @@
@@ -5284,6 +6750,53 @@
wined3d_surface_location_invalidated,
wined3d_surface_load_location,
};
@ -9115,7 +9117,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_texture *container,
const struct wined3d_resource_desc *desc, GLenum target, unsigned int level, unsigned int layer, DWORD flags)
@@ -5335,7 +6848,11 @@
@@ -5345,7 +6858,11 @@
}
surface->container = container;
@ -9127,7 +9129,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
list_init(&surface->renderbuffers);
list_init(&surface->overlays);
@@ -5367,9 +6884,14 @@
@@ -5377,9 +6894,14 @@
if (surface->resource.map_binding == WINED3D_LOCATION_DIB)
{
wined3d_resource_free_sysmem(&surface->resource);
@ -9142,7 +9144,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
return hr;
@@ -5396,7 +6918,11 @@
@@ -5406,7 +6928,11 @@
if (FAILED(hr = surface_init(object, container, desc, target, level, layer, flags)))
{
WARN("Failed to initialize surface, returning %#x.\n", hr);