wined3d-CSMT_Main: Rebase against upstream changes.

This commit is contained in:
Sebastian Lackner 2015-04-15 20:08:28 +02:00
parent 04e3ce9865
commit 5b313a54e2
8 changed files with 435 additions and 433 deletions

View File

@ -1,4 +1,4 @@
From 9d762900cb2a33e8dc4ee3c174533bfaa7687a47 Mon Sep 17 00:00:00 2001
From f322a8e12cfa32650bcbb970f41a84c2430ac00e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Sun, 17 Nov 2013 19:34:26 +0100
Subject: wined3d: Pass a context to surface_load_drawable and
@ -9,7 +9,7 @@ Subject: wined3d: Pass a context to surface_load_drawable and
1 file changed, 34 insertions(+), 6 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index ac7df27..e05a402 100644
index 4e2063f..1f97857 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -3533,19 +3533,35 @@ void surface_translate_drawable_coords(const struct wined3d_surface *surface, HW
@ -63,28 +63,7 @@ index ac7df27..e05a402 100644
}
HRESULT surface_color_fill(struct wined3d_surface *s, const RECT *rect, const struct wined3d_color *color)
@@ -3750,6 +3771,7 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE
/* Blit from offscreen surface to render target */
struct wined3d_color_key old_blt_key = src_surface->container->async.src_blt_color_key;
DWORD old_color_key_flags = src_surface->container->async.color_key_flags;
+ struct wined3d_context *context;
TRACE("Blt from surface %p to rendertarget %p\n", src_surface, dst_surface);
@@ -3783,9 +3805,11 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE
wined3d_texture_set_color_key(src_surface->container, WINED3D_CKEY_SRC_BLT, NULL);
}
- surface_blt_to_drawable(device, filter,
+ context = context_acquire(device, dst_surface);
+ surface_blt_to_drawable(device, context, filter,
flags & (WINEDDBLT_KEYSRC | WINEDDBLT_KEYSRCOVERRIDE | WINEDDBLT_ALPHATEST),
src_surface, src_rect, dst_surface, dst_rect);
+ context_release(context);
/* Restore the color key parameters */
wined3d_texture_set_color_key(src_surface->container, WINED3D_CKEY_SRC_BLT,
@@ -4148,8 +4172,9 @@ static void surface_load_sysmem(struct wined3d_surface *surface,
@@ -4095,8 +4116,9 @@ static void surface_load_sysmem(struct wined3d_surface *surface,
surface, wined3d_debug_location(surface->locations));
}
@ -95,7 +74,7 @@ index ac7df27..e05a402 100644
{
RECT r;
@@ -4162,7 +4187,7 @@ static HRESULT surface_load_drawable(struct wined3d_surface *surface,
@@ -4109,7 +4131,7 @@ static HRESULT surface_load_drawable(struct wined3d_surface *surface,
surface_get_rect(surface, NULL, &r);
surface_load_location(surface, WINED3D_LOCATION_TEXTURE_RGB);
@ -104,7 +83,7 @@ index ac7df27..e05a402 100644
WINED3D_TEXF_POINT, FALSE, surface, &r, surface, &r);
return WINED3D_OK;
@@ -4420,7 +4445,10 @@ HRESULT surface_load_location(struct wined3d_surface *surface, DWORD location)
@@ -4367,7 +4389,10 @@ HRESULT surface_load_location(struct wined3d_surface *surface, DWORD location)
break;
case WINED3D_LOCATION_DRAWABLE:
@ -116,6 +95,24 @@ index ac7df27..e05a402 100644
return hr;
break;
@@ -4546,13 +4571,16 @@ static void ffp_blit_blit_surface(struct wined3d_device *device, DWORD filter,
/* Blit from offscreen surface to render target */
struct wined3d_color_key old_blt_key = src_surface->container->async.src_blt_color_key;
DWORD old_color_key_flags = src_surface->container->async.color_key_flags;
+ struct wined3d_context *context;
TRACE("Blt from surface %p to rendertarget %p\n", src_surface, dst_surface);
wined3d_texture_set_color_key(src_surface->container, WINED3D_CKEY_SRC_BLT, color_key);
- surface_blt_to_drawable(device, filter,
+ context = context_acquire(device, dst_surface);
+ surface_blt_to_drawable(device, context, filter,
!!color_key, src_surface, src_rect, dst_surface, dst_rect);
+ context_release(context);
/* Restore the color key parameters */
wined3d_texture_set_color_key(src_surface->container, WINED3D_CKEY_SRC_BLT,
--
2.3.5

View File

@ -1,4 +1,4 @@
From 543d8046143866823083e3b466d8ba04fb3c45c1 Mon Sep 17 00:00:00 2001
From 16f91ae3a1a07a83237878f93bef07f5ff296f60 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.
@ -13,10 +13,10 @@ Subject: wined3d: Move surface locations into the resource.
6 files changed, 56 insertions(+), 56 deletions(-)
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
index fca2d32..4b24e3d 100644
index 797c204..2ad6917 100644
--- a/dlls/wined3d/arb_program_shader.c
+++ b/dlls/wined3d/arb_program_shader.c
@@ -7807,7 +7807,7 @@ HRESULT arbfp_blit_surface(struct wined3d_device *device, DWORD filter,
@@ -7884,7 +7884,7 @@ static void arbfp_blit_surface(struct wined3d_device *device, DWORD filter,
/* Now load the surface */
if (wined3d_settings.offscreen_rendering_mode != ORM_FBO
@ -26,7 +26,7 @@ index fca2d32..4b24e3d 100644
&& !wined3d_resource_is_offscreen(&src_surface->container->resource))
{
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 68864ba..db6eb59 100644
index 485e4f4..e84405e 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
@ -61,7 +61,7 @@ index 913ada5..567550e 100644
else
SetRectEmpty(&current_rect);
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 16bbb06..de3347d 100644
index 0f38da9..8b2fb74 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -555,7 +555,7 @@ static void surface_prepare_system_memory(struct wined3d_surface *surface)
@ -140,7 +140,7 @@ index 16bbb06..de3347d 100644
}
/* Make sure that the top pixel is always above the bottom pixel, and keep a separate upside down flag
@@ -3945,13 +3945,14 @@ void surface_modify_ds_location(struct wined3d_surface *surface,
@@ -3889,13 +3889,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);
@ -158,7 +158,7 @@ index 16bbb06..de3347d 100644
}
/* Context activation is done by the caller. */
@@ -3966,7 +3967,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
@@ -3910,7 +3911,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;
@ -167,7 +167,7 @@ index 16bbb06..de3347d 100644
{
w = surface->ds_current_size.cx;
h = surface->ds_current_size.cy;
@@ -3992,7 +3993,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
@@ -3936,7 +3937,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
return;
}
@ -176,7 +176,7 @@ index 16bbb06..de3347d 100644
{
TRACE("Surface was discarded, no need copy data.\n");
switch (location)
@@ -4009,17 +4010,17 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
@@ -3953,17 +3954,17 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
default:
FIXME("Unhandled location %#x\n", location);
}
@ -198,7 +198,7 @@ index 16bbb06..de3347d 100644
surface->ds_current_size.cx = surface->resource.width;
surface->ds_current_size.cy = surface->resource.height;
return;
@@ -4108,7 +4109,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
@@ -4052,7 +4053,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
ERR("Invalid location (%#x) specified.\n", location);
}
@ -207,7 +207,7 @@ index 16bbb06..de3347d 100644
surface->ds_current_size.cx = surface->resource.width;
surface->ds_current_size.cy = surface->resource.height;
}
@@ -4117,7 +4118,7 @@ void surface_validate_location(struct wined3d_surface *surface, DWORD location)
@@ -4061,7 +4062,7 @@ void surface_validate_location(struct wined3d_surface *surface, DWORD location)
{
TRACE("surface %p, location %s.\n", surface, wined3d_debug_location(location));
@ -216,7 +216,7 @@ index 16bbb06..de3347d 100644
}
void surface_invalidate_location(struct wined3d_surface *surface, DWORD location)
@@ -4126,9 +4127,9 @@ void surface_invalidate_location(struct wined3d_surface *surface, DWORD location
@@ -4070,9 +4071,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);
@ -228,7 +228,7 @@ index 16bbb06..de3347d 100644
ERR("Surface %p does not have any up to date location.\n", surface);
}
@@ -4164,7 +4165,7 @@ static void surface_copy_simple_location(struct wined3d_surface *surface, DWORD
@@ -4108,7 +4109,7 @@ static void surface_copy_simple_location(struct wined3d_surface *surface, DWORD
UINT size = surface->resource.size;
surface_get_memory(surface, &dst, location);
@ -237,7 +237,7 @@ index 16bbb06..de3347d 100644
if (dst.buffer_object)
{
@@ -4197,33 +4198,33 @@ static void surface_load_sysmem(struct wined3d_surface *surface,
@@ -4141,33 +4142,33 @@ static void surface_load_sysmem(struct wined3d_surface *surface,
{
const struct wined3d_gl_info *gl_info = context->gl_info;
@ -277,7 +277,7 @@ index 16bbb06..de3347d 100644
}
/* Context activation is done by the caller. */
@@ -4263,14 +4264,14 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4207,14 +4208,14 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
if (wined3d_settings.offscreen_rendering_mode != ORM_FBO
&& wined3d_resource_is_offscreen(&texture->resource)
@ -294,7 +294,7 @@ index 16bbb06..de3347d 100644
&& (surface->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,
@@ -4286,13 +4287,13 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4230,13 +4231,13 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
return WINED3D_OK;
}
@ -310,7 +310,7 @@ index 16bbb06..de3347d 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};
@@ -4307,7 +4308,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4251,7 +4252,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
if (srgb)
{
@ -319,7 +319,7 @@ index 16bbb06..de3347d 100644
== WINED3D_LOCATION_TEXTURE_RGB)
{
/* Performance warning... */
@@ -4318,7 +4319,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4262,7 +4263,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
}
else
{
@ -328,7 +328,7 @@ index 16bbb06..de3347d 100644
== WINED3D_LOCATION_TEXTURE_SRGB)
{
/* Performance warning... */
@@ -4328,7 +4329,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4272,7 +4273,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
}
}
@ -337,7 +337,7 @@ index 16bbb06..de3347d 100644
{
WARN("Trying to load a texture from sysmem, but no simple location is valid.\n");
/* Lets hope we get it from somewhere... */
@@ -4363,7 +4364,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4307,7 +4308,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
surface_remove_pbo(surface, gl_info);
}
@ -346,7 +346,7 @@ index 16bbb06..de3347d 100644
if (format.convert)
{
/* This code is entered for texture formats which need a fixup. */
@@ -4419,7 +4420,7 @@ static void surface_multisample_resolve(struct wined3d_surface *surface, struct
@@ -4363,7 +4364,7 @@ static void surface_multisample_resolve(struct wined3d_surface *surface, struct
{
RECT rect = {0, 0, surface->resource.width, surface->resource.height};
@ -355,7 +355,7 @@ index 16bbb06..de3347d 100644
ERR("Trying to resolve multisampled surface %p, but location WINED3D_LOCATION_RB_MULTISAMPLE not current.\n",
surface);
@@ -4437,12 +4438,12 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
@@ -4381,12 +4382,12 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
if (surface->resource.usage & WINED3DUSAGE_DEPTHSTENCIL)
{
if (location == WINED3D_LOCATION_TEXTURE_RGB
@ -370,7 +370,7 @@ index 16bbb06..de3347d 100644
&& surface->container->resource.draw_binding != WINED3D_LOCATION_DRAWABLE)
{
/* Already up to date, nothing to do. */
@@ -4451,12 +4452,12 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
@@ -4395,12 +4396,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",
@ -385,7 +385,7 @@ index 16bbb06..de3347d 100644
{
TRACE("Location already up to date.\n");
return;
@@ -4470,7 +4471,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
@@ -4414,7 +4415,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
required_access, surface->resource.access_flags);
}
@ -394,7 +394,7 @@ index 16bbb06..de3347d 100644
{
ERR("Surface %p does not have any up to date location.\n", surface);
surface->flags |= SFLAG_LOST;
@@ -4509,7 +4510,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
@@ -4453,7 +4454,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
surface_validate_location(surface, location);
@ -403,8 +403,8 @@ index 16bbb06..de3347d 100644
surface_evict_sysmem(surface);
return;
@@ -5505,8 +5506,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
{
@@ -5497,8 +5498,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. */
- if ((dst_surface->locations & dst_surface->resource.map_binding)
@ -414,7 +414,7 @@ index 16bbb06..de3347d 100644
{
if (scale)
TRACE("Not doing sysmem blit because of scaling.\n");
@@ -5546,8 +5547,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
@@ -5538,8 +5539,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;
}
@ -441,10 +441,10 @@ index 4f4d4df..e702d61 100644
/* Both memory copies of the surfaces are ok, flip them around too instead of dirtifying
* Doesn't work with render_to_fbo because we're not flipping
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 3cb69ff..3cebde7 100644
index 8bb9f21..7b5a04f 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2339,7 +2339,6 @@ struct wined3d_surface
@@ -2340,7 +2340,6 @@ struct wined3d_surface
const struct wined3d_surface_ops *surface_ops;
struct wined3d_texture *container;
void *user_memory;

View File

@ -1,4 +1,4 @@
From 574b59a0f496d7aab025e1b3a1e241b20692d5e0 Mon Sep 17 00:00:00 2001
From bebac68a70a4be81237cd5ba392870eed6f5eccc 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.
@ -13,20 +13,20 @@ Subject: wined3d: Remove surface_validate_location.
6 files changed, 20 insertions(+), 30 deletions(-)
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
index b85f41e..93ecb99 100644
index 2ad6917..35637f2 100644
--- a/dlls/wined3d/arb_program_shader.c
+++ b/dlls/wined3d/arb_program_shader.c
@@ -7686,7 +7686,7 @@ HRESULT arbfp_blit_surface(struct wined3d_device *device, DWORD filter,
@@ -7921,7 +7921,7 @@ static void arbfp_blit_surface(struct wined3d_device *device, DWORD filter,
context_release(context);
- surface_validate_location(dst_surface, dst_surface->container->resource.draw_binding);
+ wined3d_resource_validate_location(&dst_surface->resource, dst_surface->container->resource.draw_binding);
surface_invalidate_location(dst_surface, ~dst_surface->container->resource.draw_binding);
}
return WINED3D_OK;
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 236e041..10f29d2 100644
index e84405e..95df08f 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -392,7 +392,7 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
@ -39,10 +39,10 @@ index 236e041..10f29d2 100644
}
}
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 6ad6ac7..3e10009 100644
index 8b2fb74..0599757 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -1223,7 +1223,7 @@ static void surface_unload(struct wined3d_resource *resource)
@@ -1167,7 +1167,7 @@ static void surface_unload(struct wined3d_resource *resource)
* and all flags get lost */
surface_prepare_system_memory(surface);
memset(surface->resource.heap_memory, 0, surface->resource.size);
@ -51,7 +51,7 @@ index 6ad6ac7..3e10009 100644
surface_invalidate_location(surface, ~WINED3D_LOCATION_SYSMEM);
/* We also get here when the ddraw swapchain is destroyed, for example
@@ -1735,7 +1735,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
@@ -1679,7 +1679,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
context_release(context);
@ -60,7 +60,7 @@ index 6ad6ac7..3e10009 100644
surface_invalidate_location(dst_surface, ~WINED3D_LOCATION_TEXTURE_RGB);
return WINED3D_OK;
@@ -2253,7 +2253,7 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
@@ -2178,7 +2178,7 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
valid_location = WINED3D_LOCATION_SYSMEM;
}
@ -69,7 +69,7 @@ index 6ad6ac7..3e10009 100644
return WINED3D_OK;
}
@@ -2798,7 +2798,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
@@ -2723,7 +2723,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
{
TRACE("WINED3D_MAP_DISCARD flag passed, marking %s as up to date.\n",
wined3d_debug_location(surface->resource.map_binding));
@ -78,7 +78,7 @@ index 6ad6ac7..3e10009 100644
}
else
{
@@ -3353,7 +3353,7 @@ static void fb_copy_to_texture_direct(struct wined3d_surface *dst_surface, struc
@@ -3282,7 +3282,7 @@ static void fb_copy_to_texture_direct(struct wined3d_surface *dst_surface, struc
/* The texture is now most up to date - If the surface is a render target
* and has a drawable, this path is never entered. */
@ -87,7 +87,7 @@ index 6ad6ac7..3e10009 100644
surface_invalidate_location(dst_surface, ~WINED3D_LOCATION_TEXTURE_RGB);
}
@@ -3626,7 +3626,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
@@ -3555,7 +3555,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
/* The texture is now most up to date - If the surface is a render target
* and has a drawable, this path is never entered. */
@ -96,16 +96,7 @@ index 6ad6ac7..3e10009 100644
surface_invalidate_location(dst_surface, ~WINED3D_LOCATION_TEXTURE_RGB);
}
@@ -3939,7 +3939,7 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE
wined3d_texture_set_color_key(src_surface->container, WINED3D_CKEY_SRC_BLT,
(old_color_key_flags & WINED3D_CKEY_SRC_BLT) ? &old_blt_key : NULL);
- surface_validate_location(dst_surface, dst_surface->container->resource.draw_binding);
+ wined3d_resource_validate_location(&dst_surface->resource, dst_surface->container->resource.draw_binding);
surface_invalidate_location(dst_surface, ~dst_surface->container->resource.draw_binding);
return WINED3D_OK;
@@ -4184,13 +4184,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
@@ -4058,13 +4058,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
surface->ds_current_size.cy = surface->resource.height;
}
@ -119,7 +110,7 @@ index 6ad6ac7..3e10009 100644
void surface_invalidate_location(struct wined3d_surface *surface, DWORD location)
{
TRACE("surface %p, location %s.\n", surface, wined3d_debug_location(location));
@@ -4586,7 +4579,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
@@ -4452,7 +4445,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
break;
}
@ -128,7 +119,16 @@ index 6ad6ac7..3e10009 100644
if (location != WINED3D_LOCATION_SYSMEM && (surface->resource.locations & WINED3D_LOCATION_SYSMEM))
surface_evict_sysmem(surface);
@@ -5681,7 +5674,7 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
@@ -4627,7 +4620,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);
- surface_validate_location(dst_surface, dst_surface->container->resource.draw_binding);
+ wined3d_resource_validate_location(&dst_surface->resource, dst_surface->container->resource.draw_binding);
surface_invalidate_location(dst_surface, ~dst_surface->container->resource.draw_binding);
}
@@ -5599,7 +5592,7 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
dst_surface, dst_surface->container->resource.draw_binding, &dst_rect);
context_release(context);
@ -137,7 +137,7 @@ index 6ad6ac7..3e10009 100644
surface_invalidate_location(dst_surface, ~dst_surface->container->resource.draw_binding);
return WINED3D_OK;
@@ -5778,7 +5771,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
@@ -5695,7 +5688,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
}
surface->container = container;
@ -146,7 +146,7 @@ index 6ad6ac7..3e10009 100644
list_init(&surface->renderbuffers);
list_init(&surface->overlays);
@@ -5810,7 +5803,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
@@ -5727,7 +5720,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);
@ -156,7 +156,7 @@ index 6ad6ac7..3e10009 100644
}
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
index 601d3ad..bdb4b67 100644
index e702d61..075bffc 100644
--- a/dlls/wined3d/swapchain.c
+++ b/dlls/wined3d/swapchain.c
@@ -569,19 +569,19 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
@ -202,10 +202,10 @@ index 601d3ad..bdb4b67 100644
}
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index 1f54c71..5b6f1ab 100644
index d834cd8..bc9584a 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -783,9 +783,7 @@ static void texture2d_sub_resource_invalidate_location(struct wined3d_resource *
@@ -798,9 +798,7 @@ static void texture2d_sub_resource_invalidate_location(struct wined3d_resource *
static void texture2d_sub_resource_validate_location(struct wined3d_resource *sub_resource, DWORD location)
{
@ -217,10 +217,10 @@ index 1f54c71..5b6f1ab 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 d5d960e..6d233b8 100644
index 7b5a04f..06774c8 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2384,7 +2384,6 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
@@ -2409,7 +2409,6 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
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;
@ -229,5 +229,5 @@ index d5d960e..6d233b8 100644
GLenum target, unsigned int level, unsigned int layer, DWORD flags,
struct wined3d_surface **surface) DECLSPEC_HIDDEN;
--
2.2.1
2.3.5

View File

@ -1,4 +1,4 @@
From a91d461c5fad6e7a651f8b485b8541f4d2cc2d55 Mon Sep 17 00:00:00 2001
From 4f63b8a3415a44d16a20acfc6d4571fa10e19a55 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.
@ -15,23 +15,23 @@ Subject: wined3d: Remove surface_invalidate_location.
8 files changed, 30 insertions(+), 42 deletions(-)
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
index 308e678..4bc4d3b 100644
index 35637f2..0d61251 100644
--- a/dlls/wined3d/arb_program_shader.c
+++ b/dlls/wined3d/arb_program_shader.c
@@ -7689,7 +7689,7 @@ HRESULT arbfp_blit_surface(struct wined3d_device *device, DWORD filter,
@@ -7922,7 +7922,7 @@ static void arbfp_blit_surface(struct wined3d_device *device, DWORD filter,
context_release(context);
wined3d_resource_validate_location(&dst_surface->resource, dst_surface->container->resource.draw_binding);
- surface_invalidate_location(dst_surface, ~dst_surface->container->resource.draw_binding);
+ wined3d_resource_invalidate_location(&dst_surface->resource, ~dst_surface->container->resource.draw_binding);
return WINED3D_OK;
}
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 8c5844a..7e4b935 100644
index ac4c7cb..167ea7d 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -3161,7 +3161,7 @@ static void context_setup_target(struct wined3d_context *context, struct wined3d
@@ -3192,7 +3192,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,7 +41,7 @@ index 8c5844a..7e4b935 100644
}
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 2a62e8a..85771ba 100644
index f5fdad2..4e21f49 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -393,7 +393,7 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
@ -54,10 +54,10 @@ index 2a62e8a..85771ba 100644
}
diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c
index 9ccc1b4..c05369e 100644
index 567550e..6f226ce 100644
--- a/dlls/wined3d/drawprim.c
+++ b/dlls/wined3d/drawprim.c
@@ -626,7 +626,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
@@ -629,7 +629,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
if (target)
{
surface_load_location(target, context, target->container->resource.draw_binding);
@ -67,7 +67,7 @@ index 9ccc1b4..c05369e 100644
}
}
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index aa6ae19..23e74b0 100644
index 350a2b2..929ea5d 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -598,7 +598,7 @@ static void surface_evict_sysmem(struct wined3d_surface *surface)
@ -79,7 +79,7 @@ index aa6ae19..23e74b0 100644
}
static void surface_release_client_storage(struct wined3d_surface *surface)
@@ -1184,7 +1184,7 @@ static void surface_remove_pbo(struct wined3d_surface *surface, const struct win
@@ -1128,7 +1128,7 @@ static void surface_remove_pbo(struct wined3d_surface *surface, const struct win
checkGLcall("glDeleteBuffers(1, &surface->pbo)");
surface->pbo = 0;
@ -88,7 +88,7 @@ index aa6ae19..23e74b0 100644
}
static ULONG surface_resource_incref(struct wined3d_resource *resource)
@@ -1224,7 +1224,7 @@ static void surface_unload(struct wined3d_resource *resource)
@@ -1168,7 +1168,7 @@ static void surface_unload(struct wined3d_resource *resource)
surface_prepare_system_memory(surface);
memset(surface->resource.heap_memory, 0, surface->resource.size);
wined3d_resource_validate_location(&surface->resource, WINED3D_LOCATION_SYSMEM);
@ -97,7 +97,7 @@ index aa6ae19..23e74b0 100644
/* 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
@@ -1236,7 +1236,7 @@ static void surface_unload(struct wined3d_resource *resource)
@@ -1180,7 +1180,7 @@ static void surface_unload(struct wined3d_resource *resource)
{
surface_prepare_map_memory(surface);
surface_load_location(surface, context, surface->resource.map_binding);
@ -106,7 +106,7 @@ index aa6ae19..23e74b0 100644
}
/* Destroy PBOs, but load them into real sysmem before */
@@ -1274,7 +1274,10 @@ static void surface_unload(struct wined3d_resource *resource)
@@ -1218,7 +1218,10 @@ static void surface_unload(struct wined3d_resource *resource)
static void wined3d_surface_location_invalidated(struct wined3d_resource *resource, DWORD location)
{
@ -118,7 +118,7 @@ index aa6ae19..23e74b0 100644
}
static const struct wined3d_resource_ops surface_resource_ops =
@@ -1742,7 +1745,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
@@ -1686,7 +1689,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);
@ -127,7 +127,7 @@ index aa6ae19..23e74b0 100644
return WINED3D_OK;
}
@@ -2796,7 +2799,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
@@ -2746,7 +2749,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
}
if (!(flags & (WINED3D_MAP_NO_DIRTY_UPDATE | WINED3D_MAP_READONLY)))
@ -136,7 +136,7 @@ index aa6ae19..23e74b0 100644
switch (surface->resource.map_binding)
{
@@ -2912,7 +2915,7 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
@@ -2862,7 +2865,7 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
}
surface_load_location(surface, context, WINED3D_LOCATION_DIB);
@ -145,7 +145,7 @@ index aa6ae19..23e74b0 100644
if (context)
context_release(context);
@@ -2961,7 +2964,7 @@ HRESULT CDECL wined3d_surface_releasedc(struct wined3d_surface *surface, HDC dc)
@@ -2911,7 +2914,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);
@ -154,7 +154,7 @@ index aa6ae19..23e74b0 100644
if (context)
context_release(context);
}
@@ -3337,7 +3340,7 @@ static void fb_copy_to_texture_direct(struct wined3d_surface *dst_surface, struc
@@ -3289,7 +3292,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);
@ -163,7 +163,7 @@ index aa6ae19..23e74b0 100644
}
/* Uses the hardware to stretch and flip the image */
@@ -3405,7 +3408,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
@@ -3357,7 +3360,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 */
@ -172,7 +172,7 @@ index aa6ae19..23e74b0 100644
}
/* Make sure that the top pixel is always above the bottom pixel, and keep a separate upside down flag
@@ -3610,7 +3613,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
@@ -3562,7 +3565,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);
@ -181,16 +181,7 @@ index aa6ae19..23e74b0 100644
}
/* Front buffer coordinates are always full screen coordinates, but our GL
@@ -3923,7 +3926,7 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE
(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);
- surface_invalidate_location(dst_surface, ~dst_surface->container->resource.draw_binding);
+ wined3d_resource_invalidate_location(&dst_surface->resource, ~dst_surface->container->resource.draw_binding);
return WINED3D_OK;
}
@@ -4167,18 +4170,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
@@ -4064,18 +4067,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
surface->ds_current_size.cy = surface->resource.height;
}
@ -209,7 +200,16 @@ index aa6ae19..23e74b0 100644
static DWORD resource_access_from_location(DWORD location)
{
switch (location)
@@ -5651,7 +5642,7 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
@@ -4627,7 +4618,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);
- surface_invalidate_location(dst_surface, ~dst_surface->container->resource.draw_binding);
+ wined3d_resource_invalidate_location(&dst_surface->resource, ~dst_surface->container->resource.draw_binding);
}
const struct blit_shader ffp_blit = {
@@ -5599,7 +5590,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);
@ -218,7 +218,7 @@ index aa6ae19..23e74b0 100644
return WINED3D_OK;
}
@@ -5780,7 +5771,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
@@ -5727,7 +5718,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);
@ -228,7 +228,7 @@ index aa6ae19..23e74b0 100644
return hr;
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
index bdb4b67..e64715e 100644
index 075bffc..bd5348c 100644
--- a/dlls/wined3d/swapchain.c
+++ b/dlls/wined3d/swapchain.c
@@ -512,7 +512,7 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
@ -278,10 +278,10 @@ index bdb4b67..e64715e 100644
/* MSDN says we're only allowed a single fullscreen swapchain per device,
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index 05fb248..8edae6d 100644
index 172e5c4..140124f 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -787,7 +787,7 @@ static void texture2d_sub_resource_add_dirty_region(struct wined3d_resource *sub
@@ -779,7 +779,7 @@ static void texture2d_sub_resource_add_dirty_region(struct wined3d_resource *sub
context = context_acquire(surface->resource.device, NULL);
surface_load_location(surface, context, surface->resource.map_binding);
context_release(context);
@ -290,7 +290,7 @@ index 05fb248..8edae6d 100644
}
static void texture2d_sub_resource_cleanup(struct wined3d_resource *sub_resource)
@@ -799,9 +799,7 @@ static void texture2d_sub_resource_cleanup(struct wined3d_resource *sub_resource
@@ -791,9 +791,7 @@ static void texture2d_sub_resource_cleanup(struct wined3d_resource *sub_resource
static void texture2d_sub_resource_invalidate_location(struct wined3d_resource *sub_resource, DWORD location)
{
@ -302,10 +302,10 @@ index 05fb248..8edae6d 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 3628834..f8ea878 100644
index 27bba5b..19b8d31 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2368,7 +2368,6 @@ HRESULT surface_color_fill(struct wined3d_surface *s,
@@ -2391,7 +2391,6 @@ HRESULT surface_color_fill(struct wined3d_surface *s,
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;
@ -314,5 +314,5 @@ index 3628834..f8ea878 100644
void surface_load_ds_location(struct wined3d_surface *surface,
struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
--
2.3.0
2.3.5

View File

@ -1,4 +1,4 @@
From 4fb4e37de61914de25e8e9e367824506ef85f0e2 Mon Sep 17 00:00:00 2001
From d38b136f82ef53ae256d8989312783f0cba3a437 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 20 Dec 2012 13:09:17 +0100
Subject: wined3d: Move the framebuffer into wined3d_state
@ -20,7 +20,7 @@ Subject: wined3d: Move the framebuffer into wined3d_state
13 files changed, 171 insertions(+), 126 deletions(-)
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
index b59374d..3e81dc0 100644
index 0d61251..2561afc 100644
--- a/dlls/wined3d/arb_program_shader.c
+++ b/dlls/wined3d/arb_program_shader.c
@@ -706,7 +706,7 @@ static void shader_arb_load_constants_internal(struct shader_arb_priv *priv,
@ -129,7 +129,7 @@ index 5644ea0..bfedf0e 100644
WORD map;
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 6bdf969..09bfee0 100644
index d66850a..639dc4f 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -290,7 +290,7 @@ static void wined3d_cs_exec_clear(struct wined3d_cs *cs, const void *data)
@ -168,7 +168,7 @@ index 6bdf969..09bfee0 100644
if (!prev != !op->view)
{
@@ -982,7 +982,7 @@ static void wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data)
@@ -1002,7 +1002,7 @@ static void wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data)
state_cleanup(&cs->state);
memset(&cs->state, 0, sizeof(cs->state));
@ -177,7 +177,7 @@ index 6bdf969..09bfee0 100644
WINED3D_STATE_NO_REF | WINED3D_STATE_INIT_DEFAULT)))
ERR("Failed to initialize CS state, hr %#x.\n", hr);
}
@@ -1065,17 +1065,9 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
@@ -1085,17 +1085,9 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
if (!(cs = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*cs))))
return NULL;
@ -196,7 +196,7 @@ index 6bdf969..09bfee0 100644
HeapFree(GetProcessHeap(), 0, cs);
return NULL;
}
@@ -1096,7 +1088,6 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
@@ -1116,7 +1108,6 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
void wined3d_cs_destroy(struct wined3d_cs *cs)
{
state_cleanup(&cs->state);
@ -205,7 +205,7 @@ index 6bdf969..09bfee0 100644
HeapFree(GetProcessHeap(), 0, cs);
}
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index d7b8ac8..a7fad33 100644
index 5836edf..13a1f0c 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -860,7 +860,7 @@ static void device_init_swapchain_state(struct wined3d_device *device, struct wi
@ -428,7 +428,7 @@ index d7b8ac8..a7fad33 100644
wined3d_rendertarget_view_incref(view);
wined3d_cs_emit_set_depth_stencil_view(device->cs, view);
if (prev)
@@ -4362,10 +4344,9 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
@@ -4363,10 +4345,9 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
wined3d_texture_decref(device->cursor_texture);
device->cursor_texture = NULL;
}
@ -440,7 +440,7 @@ index d7b8ac8..a7fad33 100644
{
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
{
@@ -4374,6 +4355,11 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
@@ -4375,6 +4356,11 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
}
wined3d_device_set_depth_stencil_view(device, NULL);
@ -452,7 +452,7 @@ index d7b8ac8..a7fad33 100644
if (device->onscreen_depth_stencil)
{
wined3d_surface_decref(device->onscreen_depth_stencil);
@@ -4658,7 +4644,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
@@ -4665,7 +4651,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
if (device->d3d_initialized)
delete_opengl_contexts(device, swapchain);
@ -461,7 +461,7 @@ index d7b8ac8..a7fad33 100644
&device->adapter->d3d_info, WINED3D_STATE_INIT_DEFAULT)))
ERR("Failed to initialize device state, hr %#x.\n", hr);
device->update_state = &device->state;
@@ -4667,22 +4653,21 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
@@ -4674,22 +4660,21 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
}
else if (device->back_buffer_view)
{
@ -489,7 +489,7 @@ index d7b8ac8..a7fad33 100644
wined3d_cs_emit_set_scissor_rect(device->cs, &state->scissor_rect);
}
@@ -4773,17 +4758,17 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
@@ -4780,17 +4765,17 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
{
@ -511,7 +511,7 @@ index d7b8ac8..a7fad33 100644
}
}
break;
@@ -4946,7 +4931,7 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d,
@@ -4953,7 +4938,7 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d,
device->blitter = adapter->blitter;
@ -577,7 +577,7 @@ index f2c2f42..c6a72fc 100644
surface_modify_ds_location(ds, location, ds->ds_current_size.cx, ds->ds_current_size.cy);
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index 1a1b6b0..22a1ced 100644
index b1a0f85..d1613cb 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -1088,7 +1088,7 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
@ -603,7 +603,7 @@ index 0bedf24..70c4635 100644
{
static unsigned int warned = 0;
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index b3ac4f1..7beb260 100644
index 7efbf3d..ceb1986 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -105,7 +105,7 @@ static void state_zenable(struct wined3d_context *context, const struct wined3d_
@ -660,7 +660,7 @@ index b3ac4f1..7beb260 100644
float scale;
union
@@ -4677,7 +4677,7 @@ static void vertexdeclaration(struct wined3d_context *context, const struct wine
@@ -4657,7 +4657,7 @@ static void vertexdeclaration(struct wined3d_context *context, const struct wine
static void viewport_miscpart(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
{
@ -669,7 +669,7 @@ index b3ac4f1..7beb260 100644
const struct wined3d_gl_info *gl_info = context->gl_info;
struct wined3d_viewport vp = state->viewport;
@@ -4855,7 +4855,7 @@ static void scissorrect(struct wined3d_context *context, const struct wined3d_st
@@ -4835,7 +4835,7 @@ static void scissorrect(struct wined3d_context *context, const struct wined3d_st
}
else
{
@ -678,7 +678,7 @@ index b3ac4f1..7beb260 100644
UINT height;
UINT width;
@@ -4919,7 +4919,7 @@ static void psorigin(struct wined3d_context *context, const struct wined3d_state
@@ -4899,7 +4899,7 @@ static void psorigin(struct wined3d_context *context, const struct wined3d_state
void state_srgbwrite(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
{
@ -788,16 +788,14 @@ index 62b1841..76a80e2 100644
if (FAILED(hr = stateblock_allocate_shader_constants(stateblock)))
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index f993eae..2cff4f6 100644
index 5d611c8..a053f34 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -3413,10 +3413,10 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE
@@ -3413,8 +3413,8 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE
enum wined3d_texture_filter_type filter)
{
struct wined3d_device *device = dst_surface->resource.device;
- const struct wined3d_surface *rt = wined3d_rendertarget_view_get_surface(device->fb.render_targets[0]);
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
const struct wined3d_d3d_info *d3d_info = &device->adapter->d3d_info;
struct wined3d_swapchain *src_swapchain, *dst_swapchain;
+ const struct wined3d_surface *rt = wined3d_rendertarget_view_get_surface(device->state.fb.render_targets[0]);
@ -817,10 +815,10 @@ index 1ac5e7a..454cb21 100644
struct wined3d_context *context;
struct wined3d_surface *front;
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
index 2f21b29..03eb4d5 100644
index 1686e30..09408e4 100644
--- a/dlls/wined3d/utils.c
+++ b/dlls/wined3d/utils.c
@@ -3190,7 +3190,7 @@ void get_projection_matrix(const struct wined3d_context *context, const struct w
@@ -3192,7 +3192,7 @@ void get_projection_matrix(const struct wined3d_context *context, const struct w
float y_offset = context->render_offscreen
? (center_offset - (2.0f * y) - h) / h
: (center_offset - (2.0f * y) - h) / -h;
@ -829,7 +827,7 @@ index 2f21b29..03eb4d5 100644
state->render_states[WINED3D_RS_ZENABLE] : WINED3D_ZB_FALSE;
float z_scale = zenable ? 2.0f : 0.0f;
float z_offset = zenable ? -1.0f : 0.0f;
@@ -3684,7 +3684,7 @@ void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d
@@ -3686,7 +3686,7 @@ void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d
unsigned int i;
DWORD ttff;
DWORD cop, aop, carg0, carg1, carg2, aarg0, aarg1, aarg2;
@ -839,10 +837,10 @@ index 2f21b29..03eb4d5 100644
const struct wined3d_d3d_info *d3d_info = context->d3d_info;
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index b1391e8..acc20a1 100644
index c325a06..e80ceb9 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -1121,6 +1121,36 @@ struct wined3d_timestamp_query
@@ -1124,6 +1124,36 @@ struct wined3d_timestamp_query
void context_alloc_timestamp_query(struct wined3d_context *context, struct wined3d_timestamp_query *query) DECLSPEC_HIDDEN;
void context_free_timestamp_query(struct wined3d_timestamp_query *query) DECLSPEC_HIDDEN;
@ -879,7 +877,7 @@ index b1391e8..acc20a1 100644
struct wined3d_context
{
const struct wined3d_gl_info *gl_info;
@@ -1135,6 +1165,7 @@ struct wined3d_context
@@ -1138,6 +1168,7 @@ struct wined3d_context
DWORD dirtyArray[STATE_HIGHEST + 1]; /* Won't get bigger than that, a state is never marked dirty 2 times */
DWORD numDirtyEntries;
DWORD isStateDirty[STATE_HIGHEST / (sizeof(DWORD) * CHAR_BIT) + 1]; /* Bitmap to find out quickly if a state is dirty */
@ -887,7 +885,7 @@ index b1391e8..acc20a1 100644
struct wined3d_swapchain *swapchain;
struct wined3d_surface *current_rt;
@@ -1236,12 +1267,6 @@ struct wined3d_context
@@ -1239,12 +1270,6 @@ struct wined3d_context
GLuint dummy_arbfp_prog;
};
@ -900,7 +898,7 @@ index b1391e8..acc20a1 100644
typedef void (*APPLYSTATEFUNC)(struct wined3d_context *ctx, const struct wined3d_state *state, DWORD state_id);
struct StateEntry
@@ -1927,7 +1952,7 @@ struct wined3d_stream_state
@@ -1928,7 +1953,7 @@ struct wined3d_stream_state
struct wined3d_state
{
DWORD flags;
@ -909,7 +907,7 @@ index b1391e8..acc20a1 100644
struct wined3d_vertex_declaration *vertex_declaration;
struct wined3d_stream_output stream_output[MAX_STREAM_OUT];
@@ -2033,7 +2058,6 @@ struct wined3d_device
@@ -2034,7 +2059,6 @@ struct wined3d_device
struct wine_rb_tree samplers;
/* Render Target Support */
@ -917,7 +915,7 @@ index b1391e8..acc20a1 100644
struct wined3d_surface *onscreen_depth_stencil;
struct wined3d_rendertarget_view *auto_depth_stencil_view;
@@ -2544,9 +2568,8 @@ struct wined3d_stateblock
@@ -2545,9 +2569,8 @@ struct wined3d_stateblock
void stateblock_init_contained_states(struct wined3d_stateblock *stateblock) DECLSPEC_HIDDEN;
void state_cleanup(struct wined3d_state *state) DECLSPEC_HIDDEN;
@ -929,7 +927,7 @@ index b1391e8..acc20a1 100644
void state_unbind_resources(struct wined3d_state *state) DECLSPEC_HIDDEN;
struct wined3d_cs_ops
@@ -2559,7 +2582,6 @@ struct wined3d_cs
@@ -2560,7 +2583,6 @@ struct wined3d_cs
{
const struct wined3d_cs_ops *ops;
struct wined3d_device *device;

View File

@ -1,4 +1,4 @@
From b95d18600a2936f01d9a0f12782f81463dde3e6d Mon Sep 17 00:00:00 2001
From 449e8ea8593261284351648eb19504e8e8769dde Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Tue, 1 Oct 2013 14:31:56 +0200
Subject: wined3d: Hackily introduce a multithreaded command stream
@ -10,7 +10,7 @@ Subject: wined3d: Hackily introduce a multithreaded command stream
3 files changed, 368 insertions(+), 39 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 09bfee0..d40f307 100644
index 639dc4f..9247d98 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -24,8 +24,19 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d);
@ -467,16 +467,16 @@ index 09bfee0..d40f307 100644
{
const struct wined3d_d3d_info *d3d_info = &cs->device->adapter->d3d_info;
const struct wined3d_cs_set_texture *op = data;
@@ -695,6 +872,8 @@ static void wined3d_cs_exec_set_texture(struct wined3d_cs *cs, const void *data)
}
@@ -708,6 +885,8 @@ static void wined3d_cs_exec_set_texture(struct wined3d_cs *cs, const void *data)
device_invalidate_state(cs->device, STATE_SAMPLER(op->stage));
if (new_use_color_key)
device_invalidate_state(cs->device, STATE_COLOR_KEY);
+
+ return sizeof(*op);
}
void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined3d_texture *texture)
@@ -709,12 +888,14 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
@@ -722,12 +901,14 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
cs->ops->submit(cs);
}
@ -492,7 +492,7 @@ index 09bfee0..d40f307 100644
}
void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3d_shader_type type,
@@ -731,12 +912,14 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
@@ -744,12 +925,14 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
cs->ops->submit(cs);
}
@ -508,7 +508,7 @@ index 09bfee0..d40f307 100644
}
void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type type,
@@ -753,13 +936,15 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
@@ -766,13 +949,15 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
cs->ops->submit(cs);
}
@ -525,7 +525,7 @@ index 09bfee0..d40f307 100644
}
void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type type, struct wined3d_shader *shader)
@@ -774,12 +959,14 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
@@ -787,12 +972,14 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
cs->ops->submit(cs);
}
@ -541,7 +541,7 @@ index 09bfee0..d40f307 100644
}
void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render_state state, DWORD value)
@@ -794,12 +981,14 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
@@ -807,12 +994,14 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
cs->ops->submit(cs);
}
@ -557,7 +557,7 @@ index 09bfee0..d40f307 100644
}
void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
@@ -816,12 +1005,14 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
@@ -829,12 +1018,14 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
cs->ops->submit(cs);
}
@ -573,7 +573,7 @@ index 09bfee0..d40f307 100644
}
void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
@@ -838,13 +1029,15 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
@@ -851,13 +1042,15 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
cs->ops->submit(cs);
}
@ -591,7 +591,7 @@ index 09bfee0..d40f307 100644
}
void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform_state state,
@@ -855,17 +1048,19 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
@@ -868,17 +1061,19 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
op = cs->ops->require_space(cs, sizeof(*op));
op->opcode = WINED3D_CS_OP_SET_TRANSFORM;
op->state = state;
@ -614,7 +614,7 @@ index 09bfee0..d40f307 100644
}
void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const struct wined3d_vec4 *plane)
@@ -875,12 +1070,12 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
@@ -888,12 +1083,12 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
op = cs->ops->require_space(cs, sizeof(*op));
op->opcode = WINED3D_CS_OP_SET_CLIP_PLANE;
op->plane_idx = plane_idx;
@ -629,16 +629,16 @@ index 09bfee0..d40f307 100644
{
const struct wined3d_cs_set_color_key *op = data;
struct wined3d_texture *texture = op->texture;
@@ -934,6 +1129,8 @@ static void wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *dat
if (texture->resource.bind_count && op->flags & WINED3D_CKEY_SRC_BLT)
device_invalidate_state(cs->device, STATE_RENDER(WINED3D_RS_COLORKEYENABLE));
@@ -954,6 +1149,8 @@ static void wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *dat
break;
}
}
+
+ return sizeof(*op);
}
void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture *texture,
@@ -956,12 +1153,14 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
@@ -976,12 +1173,14 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
cs->ops->submit(cs);
}
@ -655,7 +655,7 @@ index 09bfee0..d40f307 100644
}
void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_material *material)
@@ -970,12 +1169,12 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
@@ -990,12 +1189,12 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
op = cs->ops->require_space(cs, sizeof(*op));
op->opcode = WINED3D_CS_OP_SET_MATERIAL;
@ -670,7 +670,7 @@ index 09bfee0..d40f307 100644
{
struct wined3d_adapter *adapter = cs->device->adapter;
HRESULT hr;
@@ -985,6 +1184,8 @@ static void wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data)
@@ -1005,6 +1204,8 @@ static void wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data)
if (FAILED(hr = state_init(&cs->state, &adapter->gl_info, &adapter->d3d_info,
WINED3D_STATE_NO_REF | WINED3D_STATE_INIT_DEFAULT)))
ERR("Failed to initialize CS state, hr %#x.\n", hr);
@ -679,7 +679,7 @@ index 09bfee0..d40f307 100644
}
void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
@@ -997,8 +1198,9 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
@@ -1017,8 +1218,9 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
cs->ops->submit(cs);
}
@ -690,7 +690,7 @@ index 09bfee0..d40f307 100644
/* WINED3D_CS_OP_PRESENT */ wined3d_cs_exec_present,
/* WINED3D_CS_OP_CLEAR */ wined3d_cs_exec_clear,
/* WINED3D_CS_OP_DRAW */ wined3d_cs_exec_draw,
@@ -1057,6 +1259,58 @@ static const struct wined3d_cs_ops wined3d_cs_st_ops =
@@ -1077,6 +1279,58 @@ static const struct wined3d_cs_ops wined3d_cs_st_ops =
wined3d_cs_st_submit,
};
@ -749,7 +749,7 @@ index 09bfee0..d40f307 100644
struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
{
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
@@ -1082,12 +1336,60 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
@@ -1102,12 +1356,60 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
return NULL;
}
@ -838,7 +838,7 @@ index 08021a2..088e59a 100644
if (appkey) RegCloseKey( appkey );
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 34a3093..c59d523 100644
index 089faa4..2addced 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -278,6 +278,7 @@ struct wined3d_settings
@ -849,7 +849,7 @@ index 34a3093..c59d523 100644
};
extern struct wined3d_settings wined3d_settings DECLSPEC_HIDDEN;
@@ -2572,6 +2573,18 @@ HRESULT state_init(struct wined3d_state *state, const struct wined3d_gl_info *gl
@@ -2573,6 +2574,18 @@ HRESULT state_init(struct wined3d_state *state, const struct wined3d_gl_info *gl
const struct wined3d_d3d_info *d3d_info, DWORD flags) DECLSPEC_HIDDEN;
void state_unbind_resources(struct wined3d_state *state) DECLSPEC_HIDDEN;
@ -868,7 +868,7 @@ index 34a3093..c59d523 100644
struct wined3d_cs_ops
{
void *(*require_space)(struct wined3d_cs *cs, size_t size);
@@ -2583,9 +2596,14 @@ struct wined3d_cs
@@ -2584,9 +2597,14 @@ struct wined3d_cs
const struct wined3d_cs_ops *ops;
struct wined3d_device *device;
struct wined3d_state state;

View File

@ -1,4 +1,4 @@
From c9b84afff62ee9c34a26124f43f896085fb9f6d2 Mon Sep 17 00:00:00 2001
From f095c8ad65086b4c17879e878f6387ef2f211e21 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Mon, 29 Apr 2013 18:49:53 +0200
Subject: wined3d: Send blits through the command stream.
@ -7,12 +7,12 @@ This needs more work. This patch breaks error handling, and the split
between surface_blt and surface_blt_ugly isn't particularly nice.
---
dlls/wined3d/cs.c | 50 +++++++
dlls/wined3d/surface.c | 309 ++++++++++++++++++++++-------------------
dlls/wined3d/surface.c | 307 ++++++++++++++++++++++-------------------
dlls/wined3d/wined3d_private.h | 8 ++
3 files changed, 227 insertions(+), 140 deletions(-)
3 files changed, 226 insertions(+), 139 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 150d81f..340cdee 100644
index 032c1a2..0e758c8 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -74,6 +74,7 @@ enum wined3d_cs_op
@ -42,7 +42,7 @@ index 150d81f..340cdee 100644
/* FIXME: The list synchronization probably isn't particularly fast. */
static void wined3d_cs_list_enqueue(struct wined3d_cs_list *list, struct wined3d_cs_block *block)
{
@@ -1484,6 +1497,9 @@ static UINT wined3d_cs_exec_glfinish(struct wined3d_cs *cs, const void *data)
@@ -1504,6 +1517,9 @@ static UINT wined3d_cs_exec_glfinish(struct wined3d_cs *cs, const void *data)
struct wined3d_device *device = cs->device;
struct wined3d_context *context;
@ -52,7 +52,7 @@ index 150d81f..340cdee 100644
context = context_acquire(device, NULL);
context->gl_info->gl_ops.gl.p_glFinish();
context_release(context);
@@ -1695,6 +1711,38 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, UINT idx, BOOL enab
@@ -1715,6 +1731,38 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, UINT idx, BOOL enab
cs->ops->submit(cs);
}
@ -91,7 +91,7 @@ index 150d81f..340cdee 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_FENCE */ wined3d_cs_exec_fence,
@@ -1735,6 +1783,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -1755,6 +1803,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_SET_PRIMITIVE_TYPE */ wined3d_cs_exec_set_primitive_type,
/* WINED3D_CS_OP_SET_LIGHT */ wined3d_cs_exec_set_light,
/* WINED3D_CS_OP_SET_LIGHT_ENABLE */ wined3d_cs_exec_set_light_enable,
@ -99,7 +99,7 @@ index 150d81f..340cdee 100644
};
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
@@ -1809,6 +1858,7 @@ static DWORD WINAPI wined3d_cs_run(void *thread_param)
@@ -1829,6 +1878,7 @@ static DWORD WINAPI wined3d_cs_run(void *thread_param)
TRACE("Started.\n");
@ -108,11 +108,11 @@ index 150d81f..340cdee 100644
{
struct wined3d_cs_block *block;
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 3905965..9b163b5 100644
index 87f6ef2..747c42a 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -5001,14 +5001,13 @@ const struct blit_shader cpu_blit = {
cpu_blit_depth_fill,
@@ -4991,14 +4991,13 @@ const struct blit_shader cpu_blit = {
cpu_blit_blit_surface,
};
-HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst_rect_in,
@ -128,7 +128,7 @@ index 3905965..9b163b5 100644
BOOL scale, convert;
static const DWORD simple_blit = WINEDDBLT_ASYNC
@@ -5019,111 +5018,6 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
@@ -5009,111 +5008,6 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
| WINEDDBLT_DEPTHFILL
| WINEDDBLT_DONOTWAIT;
@ -240,7 +240,7 @@ index 3905965..9b163b5 100644
if (!device->d3d_initialized)
{
WARN("D3D not initialized, using fallback.\n");
@@ -5166,8 +5060,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
@@ -5156,8 +5050,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
}
scale = src_surface
@ -251,7 +251,7 @@ index 3905965..9b163b5 100644
convert = src_surface && src_surface->resource.format->id != dst_surface->resource.format->id;
dst_ds_flags = dst_surface->resource.format->flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL);
@@ -5185,22 +5079,16 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
@@ -5175,22 +5069,16 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
TRACE("Depth fill.\n");
if (!surface_convert_depth_to_float(dst_surface, fx->u5.dwFillDepth, &depth))
@ -279,7 +279,7 @@ index 3905965..9b163b5 100644
}
}
else
@@ -5229,8 +5117,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
@@ -5221,8 +5109,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
palette, fx->u5.dwFillColor, &color))
goto fallback;
@ -290,7 +290,7 @@ index 3905965..9b163b5 100644
}
else
{
@@ -5258,9 +5146,9 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
@@ -5250,9 +5138,9 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
TRACE("Not doing upload because of format conversion.\n");
else
{
@ -302,7 +302,7 @@ index 3905965..9b163b5 100644
{
if (!wined3d_resource_is_offscreen(&dst_surface->container->resource))
{
@@ -5269,7 +5157,7 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
@@ -5261,7 +5149,7 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
dst_surface->container->resource.draw_binding);
context_release(context);
}
@ -311,7 +311,7 @@ index 3905965..9b163b5 100644
}
}
}
@@ -5293,52 +5181,193 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
@@ -5285,50 +5173,191 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
wined3d_swapchain_present(dst_swapchain, NULL, NULL, dst_swapchain->win_handle, NULL, 0);
dst_swapchain->desc.swap_effect = swap_effect;
@ -343,20 +343,17 @@ index 3905965..9b163b5 100644
+ return;
}
if (arbfp_blit.blit_supported(&device->adapter->gl_info, &device->adapter->d3d_info, blit_op,
blitter = wined3d_select_blitter(&device->adapter->gl_info, &device->adapter->d3d_info, blit_op,
- &src_rect, src_surface->resource.usage, src_surface->resource.pool, src_surface->resource.format,
- &dst_rect, dst_surface->resource.usage, dst_surface->resource.pool, dst_surface->resource.format))
- &dst_rect, dst_surface->resource.usage, dst_surface->resource.pool, dst_surface->resource.format);
+ src_rect, src_surface->resource.usage, src_surface->resource.pool, src_surface->resource.format,
+ dst_rect, dst_surface->resource.usage, dst_surface->resource.pool, dst_surface->resource.format))
+ dst_rect, dst_surface->resource.usage, dst_surface->resource.pool, dst_surface->resource.format);
if (blitter)
{
TRACE("Using arbfp blit.\n");
- if (SUCCEEDED(arbfp_blit_surface(device, filter, src_surface, &src_rect,
- dst_surface, &dst_rect, color_key)))
- return WINED3D_OK;
+ if (SUCCEEDED(arbfp_blit_surface(device, filter, src_surface, src_rect,
+ dst_surface, dst_rect, color_key)))
+ return;
- blitter->blit_surface(device, filter, src_surface, &src_rect, dst_surface, &dst_rect, color_key);
- return WINED3D_OK;
+ blitter->blit_surface(device, filter, src_surface, src_rect, dst_surface, dst_rect, color_key);
+ return;
}
}
}
@ -520,10 +517,10 @@ index 3905965..9b163b5 100644
static const struct wined3d_resource_ops surface_resource_ops =
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 6870e07..d4dd160 100644
index 85a7ca1..ee9df98 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2451,6 +2451,9 @@ void wined3d_surface_destroy(struct wined3d_surface *surface) DECLSPEC_HIDDEN;
@@ -2452,6 +2452,9 @@ void wined3d_surface_destroy(struct wined3d_surface *surface) DECLSPEC_HIDDEN;
void wined3d_surface_upload_data(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info,
const struct wined3d_format *format, const RECT *src_rect, UINT src_pitch, const POINT *dst_point,
BOOL srgb, const struct wined3d_const_bo_address *data) DECLSPEC_HIDDEN;
@ -533,7 +530,7 @@ index 6870e07..d4dd160 100644
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;
@@ -2600,6 +2603,7 @@ struct wined3d_cs
@@ -2601,6 +2604,7 @@ struct wined3d_cs
struct wined3d_device *device;
struct wined3d_state state;
HANDLE thread;
@ -541,7 +538,7 @@ index 6870e07..d4dd160 100644
DWORD tls_idx;
struct wined3d_surface *onscreen_depth_stencil;
@@ -2678,6 +2682,10 @@ void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs,
@@ -2679,6 +2683,10 @@ void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs,
GLenum primitive_type) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light_info *light) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, UINT idx, BOOL enable) DECLSPEC_HIDDEN;

File diff suppressed because it is too large Load Diff