You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Rebase against e28d6b2fb099795d2472a97d7ab0bfe868e90421.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From 518ce36e50012eb7f2dea0e4daf34c73fae4456c Mon Sep 17 00:00:00 2001
|
||||
From 3774380efa36ca757552bbb624cfe3904ba7a4fc 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.
|
||||
@@ -7,16 +7,15 @@ Subject: wined3d: Move surface locations into the resource.
|
||||
dlls/wined3d/arb_program_shader.c | 2 +-
|
||||
dlls/wined3d/device.c | 4 +-
|
||||
dlls/wined3d/drawprim.c | 2 +-
|
||||
dlls/wined3d/surface.c | 99 ++++++++++++++++++++-------------------
|
||||
dlls/wined3d/swapchain.c | 4 +-
|
||||
dlls/wined3d/surface.c | 93 ++++++++++++++++++++-------------------
|
||||
dlls/wined3d/wined3d_private.h | 1 -
|
||||
6 files changed, 56 insertions(+), 56 deletions(-)
|
||||
5 files changed, 51 insertions(+), 51 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
|
||||
index 0bd7c22..f218979 100644
|
||||
index 6a321db..fc91209 100644
|
||||
--- a/dlls/wined3d/arb_program_shader.c
|
||||
+++ b/dlls/wined3d/arb_program_shader.c
|
||||
@@ -7821,7 +7821,7 @@ static void arbfp_blit_surface(struct wined3d_device *device, DWORD filter,
|
||||
@@ -7849,7 +7849,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 +25,7 @@ index 0bd7c22..f218979 100644
|
||||
&& !wined3d_resource_is_offscreen(&src_surface->container->resource))
|
||||
{
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 0521a94..b4bc3ac 100644
|
||||
index 937fdb7..1ef681a 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
|
||||
@@ -48,7 +47,7 @@ index 0521a94..b4bc3ac 100644
|
||||
ds->ds_current_size.cx,
|
||||
ds->ds_current_size.cy);
|
||||
diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c
|
||||
index 913ada5..567550e 100644
|
||||
index d2d3bce..afccecd 100644
|
||||
--- a/dlls/wined3d/drawprim.c
|
||||
+++ b/dlls/wined3d/drawprim.c
|
||||
@@ -651,7 +651,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
|
||||
@@ -61,7 +60,7 @@ index 913ada5..567550e 100644
|
||||
else
|
||||
SetRectEmpty(¤t_rect);
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 9abffb3..78f92d3 100644
|
||||
index 4bc38d8..d1493a2 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)
|
||||
@@ -109,7 +108,7 @@ index 9abffb3..78f92d3 100644
|
||||
{
|
||||
TRACE("surface is already in texture\n");
|
||||
return;
|
||||
@@ -2109,7 +2109,7 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
|
||||
@@ -2096,7 +2096,7 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
|
||||
create_dib = TRUE;
|
||||
}
|
||||
|
||||
@@ -118,20 +117,7 @@ index 9abffb3..78f92d3 100644
|
||||
wined3d_resource_free_sysmem(&surface->resource);
|
||||
|
||||
width = texture_resource->width;
|
||||
@@ -3175,9 +3175,9 @@ void flip_surface(struct wined3d_surface *front, struct wined3d_surface *back)
|
||||
back->flags = front->flags;
|
||||
front->flags = tmp_flags;
|
||||
|
||||
- tmp_flags = back->locations;
|
||||
- back->locations = front->locations;
|
||||
- front->locations = tmp_flags;
|
||||
+ tmp_flags = back->resource.locations;
|
||||
+ back->resource.locations = front->resource.locations;
|
||||
+ front->resource.locations = tmp_flags;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3356,7 +3356,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
|
||||
@@ -3275,7 +3275,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 */
|
||||
@@ -140,7 +126,7 @@ index 9abffb3..78f92d3 100644
|
||||
}
|
||||
|
||||
/* Make sure that the top pixel is always above the bottom pixel, and keep a separate upside down flag
|
||||
@@ -3894,13 +3894,14 @@ void surface_modify_ds_location(struct wined3d_surface *surface,
|
||||
@@ -3813,13 +3813,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 +144,7 @@ index 9abffb3..78f92d3 100644
|
||||
}
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
@@ -3915,7 +3916,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
@@ -3834,7 +3835,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 +153,7 @@ index 9abffb3..78f92d3 100644
|
||||
{
|
||||
w = surface->ds_current_size.cx;
|
||||
h = surface->ds_current_size.cy;
|
||||
@@ -3941,7 +3942,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
@@ -3860,7 +3861,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -176,7 +162,7 @@ index 9abffb3..78f92d3 100644
|
||||
{
|
||||
TRACE("Surface was discarded, no need copy data.\n");
|
||||
switch (location)
|
||||
@@ -3958,17 +3959,17 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
@@ -3880,17 +3881,17 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
default:
|
||||
FIXME("Unhandled location %#x\n", location);
|
||||
}
|
||||
@@ -198,7 +184,7 @@ index 9abffb3..78f92d3 100644
|
||||
surface->ds_current_size.cx = surface->resource.width;
|
||||
surface->ds_current_size.cy = surface->resource.height;
|
||||
return;
|
||||
@@ -4057,7 +4058,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
@@ -3979,7 +3980,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
ERR("Invalid location (%#x) specified.\n", location);
|
||||
}
|
||||
|
||||
@@ -207,7 +193,7 @@ index 9abffb3..78f92d3 100644
|
||||
surface->ds_current_size.cx = surface->resource.width;
|
||||
surface->ds_current_size.cy = surface->resource.height;
|
||||
}
|
||||
@@ -4066,7 +4067,7 @@ void surface_validate_location(struct wined3d_surface *surface, DWORD location)
|
||||
@@ -3988,7 +3989,7 @@ void surface_validate_location(struct wined3d_surface *surface, DWORD location)
|
||||
{
|
||||
TRACE("surface %p, location %s.\n", surface, wined3d_debug_location(location));
|
||||
|
||||
@@ -216,7 +202,7 @@ index 9abffb3..78f92d3 100644
|
||||
}
|
||||
|
||||
void surface_invalidate_location(struct wined3d_surface *surface, DWORD location)
|
||||
@@ -4075,9 +4076,9 @@ void surface_invalidate_location(struct wined3d_surface *surface, DWORD location
|
||||
@@ -3997,9 +3998,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 +214,7 @@ index 9abffb3..78f92d3 100644
|
||||
ERR("Surface %p does not have any up to date location.\n", surface);
|
||||
}
|
||||
|
||||
@@ -4113,7 +4114,7 @@ static void surface_copy_simple_location(struct wined3d_surface *surface, DWORD
|
||||
@@ -4035,7 +4036,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 +223,7 @@ index 9abffb3..78f92d3 100644
|
||||
|
||||
if (dst.buffer_object)
|
||||
{
|
||||
@@ -4146,33 +4147,33 @@ static void surface_load_sysmem(struct wined3d_surface *surface,
|
||||
@@ -4068,33 +4069,33 @@ static void surface_load_sysmem(struct wined3d_surface *surface,
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
|
||||
@@ -277,7 +263,7 @@ index 9abffb3..78f92d3 100644
|
||||
}
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
@@ -4212,14 +4213,14 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4134,14 +4135,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 +280,7 @@ index 9abffb3..78f92d3 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,
|
||||
@@ -4235,13 +4236,13 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4157,13 +4158,13 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
@@ -310,7 +296,7 @@ index 9abffb3..78f92d3 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};
|
||||
@@ -4256,7 +4257,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4178,7 +4179,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
|
||||
if (srgb)
|
||||
{
|
||||
@@ -319,7 +305,7 @@ index 9abffb3..78f92d3 100644
|
||||
== WINED3D_LOCATION_TEXTURE_RGB)
|
||||
{
|
||||
/* Performance warning... */
|
||||
@@ -4267,7 +4268,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4189,7 +4190,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -328,7 +314,7 @@ index 9abffb3..78f92d3 100644
|
||||
== WINED3D_LOCATION_TEXTURE_SRGB)
|
||||
{
|
||||
/* Performance warning... */
|
||||
@@ -4277,7 +4278,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4199,7 +4200,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -337,7 +323,7 @@ index 9abffb3..78f92d3 100644
|
||||
{
|
||||
WARN("Trying to load a texture from sysmem, but no simple location is valid.\n");
|
||||
/* Lets hope we get it from somewhere... */
|
||||
@@ -4312,7 +4313,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4234,7 +4235,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
surface_remove_pbo(surface, gl_info);
|
||||
}
|
||||
|
||||
@@ -346,7 +332,7 @@ index 9abffb3..78f92d3 100644
|
||||
if (format.convert)
|
||||
{
|
||||
/* This code is entered for texture formats which need a fixup. */
|
||||
@@ -4368,7 +4369,7 @@ static void surface_multisample_resolve(struct wined3d_surface *surface, struct
|
||||
@@ -4290,7 +4291,7 @@ static void surface_multisample_resolve(struct wined3d_surface *surface, struct
|
||||
{
|
||||
RECT rect = {0, 0, surface->resource.width, surface->resource.height};
|
||||
|
||||
@@ -355,7 +341,7 @@ index 9abffb3..78f92d3 100644
|
||||
ERR("Trying to resolve multisampled surface %p, but location WINED3D_LOCATION_RB_MULTISAMPLE not current.\n",
|
||||
surface);
|
||||
|
||||
@@ -4386,12 +4387,12 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
@@ -4308,12 +4309,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 +356,7 @@ index 9abffb3..78f92d3 100644
|
||||
&& surface->container->resource.draw_binding != WINED3D_LOCATION_DRAWABLE)
|
||||
{
|
||||
/* Already up to date, nothing to do. */
|
||||
@@ -4400,12 +4401,12 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
@@ -4322,12 +4323,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 +371,7 @@ index 9abffb3..78f92d3 100644
|
||||
{
|
||||
TRACE("Location already up to date.\n");
|
||||
return;
|
||||
@@ -4419,7 +4420,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
@@ -4341,7 +4342,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
required_access, surface->resource.access_flags);
|
||||
}
|
||||
|
||||
@@ -394,7 +380,7 @@ index 9abffb3..78f92d3 100644
|
||||
{
|
||||
ERR("Surface %p does not have any up to date location.\n", surface);
|
||||
surface->flags |= SFLAG_LOST;
|
||||
@@ -4458,7 +4459,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
@@ -4380,7 +4381,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
|
||||
surface_validate_location(surface, location);
|
||||
|
||||
@@ -403,7 +389,7 @@ index 9abffb3..78f92d3 100644
|
||||
surface_evict_sysmem(surface);
|
||||
|
||||
return;
|
||||
@@ -5508,8 +5509,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
@@ -5431,8 +5432,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. */
|
||||
@@ -414,7 +400,7 @@ index 9abffb3..78f92d3 100644
|
||||
{
|
||||
if (scale)
|
||||
TRACE("Not doing sysmem blit because of scaling.\n");
|
||||
@@ -5549,8 +5550,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
@@ -5472,8 +5473,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;
|
||||
}
|
||||
@@ -425,26 +411,11 @@ index 9abffb3..78f92d3 100644
|
||||
{
|
||||
/* Upload */
|
||||
if (scale)
|
||||
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
index 4f4d4df..e702d61 100644
|
||||
--- a/dlls/wined3d/swapchain.c
|
||||
+++ b/dlls/wined3d/swapchain.c
|
||||
@@ -555,8 +555,8 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
|
||||
}
|
||||
|
||||
front = surface_from_resource(wined3d_texture_get_sub_resource(swapchain->front_buffer, 0));
|
||||
- if (!swapchain->render_to_fbo && ((front->locations & WINED3D_LOCATION_SYSMEM)
|
||||
- || (back_buffer->locations & WINED3D_LOCATION_SYSMEM)))
|
||||
+ if (!swapchain->render_to_fbo && ((front->resource.locations & WINED3D_LOCATION_SYSMEM)
|
||||
+ || (back_buffer->resource.locations & WINED3D_LOCATION_SYSMEM)))
|
||||
{
|
||||
/* 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 2828e47..bc6f994 100644
|
||||
index 638b99d..2353881 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2348,7 +2348,6 @@ struct wined3d_surface
|
||||
@@ -2378,7 +2378,6 @@ struct wined3d_surface
|
||||
const struct wined3d_surface_ops *surface_ops;
|
||||
struct wined3d_texture *container;
|
||||
void *user_memory;
|
||||
@@ -453,5 +424,5 @@ index 2828e47..bc6f994 100644
|
||||
DWORD flags;
|
||||
|
||||
--
|
||||
2.4.2
|
||||
2.5.1
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 013c83727f4fbbf15bbbe7ccb12d42d58d17e18d Mon Sep 17 00:00:00 2001
|
||||
From e8ce3e8bef910f4908f92344d7c2d60abfa61935 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.
|
||||
@@ -7,10 +7,10 @@ Subject: wined3d: Remove surface_validate_location.
|
||||
dlls/wined3d/arb_program_shader.c | 2 +-
|
||||
dlls/wined3d/device.c | 4 ++--
|
||||
dlls/wined3d/surface.c | 29 +++++++++++------------------
|
||||
dlls/wined3d/swapchain.c | 12 ++++++------
|
||||
dlls/wined3d/swapchain.c | 4 ++--
|
||||
dlls/wined3d/texture.c | 4 +---
|
||||
dlls/wined3d/wined3d_private.h | 1 -
|
||||
6 files changed, 21 insertions(+), 31 deletions(-)
|
||||
6 files changed, 17 insertions(+), 27 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
|
||||
index fc91209..582746c 100644
|
||||
@@ -48,7 +48,7 @@ index 1ef681a..2683140 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 1dd4b69..4f646e4 100644
|
||||
index d1493a2..dac754e 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -1170,7 +1170,7 @@ static void surface_unload(struct wined3d_resource *resource)
|
||||
@@ -87,7 +87,7 @@ index 1dd4b69..4f646e4 100644
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3283,7 +3283,7 @@ static void fb_copy_to_texture_direct(struct wined3d_surface *dst_surface, struc
|
||||
@@ -3206,7 +3206,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. */
|
||||
@@ -96,7 +96,7 @@ index 1dd4b69..4f646e4 100644
|
||||
surface_invalidate_location(dst_surface, ~WINED3D_LOCATION_TEXTURE_RGB);
|
||||
}
|
||||
|
||||
@@ -3556,7 +3556,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
|
||||
@@ -3479,7 +3479,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. */
|
||||
@@ -105,7 +105,7 @@ index 1dd4b69..4f646e4 100644
|
||||
surface_invalidate_location(dst_surface, ~WINED3D_LOCATION_TEXTURE_RGB);
|
||||
}
|
||||
|
||||
@@ -4062,13 +4062,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
@@ -3985,13 +3985,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
surface->ds_current_size.cy = surface->resource.height;
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ index 1dd4b69..4f646e4 100644
|
||||
void surface_invalidate_location(struct wined3d_surface *surface, DWORD location)
|
||||
{
|
||||
TRACE("surface %p, location %s.\n", surface, wined3d_debug_location(location));
|
||||
@@ -4456,7 +4449,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
@@ -4379,7 +4372,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ index 1dd4b69..4f646e4 100644
|
||||
|
||||
if (location != WINED3D_LOCATION_SYSMEM && (surface->resource.locations & WINED3D_LOCATION_SYSMEM))
|
||||
surface_evict_sysmem(surface);
|
||||
@@ -4630,7 +4623,7 @@ static void ffp_blit_blit_surface(struct wined3d_device *device, DWORD filter,
|
||||
@@ -4553,7 +4546,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);
|
||||
|
||||
@@ -137,7 +137,7 @@ index 1dd4b69..4f646e4 100644
|
||||
surface_invalidate_location(dst_surface, ~dst_surface->container->resource.draw_binding);
|
||||
}
|
||||
|
||||
@@ -5610,7 +5603,7 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
@@ -5533,7 +5526,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);
|
||||
|
||||
@@ -146,7 +146,7 @@ index 1dd4b69..4f646e4 100644
|
||||
surface_invalidate_location(dst_surface, ~dst_surface->container->resource.draw_binding);
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -5700,7 +5693,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
|
||||
@@ -5623,7 +5616,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
|
||||
}
|
||||
|
||||
surface->container = container;
|
||||
@@ -155,7 +155,7 @@ index 1dd4b69..4f646e4 100644
|
||||
list_init(&surface->renderbuffers);
|
||||
list_init(&surface->overlays);
|
||||
|
||||
@@ -5732,7 +5725,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
|
||||
@@ -5655,7 +5648,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);
|
||||
@@ -165,43 +165,19 @@ index 1dd4b69..4f646e4 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
index cc7c3e0..b3c5b18 100644
|
||||
index 27bcf70..bbe1b63 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
|
||||
/* Tell the front buffer surface that is has been modified. However,
|
||||
* the other locations were preserved during that, so keep the flags.
|
||||
* This serves to update the emulated overlay, if any. */
|
||||
- surface_validate_location(front, WINED3D_LOCATION_DRAWABLE);
|
||||
+ wined3d_resource_validate_location(&front->resource, WINED3D_LOCATION_DRAWABLE);
|
||||
}
|
||||
else
|
||||
{
|
||||
- surface_validate_location(front, WINED3D_LOCATION_DRAWABLE);
|
||||
+ wined3d_resource_validate_location(&front->resource, WINED3D_LOCATION_DRAWABLE);
|
||||
surface_invalidate_location(front, ~WINED3D_LOCATION_DRAWABLE);
|
||||
- surface_validate_location(back_buffer, WINED3D_LOCATION_DRAWABLE);
|
||||
+ wined3d_resource_validate_location(&back_buffer->resource, WINED3D_LOCATION_DRAWABLE);
|
||||
surface_invalidate_location(back_buffer, ~WINED3D_LOCATION_DRAWABLE);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
- surface_validate_location(front, WINED3D_LOCATION_DRAWABLE);
|
||||
+ wined3d_resource_validate_location(&front->resource, WINED3D_LOCATION_DRAWABLE);
|
||||
surface_invalidate_location(front, ~WINED3D_LOCATION_DRAWABLE);
|
||||
/* If the swapeffect is DISCARD, the back buffer is undefined. That means the SYSMEM
|
||||
* and INTEXTURE copies can keep their old content if they have any defined content.
|
||||
@@ -590,7 +590,7 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
|
||||
*/
|
||||
if (swapchain->desc.swap_effect == WINED3D_SWAP_EFFECT_FLIP)
|
||||
{
|
||||
- surface_validate_location(back_buffer, back_buffer->container->resource.draw_binding);
|
||||
+ wined3d_resource_validate_location(&back_buffer->resource, back_buffer->container->resource.draw_binding);
|
||||
surface_invalidate_location(back_buffer, ~back_buffer->container->resource.draw_binding);
|
||||
}
|
||||
}
|
||||
@@ -858,7 +858,7 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3
|
||||
@@ -556,7 +556,7 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
|
||||
|
||||
front = surface_from_resource(wined3d_texture_get_sub_resource(swapchain->front_buffer, 0));
|
||||
|
||||
- surface_validate_location(front, WINED3D_LOCATION_DRAWABLE);
|
||||
+ wined3d_resource_validate_location(&front->resource, WINED3D_LOCATION_DRAWABLE);
|
||||
surface_invalidate_location(front, ~WINED3D_LOCATION_DRAWABLE);
|
||||
/* If the swapeffect is DISCARD, the back buffer is undefined. That means the SYSMEM
|
||||
* and INTEXTURE copies can keep their old content if they have any defined content.
|
||||
@@ -829,7 +829,7 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3
|
||||
front_buffer = surface_from_resource(wined3d_texture_get_sub_resource(swapchain->front_buffer, 0));
|
||||
if (!(device->wined3d->flags & WINED3D_NO3D))
|
||||
{
|
||||
@@ -226,7 +202,7 @@ index 187862c..7671f46 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 140588e..ef2dfa7 100644
|
||||
index 2353881..e1f211f 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2447,7 +2447,6 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From fe1d9b795638409df399927a874d91ee301b39e1 Mon Sep 17 00:00:00 2001
|
||||
From d63992004de850506b8f90ce5b80f9f73bcaad92 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.
|
||||
@@ -9,16 +9,16 @@ Subject: wined3d: Remove surface_invalidate_location.
|
||||
dlls/wined3d/device.c | 4 ++--
|
||||
dlls/wined3d/drawprim.c | 2 +-
|
||||
dlls/wined3d/surface.c | 45 ++++++++++++++++-----------------------
|
||||
dlls/wined3d/swapchain.c | 12 +++++------
|
||||
dlls/wined3d/swapchain.c | 6 +++---
|
||||
dlls/wined3d/texture.c | 6 ++----
|
||||
dlls/wined3d/wined3d_private.h | 1 -
|
||||
8 files changed, 31 insertions(+), 43 deletions(-)
|
||||
8 files changed, 28 insertions(+), 40 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
|
||||
index 8f74bf6..71c7c2e 100644
|
||||
index 582746c..79333e3 100644
|
||||
--- a/dlls/wined3d/arb_program_shader.c
|
||||
+++ b/dlls/wined3d/arb_program_shader.c
|
||||
@@ -7865,7 +7865,7 @@ static void arbfp_blit_surface(struct wined3d_device *device, DWORD filter,
|
||||
@@ -7887,7 +7887,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);
|
||||
@@ -28,7 +28,7 @@ index 8f74bf6..71c7c2e 100644
|
||||
|
||||
static HRESULT arbfp_blit_color_fill(struct wined3d_device *device, struct wined3d_surface *dst_surface,
|
||||
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
index b900417..4752fff 100644
|
||||
index 31fafca..0986050 100644
|
||||
--- a/dlls/wined3d/context.c
|
||||
+++ b/dlls/wined3d/context.c
|
||||
@@ -3281,7 +3281,7 @@ static void context_setup_target(struct wined3d_context *context, struct wined3d
|
||||
@@ -41,7 +41,7 @@ index b900417..4752fff 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index a30c618..a127f9d 100644
|
||||
index 8c995be..d2a08c4 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
|
||||
@@ -53,7 +53,7 @@ index a30c618..a127f9d 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4058,7 +4058,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
@@ -4042,7 +4042,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
context_release(context);
|
||||
|
||||
wined3d_resource_validate_location(&surface->resource, WINED3D_LOCATION_TEXTURE_RGB);
|
||||
@@ -63,7 +63,7 @@ index a30c618..a127f9d 100644
|
||||
|
||||
HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *device,
|
||||
diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c
|
||||
index 4d47a21..8a27363 100644
|
||||
index afccecd..d756182 100644
|
||||
--- a/dlls/wined3d/drawprim.c
|
||||
+++ b/dlls/wined3d/drawprim.c
|
||||
@@ -629,7 +629,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
|
||||
@@ -76,7 +76,7 @@ index 4d47a21..8a27363 100644
|
||||
}
|
||||
}
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 3dfa290..0a22b3d 100644
|
||||
index bc31454..ad9310a 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -599,7 +599,7 @@ static void surface_evict_sysmem(struct wined3d_surface *surface)
|
||||
@@ -163,7 +163,7 @@ index 3dfa290..0a22b3d 100644
|
||||
if (context)
|
||||
context_release(context);
|
||||
}
|
||||
@@ -3281,7 +3284,7 @@ static void fb_copy_to_texture_direct(struct wined3d_surface *dst_surface, struc
|
||||
@@ -3213,7 +3216,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);
|
||||
@@ -172,7 +172,7 @@ index 3dfa290..0a22b3d 100644
|
||||
}
|
||||
|
||||
/* Uses the hardware to stretch and flip the image */
|
||||
@@ -3349,7 +3352,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
|
||||
@@ -3281,7 +3284,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 */
|
||||
@@ -181,7 +181,7 @@ index 3dfa290..0a22b3d 100644
|
||||
}
|
||||
|
||||
/* Make sure that the top pixel is always above the bottom pixel, and keep a separate upside down flag
|
||||
@@ -3554,7 +3557,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
|
||||
@@ -3486,7 +3489,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);
|
||||
@@ -190,7 +190,7 @@ index 3dfa290..0a22b3d 100644
|
||||
}
|
||||
|
||||
/* Front buffer coordinates are always full screen coordinates, but our GL
|
||||
@@ -4059,18 +4062,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
@@ -3991,18 +3994,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
surface->ds_current_size.cy = surface->resource.height;
|
||||
}
|
||||
|
||||
@@ -209,7 +209,7 @@ index 3dfa290..0a22b3d 100644
|
||||
static DWORD resource_access_from_location(DWORD location)
|
||||
{
|
||||
switch (location)
|
||||
@@ -4620,7 +4611,7 @@ static void ffp_blit_blit_surface(struct wined3d_device *device, DWORD filter,
|
||||
@@ -4553,7 +4544,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);
|
||||
@@ -218,7 +218,7 @@ index 3dfa290..0a22b3d 100644
|
||||
}
|
||||
|
||||
const struct blit_shader ffp_blit = {
|
||||
@@ -5600,7 +5591,7 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
@@ -5533,7 +5524,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);
|
||||
@@ -227,7 +227,7 @@ index 3dfa290..0a22b3d 100644
|
||||
|
||||
return WINED3D_OK;
|
||||
}
|
||||
@@ -5730,7 +5721,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
|
||||
@@ -5655,7 +5646,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);
|
||||
@@ -237,7 +237,7 @@ index 3dfa290..0a22b3d 100644
|
||||
|
||||
return hr;
|
||||
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
index cd1aabd..74aefd5 100644
|
||||
index bbe1b63..4f6be9e 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
|
||||
@@ -249,35 +249,16 @@ index cd1aabd..74aefd5 100644
|
||||
swapchain->render_to_fbo = TRUE;
|
||||
swapchain_update_draw_bindings(swapchain);
|
||||
}
|
||||
@@ -574,15 +574,15 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
|
||||
else
|
||||
{
|
||||
wined3d_resource_validate_location(&front->resource, WINED3D_LOCATION_DRAWABLE);
|
||||
- surface_invalidate_location(front, ~WINED3D_LOCATION_DRAWABLE);
|
||||
+ wined3d_resource_invalidate_location(&front->resource, ~WINED3D_LOCATION_DRAWABLE);
|
||||
wined3d_resource_validate_location(&back_buffer->resource, WINED3D_LOCATION_DRAWABLE);
|
||||
- surface_invalidate_location(back_buffer, ~WINED3D_LOCATION_DRAWABLE);
|
||||
+ wined3d_resource_invalidate_location(&back_buffer->resource, ~WINED3D_LOCATION_DRAWABLE);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
wined3d_resource_validate_location(&front->resource, WINED3D_LOCATION_DRAWABLE);
|
||||
- surface_invalidate_location(front, ~WINED3D_LOCATION_DRAWABLE);
|
||||
+ wined3d_resource_invalidate_location(&front->resource, ~WINED3D_LOCATION_DRAWABLE);
|
||||
/* If the swapeffect is DISCARD, the back buffer is undefined. That means the SYSMEM
|
||||
* and INTEXTURE copies can keep their old content if they have any defined content.
|
||||
* If the swapeffect is COPY, the content remains the same. If it is FLIP however,
|
||||
@@ -591,7 +591,7 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
|
||||
if (swapchain->desc.swap_effect == WINED3D_SWAP_EFFECT_FLIP)
|
||||
{
|
||||
wined3d_resource_validate_location(&back_buffer->resource, back_buffer->container->resource.draw_binding);
|
||||
- surface_invalidate_location(back_buffer, ~back_buffer->container->resource.draw_binding);
|
||||
+ wined3d_resource_invalidate_location(&back_buffer->resource, ~back_buffer->container->resource.draw_binding);
|
||||
}
|
||||
}
|
||||
@@ -557,7 +557,7 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
|
||||
front = surface_from_resource(wined3d_texture_get_sub_resource(swapchain->front_buffer, 0));
|
||||
|
||||
@@ -866,7 +866,7 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3
|
||||
wined3d_resource_validate_location(&front->resource, WINED3D_LOCATION_DRAWABLE);
|
||||
- surface_invalidate_location(front, ~WINED3D_LOCATION_DRAWABLE);
|
||||
+ wined3d_resource_invalidate_location(&front->resource, ~WINED3D_LOCATION_DRAWABLE);
|
||||
/* If the swapeffect is DISCARD, the back buffer is undefined. That means the SYSMEM
|
||||
* and INTEXTURE copies can keep their old content if they have any defined content.
|
||||
* If the swapeffect is COPY, the content remains the same.
|
||||
@@ -830,7 +830,7 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3
|
||||
if (!(device->wined3d->flags & WINED3D_NO3D))
|
||||
{
|
||||
wined3d_resource_validate_location(&front_buffer->resource, WINED3D_LOCATION_DRAWABLE);
|
||||
@@ -287,10 +268,10 @@ index cd1aabd..74aefd5 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 b596aef..3e4e65d 100644
|
||||
index 0f06e55..f43929b 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -781,7 +781,7 @@ static void texture2d_sub_resource_add_dirty_region(struct wined3d_resource *sub
|
||||
@@ -775,7 +775,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);
|
||||
@@ -299,7 +280,7 @@ index b596aef..3e4e65d 100644
|
||||
}
|
||||
|
||||
static void texture2d_sub_resource_cleanup(struct wined3d_resource *sub_resource)
|
||||
@@ -793,9 +793,7 @@ static void texture2d_sub_resource_cleanup(struct wined3d_resource *sub_resource
|
||||
@@ -787,9 +787,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)
|
||||
{
|
||||
@@ -311,7 +292,7 @@ index b596aef..3e4e65d 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 0612b17..e0bcbba 100644
|
||||
index 2ada21f..9d2e40a 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2429,7 +2429,6 @@ HRESULT surface_color_fill(struct wined3d_surface *s,
|
||||
@@ -323,5 +304,5 @@ index 0612b17..e0bcbba 100644
|
||||
void surface_load_ds_location(struct wined3d_surface *surface,
|
||||
struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
|
||||
--
|
||||
2.5.0
|
||||
2.5.1
|
||||
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
From 2341723442d5ab7fb42bb82d066b306cc458813d Mon Sep 17 00:00:00 2001
|
||||
From 00f61862ec59e32534adfabc359009143a9b9651 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Thu, 16 Jan 2014 22:04:55 +0100
|
||||
Subject: wined3d: Move bitmap_data and user_memory into the resource.
|
||||
|
||||
I may want to change this to keep this in the surface. Not sure yet.
|
||||
---
|
||||
dlls/wined3d/surface.c | 32 ++++++++++++++++----------------
|
||||
dlls/wined3d/surface.c | 26 +++++++++++++-------------
|
||||
dlls/wined3d/swapchain.c | 6 +++---
|
||||
dlls/wined3d/wined3d_private.h | 4 +---
|
||||
3 files changed, 20 insertions(+), 22 deletions(-)
|
||||
3 files changed, 17 insertions(+), 19 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index ef52ed0..c689880 100644
|
||||
index ad9310a..65eefa9 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -88,7 +88,7 @@ static void surface_cleanup(struct wined3d_surface *surface)
|
||||
@@ -75,7 +75,7 @@ index ef52ed0..c689880 100644
|
||||
break;
|
||||
|
||||
case WINED3D_LOCATION_BUFFER:
|
||||
@@ -2190,7 +2190,7 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
|
||||
@@ -2100,7 +2100,7 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
|
||||
{
|
||||
DeleteDC(surface->hDC);
|
||||
DeleteObject(surface->dib.DIBsection);
|
||||
@@ -84,7 +84,7 @@ index ef52ed0..c689880 100644
|
||||
surface->flags &= ~SFLAG_DIBSECTION;
|
||||
create_dib = TRUE;
|
||||
}
|
||||
@@ -2222,7 +2222,7 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
|
||||
@@ -2132,7 +2132,7 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
|
||||
else
|
||||
surface->flags &= ~SFLAG_NONPOW2;
|
||||
|
||||
@@ -93,7 +93,7 @@ index ef52ed0..c689880 100644
|
||||
{
|
||||
surface->resource.map_binding = WINED3D_LOCATION_USER_MEMORY;
|
||||
valid_location = WINED3D_LOCATION_USER_MEMORY;
|
||||
@@ -2680,11 +2680,11 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
|
||||
@@ -2750,11 +2750,11 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
|
||||
break;
|
||||
|
||||
case WINED3D_LOCATION_USER_MEMORY:
|
||||
@@ -107,24 +107,11 @@ index ef52ed0..c689880 100644
|
||||
break;
|
||||
|
||||
case WINED3D_LOCATION_BUFFER:
|
||||
@@ -3052,9 +3052,9 @@ void flip_surface(struct wined3d_surface *front, struct wined3d_surface *back)
|
||||
{
|
||||
void* tmp;
|
||||
|
||||
- tmp = front->dib.bitmap_data;
|
||||
- front->dib.bitmap_data = back->dib.bitmap_data;
|
||||
- back->dib.bitmap_data = tmp;
|
||||
+ tmp = front->resource.bitmap_data;
|
||||
+ front->resource.bitmap_data = back->resource.bitmap_data;
|
||||
+ back->resource.bitmap_data = tmp;
|
||||
|
||||
tmp = front->resource.heap_memory;
|
||||
front->resource.heap_memory = back->resource.heap_memory;
|
||||
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
index e64715e..17f1afe 100644
|
||||
index 4f6be9e..d0b8cf0 100644
|
||||
--- a/dlls/wined3d/swapchain.c
|
||||
+++ b/dlls/wined3d/swapchain.c
|
||||
@@ -695,9 +695,9 @@ static void swapchain_gdi_present(struct wined3d_swapchain *swapchain, const REC
|
||||
@@ -666,9 +666,9 @@ static void swapchain_gdi_present(struct wined3d_swapchain *swapchain, const REC
|
||||
{
|
||||
void *tmp;
|
||||
|
||||
@@ -138,10 +125,10 @@ index e64715e..17f1afe 100644
|
||||
if (front->resource.heap_memory)
|
||||
ERR("GDI Surface %p has heap memory allocated.\n", front);
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 640aa95..52280a7 100644
|
||||
index 9d2e40a..3776439 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2080,7 +2080,7 @@ struct wined3d_resource
|
||||
@@ -2164,7 +2164,7 @@ struct wined3d_resource
|
||||
UINT depth;
|
||||
UINT size;
|
||||
DWORD priority;
|
||||
@@ -150,7 +137,7 @@ index 640aa95..52280a7 100644
|
||||
UINT custom_row_pitch, custom_slice_pitch;
|
||||
struct list resource_list_entry;
|
||||
DWORD locations;
|
||||
@@ -2263,7 +2263,6 @@ void wined3d_volume_upload_data(struct wined3d_volume *volume, const struct wine
|
||||
@@ -2343,7 +2343,6 @@ void wined3d_volume_upload_data(struct wined3d_volume *volume, const struct wine
|
||||
struct wined3d_surface_dib
|
||||
{
|
||||
HBITMAP DIBsection;
|
||||
@@ -158,7 +145,7 @@ index 640aa95..52280a7 100644
|
||||
UINT bitmap_size;
|
||||
};
|
||||
|
||||
@@ -2297,7 +2296,6 @@ struct wined3d_surface
|
||||
@@ -2377,7 +2376,6 @@ struct wined3d_surface
|
||||
struct wined3d_resource resource;
|
||||
const struct wined3d_surface_ops *surface_ops;
|
||||
struct wined3d_texture *container;
|
||||
@@ -167,5 +154,5 @@ index 640aa95..52280a7 100644
|
||||
DWORD flags;
|
||||
|
||||
--
|
||||
2.1.3
|
||||
2.5.1
|
||||
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
From b8a17a0ce26bee0843d1bab91a435575751b7063 Mon Sep 17 00:00:00 2001
|
||||
From 2e105cc77b4f86b1dc044e3dc174a61df5d30a43 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Tue, 21 Jan 2014 13:25:48 +0100
|
||||
Subject: wined3d: Remove surface->pbo.
|
||||
|
||||
---
|
||||
dlls/wined3d/surface.c | 42 +++++++++++++++++++++---------------------
|
||||
dlls/wined3d/surface.c | 36 ++++++++++++++++++------------------
|
||||
dlls/wined3d/wined3d_private.h | 2 --
|
||||
2 files changed, 21 insertions(+), 23 deletions(-)
|
||||
2 files changed, 18 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 1496beb..e534a9f 100644
|
||||
index 58d825c..4cdd104 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -46,7 +46,7 @@ static void surface_cleanup(struct wined3d_surface *surface)
|
||||
@@ -79,7 +79,7 @@ index 1496beb..e534a9f 100644
|
||||
GL_EXTCALL(glUnmapBuffer(GL_PIXEL_UNPACK_BUFFER));
|
||||
GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0));
|
||||
checkGLcall("glUnmapBuffer");
|
||||
@@ -1181,10 +1181,10 @@ HRESULT CDECL wined3d_surface_get_render_target_data(struct wined3d_surface *sur
|
||||
@@ -1127,10 +1127,10 @@ HRESULT CDECL wined3d_surface_get_render_target_data(struct wined3d_surface *sur
|
||||
/* Context activation is done by the caller. */
|
||||
static void surface_remove_pbo(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info)
|
||||
{
|
||||
@@ -93,7 +93,7 @@ index 1496beb..e534a9f 100644
|
||||
wined3d_resource_invalidate_location(&surface->resource, WINED3D_LOCATION_BUFFER);
|
||||
}
|
||||
|
||||
@@ -1241,7 +1241,7 @@ static void surface_unload(struct wined3d_resource *resource)
|
||||
@@ -1187,7 +1187,7 @@ static void surface_unload(struct wined3d_resource *resource)
|
||||
}
|
||||
|
||||
/* Destroy PBOs, but load them into real sysmem before */
|
||||
@@ -102,7 +102,7 @@ index 1496beb..e534a9f 100644
|
||||
surface_remove_pbo(surface, gl_info);
|
||||
|
||||
/* Destroy fbo render buffers. This is needed for implicit render targets, for
|
||||
@@ -2837,7 +2837,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
|
||||
@@ -2753,7 +2753,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
|
||||
context = context_acquire(device, NULL);
|
||||
gl_info = context->gl_info;
|
||||
|
||||
@@ -111,7 +111,7 @@ index 1496beb..e534a9f 100644
|
||||
base_memory = GL_EXTCALL(glMapBuffer(GL_PIXEL_UNPACK_BUFFER, GL_READ_WRITE));
|
||||
GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0));
|
||||
checkGLcall("map PBO");
|
||||
@@ -2928,7 +2928,7 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
|
||||
@@ -2844,7 +2844,7 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
|
||||
}
|
||||
if (!(surface->resource.map_binding == WINED3D_LOCATION_USER_MEMORY
|
||||
|| surface->container->flags & WINED3D_TEXTURE_PIN_SYSMEM
|
||||
@@ -120,20 +120,7 @@ index 1496beb..e534a9f 100644
|
||||
surface->resource.map_binding = WINED3D_LOCATION_DIB;
|
||||
}
|
||||
|
||||
@@ -3209,9 +3209,9 @@ void flip_surface(struct wined3d_surface *front, struct wined3d_surface *back)
|
||||
|
||||
/* Flip the PBO */
|
||||
{
|
||||
- GLuint tmp_pbo = front->pbo;
|
||||
- front->pbo = back->pbo;
|
||||
- back->pbo = tmp_pbo;
|
||||
+ GLuint tmp_pbo = front->resource.buffer_object;
|
||||
+ front->resource.buffer_object = back->resource.buffer_object;
|
||||
+ back->resource.buffer_object = tmp_pbo;
|
||||
}
|
||||
|
||||
/* Flip the opengl texture */
|
||||
@@ -4388,7 +4388,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4180,7 +4180,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
/* Don't use PBOs for converted surfaces. During PBO conversion we look at
|
||||
* WINED3D_TEXTURE_CONVERTED but it isn't set (yet) in all cases it is
|
||||
* getting called. */
|
||||
@@ -143,10 +130,10 @@ index 1496beb..e534a9f 100644
|
||||
TRACE("Removing the pbo attached to surface %p.\n", surface);
|
||||
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 8cce2d9..7efecd4 100644
|
||||
index f948f73..839dc7f 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2324,8 +2324,6 @@ struct wined3d_surface
|
||||
@@ -2390,8 +2390,6 @@ struct wined3d_surface
|
||||
UINT pow2Width;
|
||||
UINT pow2Height;
|
||||
|
||||
@@ -156,5 +143,5 @@ index 8cce2d9..7efecd4 100644
|
||||
GLuint rb_resolved;
|
||||
GLenum texture_target;
|
||||
--
|
||||
2.2.1
|
||||
2.5.1
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 33832b5fb0f7d3c8a0f93d4e3f3d7e1d4de0e6df Mon Sep 17 00:00:00 2001
|
||||
From de1d4bc66eb1356415957721c76db10213d2f48b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Thu, 19 Sep 2013 13:08:33 +0200
|
||||
Subject: wined3d: Don't try to flip sysmem copies in swapchain_present.
|
||||
@@ -7,67 +7,32 @@ This was once an optimization for ddraw applications that mapped the
|
||||
backbuffer to render movies. It doesn't work any more in the intended
|
||||
fashion.
|
||||
---
|
||||
dlls/wined3d/swapchain.c | 46 +++++++++-------------------------------------
|
||||
1 file changed, 9 insertions(+), 37 deletions(-)
|
||||
dlls/wined3d/swapchain.c | 12 +++++++-----
|
||||
1 file changed, 7 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
index e1a5b8a..05f68f7 100644
|
||||
index cf2543e..3214fe5 100644
|
||||
--- a/dlls/wined3d/swapchain.c
|
||||
+++ b/dlls/wined3d/swapchain.c
|
||||
@@ -555,44 +555,16 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
|
||||
}
|
||||
|
||||
front = surface_from_resource(wined3d_texture_get_sub_resource(swapchain->front_buffer, 0));
|
||||
- if (!swapchain->render_to_fbo && ((front->resource.locations & WINED3D_LOCATION_SYSMEM)
|
||||
- || (back_buffer->resource.locations & WINED3D_LOCATION_SYSMEM)))
|
||||
+ wined3d_resource_validate_location(&front->resource, WINED3D_LOCATION_DRAWABLE);
|
||||
+ wined3d_resource_invalidate_location(&front->resource, ~WINED3D_LOCATION_DRAWABLE);
|
||||
+ /* If the swapeffect is DISCARD, the back buffer is undefined. That means the SYSMEM
|
||||
+ * and INTEXTURE copies can keep their old content if they have any defined content.
|
||||
@@ -560,11 +560,13 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
|
||||
wined3d_resource_invalidate_location(&front->resource, ~WINED3D_LOCATION_DRAWABLE);
|
||||
/* If the swapeffect is DISCARD, the back buffer is undefined. That means the SYSMEM
|
||||
* and INTEXTURE copies can keep their old content if they have any defined content.
|
||||
- * If the swapeffect is COPY, the content remains the same.
|
||||
- *
|
||||
- * The FLIP swap effect is not implemented yet. We could mark WINED3D_LOCATION_DRAWABLE
|
||||
- * up to date and hope WGL flipped front and back buffers and read this data into
|
||||
- * the FBO. Don't bother about this for now. */
|
||||
+ * If the swapeffect is COPY, the content remains the same. If it is FLIP however,
|
||||
+ * the texture / sysmem copy needs to be reloaded from the drawable. */
|
||||
+ if (swapchain->desc.swap_effect == WINED3D_SWAP_EFFECT_FLIP)
|
||||
{
|
||||
- /* 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
|
||||
- */
|
||||
-
|
||||
- if (front->resource.size == back_buffer->resource.size)
|
||||
- {
|
||||
- flip_surface(front, back_buffer);
|
||||
-
|
||||
- /* Tell the front buffer surface that is has been modified. However,
|
||||
- * the other locations were preserved during that, so keep the flags.
|
||||
- * This serves to update the emulated overlay, if any. */
|
||||
- wined3d_resource_validate_location(&front->resource, WINED3D_LOCATION_DRAWABLE);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- wined3d_resource_validate_location(&front->resource, WINED3D_LOCATION_DRAWABLE);
|
||||
- wined3d_resource_invalidate_location(&front->resource, ~WINED3D_LOCATION_DRAWABLE);
|
||||
- wined3d_resource_validate_location(&back_buffer->resource, WINED3D_LOCATION_DRAWABLE);
|
||||
- wined3d_resource_invalidate_location(&back_buffer->resource, ~WINED3D_LOCATION_DRAWABLE);
|
||||
- }
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- wined3d_resource_validate_location(&front->resource, WINED3D_LOCATION_DRAWABLE);
|
||||
- wined3d_resource_invalidate_location(&front->resource, ~WINED3D_LOCATION_DRAWABLE);
|
||||
- /* If the swapeffect is DISCARD, the back buffer is undefined. That means the SYSMEM
|
||||
- * and INTEXTURE copies can keep their old content if they have any defined content.
|
||||
- * If the swapeffect is COPY, the content remains the same. If it is FLIP however,
|
||||
- * the texture / sysmem copy needs to be reloaded from the drawable
|
||||
- */
|
||||
- if (swapchain->desc.swap_effect == WINED3D_SWAP_EFFECT_FLIP)
|
||||
- {
|
||||
- wined3d_resource_validate_location(&back_buffer->resource, back_buffer->container->resource.draw_binding);
|
||||
- wined3d_resource_invalidate_location(&back_buffer->resource, ~back_buffer->container->resource.draw_binding);
|
||||
- }
|
||||
+ {
|
||||
+ wined3d_resource_validate_location(&back_buffer->resource, back_buffer->container->resource.draw_binding);
|
||||
+ wined3d_resource_invalidate_location(&back_buffer->resource, ~back_buffer->container->resource.draw_binding);
|
||||
}
|
||||
+ }
|
||||
|
||||
if (fb->depth_stencil)
|
||||
{
|
||||
--
|
||||
2.1.3
|
||||
2.5.1
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From bcd6f4338c70693ca49ce0775bdd08a2527db255 Mon Sep 17 00:00:00 2001
|
||||
From 01caa2176ef522267e3d187ff15ad5bf0372cebd Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Thu, 19 Sep 2013 13:09:58 +0200
|
||||
Subject: wined3d: Discard the backbuffer in discard presents.
|
||||
@@ -8,11 +8,11 @@ Subject: wined3d: Discard the backbuffer in discard presents.
|
||||
1 file changed, 12 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
index 05f68f7..dd7d2c7 100644
|
||||
index 3214fe5..bb11450 100644
|
||||
--- a/dlls/wined3d/swapchain.c
|
||||
+++ b/dlls/wined3d/swapchain.c
|
||||
@@ -557,14 +557,19 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
|
||||
front = surface_from_resource(wined3d_texture_get_sub_resource(swapchain->front_buffer, 0));
|
||||
@@ -558,14 +558,19 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
|
||||
|
||||
wined3d_resource_validate_location(&front->resource, WINED3D_LOCATION_DRAWABLE);
|
||||
wined3d_resource_invalidate_location(&front->resource, ~WINED3D_LOCATION_DRAWABLE);
|
||||
- /* If the swapeffect is DISCARD, the back buffer is undefined. That means the SYSMEM
|
||||
@@ -39,5 +39,5 @@ index 05f68f7..dd7d2c7 100644
|
||||
|
||||
if (fb->depth_stencil)
|
||||
--
|
||||
2.1.3
|
||||
2.5.1
|
||||
|
||||
|
||||
@@ -1,115 +1,25 @@
|
||||
From 883b523131797cfb6e3c715ff8018850d48734a6 Mon Sep 17 00:00:00 2001
|
||||
From 82924b72e422eb595162fd0b54ca93dd2ef540c8 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Tue, 6 Aug 2013 17:39:26 +0200
|
||||
Subject: wined3d: Send flips through the command stream
|
||||
|
||||
TODO: This remove this patch and flip_surface / surface_flip.
|
||||
---
|
||||
dlls/wined3d/surface.c | 77 ------------------------------------------
|
||||
dlls/wined3d/wined3d_private.h | 2 +-
|
||||
2 files changed, 1 insertion(+), 78 deletions(-)
|
||||
dlls/wined3d/wined3d_private.h | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index b19355c..0c3313d 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -2758,83 +2758,6 @@ void surface_prepare_rb(struct wined3d_surface *surface, const struct wined3d_gl
|
||||
}
|
||||
}
|
||||
|
||||
-void flip_surface(struct wined3d_surface *front, struct wined3d_surface *back)
|
||||
-{
|
||||
- if (front->container->level_count != 1 || front->container->layer_count != 1
|
||||
- || back->container->level_count != 1 || back->container->layer_count != 1)
|
||||
- ERR("Flip between surfaces %p and %p not supported.\n", front, back);
|
||||
-
|
||||
- /* Flip the surface contents */
|
||||
- /* Flip the DC */
|
||||
- {
|
||||
- HDC tmp;
|
||||
- tmp = front->hDC;
|
||||
- front->hDC = back->hDC;
|
||||
- back->hDC = tmp;
|
||||
- }
|
||||
-
|
||||
- /* Flip the DIBsection */
|
||||
- {
|
||||
- HBITMAP tmp = front->dib.DIBsection;
|
||||
- front->dib.DIBsection = back->dib.DIBsection;
|
||||
- back->dib.DIBsection = tmp;
|
||||
- }
|
||||
-
|
||||
- /* Flip the surface data */
|
||||
- {
|
||||
- void* tmp;
|
||||
-
|
||||
- tmp = front->resource.bitmap_data;
|
||||
- front->resource.bitmap_data = back->resource.bitmap_data;
|
||||
- back->resource.bitmap_data = tmp;
|
||||
-
|
||||
- tmp = front->resource.heap_memory;
|
||||
- front->resource.heap_memory = back->resource.heap_memory;
|
||||
- back->resource.heap_memory = tmp;
|
||||
- }
|
||||
-
|
||||
- /* Flip the PBO */
|
||||
- {
|
||||
- GLuint tmp_pbo = front->resource.buffer_object;
|
||||
- front->resource.buffer_object = back->resource.buffer_object;
|
||||
- back->resource.buffer_object = tmp_pbo;
|
||||
- }
|
||||
-
|
||||
- /* Flip the opengl texture */
|
||||
- {
|
||||
- GLuint tmp;
|
||||
-
|
||||
- tmp = back->container->texture_rgb.name;
|
||||
- back->container->texture_rgb.name = front->container->texture_rgb.name;
|
||||
- front->container->texture_rgb.name = tmp;
|
||||
-
|
||||
- tmp = back->container->texture_srgb.name;
|
||||
- back->container->texture_srgb.name = front->container->texture_srgb.name;
|
||||
- front->container->texture_srgb.name = tmp;
|
||||
-
|
||||
- tmp = back->rb_multisample;
|
||||
- back->rb_multisample = front->rb_multisample;
|
||||
- front->rb_multisample = tmp;
|
||||
-
|
||||
- tmp = back->rb_resolved;
|
||||
- back->rb_resolved = front->rb_resolved;
|
||||
- front->rb_resolved = tmp;
|
||||
-
|
||||
- resource_unload(&back->resource);
|
||||
- resource_unload(&front->resource);
|
||||
- }
|
||||
-
|
||||
- {
|
||||
- DWORD tmp_flags = back->flags;
|
||||
- back->flags = front->flags;
|
||||
- front->flags = tmp_flags;
|
||||
-
|
||||
- tmp_flags = back->resource.locations;
|
||||
- back->resource.locations = front->resource.locations;
|
||||
- front->resource.locations = tmp_flags;
|
||||
- }
|
||||
-}
|
||||
-
|
||||
/* Does a direct frame buffer -> texture copy. Stretching is done with single
|
||||
* pixel copy calls. */
|
||||
static void fb_copy_to_texture_direct(struct wined3d_surface *dst_surface, struct wined3d_surface *src_surface,
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index b9eee2c..a2bee4d 100644
|
||||
index 1534a63..95e1f13 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2424,7 +2424,7 @@ BOOL surface_check_block_align(struct wined3d_surface *surface, const RECT *rect
|
||||
@@ -2505,6 +2505,7 @@ BOOL surface_check_block_align(struct wined3d_surface *surface, const RECT *rect
|
||||
|
||||
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;
|
||||
-void flip_surface(struct wined3d_surface *front, struct wined3d_surface *back) DECLSPEC_HIDDEN;
|
||||
+void surface_flip(struct wined3d_surface *front, struct wined3d_surface *back) DECLSPEC_HIDDEN;
|
||||
|
||||
/* Surface flags: */
|
||||
#define SFLAG_DIBSECTION 0x00000001 /* Has a DIB section attached for GetDC. */
|
||||
--
|
||||
2.1.3
|
||||
2.5.1
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user