Rebase against 1d19eb15d4abfdd14dccc5ac05b83c0ee1a1ace1.

This commit is contained in:
Sebastian Lackner 2015-11-25 20:24:27 +01:00
parent be3e802c6f
commit a990060062
16 changed files with 673 additions and 882 deletions

View File

@ -34,7 +34,7 @@ Wine. All those differences are also documented on the
Included bug fixes and improvements
-----------------------------------
**Bug fixes and features in Wine Staging 1.8-rc1 [268]:**
**Bug fixes and features in Wine Staging 1.8-rc2 [267]:**
*Note: The following list only contains features and bug fixes which are not
yet available in vanilla Wine. They are removed from the list as soon as they
@ -252,7 +252,6 @@ for more details.*
* Return dummy ID3DXSkinInfo interface when skinning info not present ([Wine Bug #33904](https://bugs.winehq.org/show_bug.cgi?id=33904))
* Return fake device type when systemroot is located on virtual disk ([Wine Bug #36546](https://bugs.winehq.org/show_bug.cgi?id=36546))
* Return proper status codes when NtReadFile/NtWriteFile is called on closed (but not disconnected) pipe
* Revert patch to prepare GL resources before calling context_apply_fbo_state ([Wine Bug #39536](https://bugs.winehq.org/show_bug.cgi?id=39536))
* SHFileOperation with FO_MOVE should create new directory on Vista+ ([Wine Bug #25207](https://bugs.winehq.org/show_bug.cgi?id=25207))
* SO_CONNECT_TIME returns the appropriate time
* Send WM_PAINT event during dialog creation ([Wine Bug #35652](https://bugs.winehq.org/show_bug.cgi?id=35652))

View File

@ -52,13 +52,13 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "a2c6a2beb68cae239d72e012aa8d4af113b8aaa7"
echo "1d19eb15d4abfdd14dccc5ac05b83c0ee1a1ace1"
}
# Show version information
version()
{
echo "Wine Staging 1.8-rc1"
echo "Wine Staging 1.8-rc2"
echo "Copyright (C) 2014-2015 the Wine Staging project authors."
echo ""
echo "Patchset to be applied on upstream Wine:"
@ -311,7 +311,6 @@ patch_enable_all ()
enable_wined3d_MESA_GPU_Info="$1"
enable_wined3d_Multisampling="$1"
enable_wined3d_Revert_PixelFormat="$1"
enable_wined3d_Revert_Prepare_GL_Resources="$1"
enable_wined3d_UnhandledBlendFactor="$1"
enable_wined3d_resource_check_usage="$1"
enable_wined3d_wined3d_swapchain_present="$1"
@ -1044,9 +1043,6 @@ patch_enable ()
wined3d-Revert_PixelFormat)
enable_wined3d_Revert_PixelFormat="$2"
;;
wined3d-Revert_Prepare_GL_Resources)
enable_wined3d_Revert_Prepare_GL_Resources="$2"
;;
wined3d-UnhandledBlendFactor)
enable_wined3d_UnhandledBlendFactor="$2"
;;
@ -1795,13 +1791,9 @@ if test "$enable_wined3d_CSMT_Helper" -eq 1; then
if test "$enable_wined3d_DXTn" -gt 1; then
abort "Patchset wined3d-DXTn disabled, but wined3d-CSMT_Helper depends on that."
fi
if test "$enable_wined3d_Revert_Prepare_GL_Resources" -gt 1; then
abort "Patchset wined3d-Revert_Prepare_GL_Resources disabled, but wined3d-CSMT_Helper depends on that."
fi
enable_makedep_PARENTSPEC=1
enable_ntdll_DllRedirects=1
enable_wined3d_DXTn=1
enable_wined3d_Revert_Prepare_GL_Resources=1
fi
if test "$enable_uxtheme_GTK_Theming" -eq 1; then
@ -5830,27 +5822,10 @@ if test "$enable_wined3d_Accounting" -eq 1; then
) >> "$patchlist"
fi
# Patchset wined3d-Revert_Prepare_GL_Resources
# |
# | This patchset fixes the following Wine bugs:
# | * [#39536] Revert patch to prepare GL resources before calling context_apply_fbo_state
# |
# | Modified files:
# | * dlls/wined3d/context.c, dlls/wined3d/device.c, dlls/wined3d/drawprim.c, dlls/wined3d/surface.c,
# | dlls/wined3d/wined3d_private.h
# |
if test "$enable_wined3d_Revert_Prepare_GL_Resources" -eq 1; then
patch_apply wined3d-Revert_Prepare_GL_Resources/0001-Revert-wined3d-Prepare-GL-resources-before-calling-c.patch
(
echo '+ { "Sebastian Lackner", "Revert \"wined3d: Prepare GL resources before calling context_apply_fbo_state.\".", 1 },';
) >> "$patchlist"
fi
# Patchset wined3d-CSMT_Helper
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * makedep-PARENTSPEC, ntdll-DllOverrides_WOW64, ntdll-Loader_Machine_Type, ntdll-DllRedirects, wined3d-DXTn, wined3d-
# | Revert_Prepare_GL_Resources
# | * makedep-PARENTSPEC, ntdll-DllOverrides_WOW64, ntdll-Loader_Machine_Type, ntdll-DllRedirects, wined3d-DXTn
# |
# | Modified files:
# | * configure.ac, dlls/d3d11/device.c, dlls/d3d11/texture.c, dlls/d3d8/surface.c, dlls/d3d8/volume.c, dlls/d3d9/surface.c,
@ -5984,7 +5959,7 @@ fi
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * makedep-PARENTSPEC, ntdll-DllOverrides_WOW64, ntdll-Loader_Machine_Type, ntdll-DllRedirects, wined3d-DXTn, wined3d-
# | Revert_Prepare_GL_Resources, wined3d-CSMT_Helper
# | CSMT_Helper
# |
# | This patchset fixes the following Wine bugs:
# | * [#11674] Support for CSMT (command stream) to increase graphic performance

View File

@ -1,4 +1,3 @@
Depends: wined3d-DXTn
Depends: wined3d-Revert_Prepare_GL_Resources
Depends: makedep-PARENTSPEC
Depends: ntdll-DllRedirects

View File

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

View File

@ -1,4 +1,4 @@
From d0e2c459cceb86d34019f95a6ec9910eaeba00f9 Mon Sep 17 00:00:00 2001
From 135a0ad96a413720dd7bc3af682b39b8bc6de16f 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,15 +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 | 93 ++++++++++++++++++++-------------------
dlls/wined3d/surface.c | 97 ++++++++++++++++++++-------------------
dlls/wined3d/wined3d_private.h | 1 -
5 files changed, 51 insertions(+), 51 deletions(-)
5 files changed, 53 insertions(+), 53 deletions(-)
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
index 9ac6666..d576869 100644
index 2af9845..e8526d8 100644
--- a/dlls/wined3d/arb_program_shader.c
+++ b/dlls/wined3d/arb_program_shader.c
@@ -7850,7 +7850,7 @@ static void arbfp_blit_surface(struct wined3d_device *device, DWORD filter,
@@ -7851,7 +7851,7 @@ static void arbfp_blit_surface(struct wined3d_device *device, DWORD filter,
/* Now load the surface */
if (wined3d_settings.offscreen_rendering_mode != ORM_FBO
@ -25,7 +25,7 @@ index 9ac6666..d576869 100644
&& !wined3d_resource_is_offscreen(&src_surface->container->resource))
{
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 0da8607..b6c98ef 100644
index 170536d..14f28a6 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
@ -47,10 +47,10 @@ index 0da8607..b6c98ef 100644
ds->ds_current_size.cx,
ds->ds_current_size.cy);
diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c
index d2d3bce..afccecd 100644
index 3761830..943a829 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
@@ -655,7 +655,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
if (!context->render_offscreen && ds != device->onscreen_depth_stencil)
device_switch_onscreen_ds(device, context, ds);
@ -60,7 +60,7 @@ index d2d3bce..afccecd 100644
else
SetRectEmpty(&current_rect);
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index dc5d249..e937e36 100644
index e9af37e..dd26bb0 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -556,7 +556,7 @@ static void surface_prepare_system_memory(struct wined3d_surface *surface)
@ -90,7 +90,7 @@ index dc5d249..e937e36 100644
{
TRACE("Not dirtified, nothing to do.\n");
return;
@@ -1680,7 +1680,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
@@ -1693,7 +1693,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
surface_load_location(dst_surface, context, WINED3D_LOCATION_TEXTURE_RGB);
wined3d_texture_bind_and_dirtify(dst_surface->container, context, FALSE);
@ -99,7 +99,7 @@ index dc5d249..e937e36 100644
wined3d_resource_get_pitch(&src_surface->resource, &src_row_pitch, &src_slice_pitch);
wined3d_surface_upload_data(dst_surface, gl_info, src_format, src_rect,
@@ -1803,7 +1803,7 @@ void surface_load(struct wined3d_surface *surface, struct wined3d_context *conte
@@ -1816,7 +1816,7 @@ void surface_load(struct wined3d_surface *surface, struct wined3d_context *conte
if (surface->resource.pool == WINED3D_POOL_SCRATCH)
ERR("Not supported on scratch surfaces.\n");
@ -108,7 +108,7 @@ index dc5d249..e937e36 100644
{
TRACE("surface is already in texture\n");
return;
@@ -2069,7 +2069,7 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
@@ -2082,7 +2082,7 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
create_dib = TRUE;
}
@ -117,7 +117,7 @@ index dc5d249..e937e36 100644
wined3d_resource_free_sysmem(&surface->resource);
width = texture_resource->width;
@@ -3245,7 +3245,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
@@ -3258,7 +3258,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
checkGLcall("glEnable(texture_target)");
/* For now invalidate the texture copy of the back buffer. Drawable and sysmem copy are untouched */
@ -126,7 +126,7 @@ index dc5d249..e937e36 100644
}
/* Make sure that the top pixel is always above the bottom pixel, and keep a separate upside down flag
@@ -3772,13 +3772,14 @@ void surface_modify_ds_location(struct wined3d_surface *surface,
@@ -3785,13 +3785,14 @@ void surface_modify_ds_location(struct wined3d_surface *surface,
{
TRACE("surface %p, new location %#x, w %u, h %u.\n", surface, location, w, h);
@ -144,7 +144,7 @@ index dc5d249..e937e36 100644
}
/* Context activation is done by the caller. */
@@ -3793,7 +3794,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
@@ -3806,7 +3807,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
/* TODO: Make this work for modes other than FBO */
if (wined3d_settings.offscreen_rendering_mode != ORM_FBO) return;
@ -153,7 +153,7 @@ index dc5d249..e937e36 100644
{
w = surface->ds_current_size.cx;
h = surface->ds_current_size.cy;
@@ -3819,7 +3820,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
@@ -3832,21 +3833,21 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
return;
}
@ -161,11 +161,7 @@ index dc5d249..e937e36 100644
+ if (surface->resource.locations & WINED3D_LOCATION_DISCARDED)
{
TRACE("Surface was discarded, no need copy data.\n");
switch (location)
@@ -3839,17 +3840,17 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
default:
FIXME("Unhandled location %#x\n", location);
}
wined3d_surface_prepare(surface, context, location);
- surface->locations &= ~WINED3D_LOCATION_DISCARDED;
- surface->locations |= location;
+ surface->resource.locations &= ~WINED3D_LOCATION_DISCARDED;
@ -184,7 +180,7 @@ index dc5d249..e937e36 100644
surface->ds_current_size.cx = surface->resource.width;
surface->ds_current_size.cy = surface->resource.height;
return;
@@ -3937,7 +3938,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
@@ -3934,7 +3935,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
ERR("Invalid location (%#x) specified.\n", location);
}
@ -193,7 +189,7 @@ index dc5d249..e937e36 100644
surface->ds_current_size.cx = surface->resource.width;
surface->ds_current_size.cy = surface->resource.height;
}
@@ -3946,7 +3947,7 @@ void surface_validate_location(struct wined3d_surface *surface, DWORD location)
@@ -3943,7 +3944,7 @@ void surface_validate_location(struct wined3d_surface *surface, DWORD location)
{
TRACE("surface %p, location %s.\n", surface, wined3d_debug_location(location));
@ -202,7 +198,7 @@ index dc5d249..e937e36 100644
}
void surface_invalidate_location(struct wined3d_surface *surface, DWORD location)
@@ -3955,9 +3956,9 @@ void surface_invalidate_location(struct wined3d_surface *surface, DWORD location
@@ -3952,9 +3953,9 @@ void surface_invalidate_location(struct wined3d_surface *surface, DWORD location
if (location & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB))
wined3d_texture_set_dirty(surface->container);
@ -214,7 +210,7 @@ index dc5d249..e937e36 100644
ERR("Surface %p does not have any up to date location.\n", surface);
}
@@ -3993,7 +3994,7 @@ static void surface_copy_simple_location(struct wined3d_surface *surface, DWORD
@@ -3990,7 +3991,7 @@ static void surface_copy_simple_location(struct wined3d_surface *surface, DWORD
UINT size = surface->resource.size;
surface_get_memory(surface, &dst, location);
@ -223,7 +219,7 @@ index dc5d249..e937e36 100644
if (dst.buffer_object)
{
@@ -4026,33 +4027,33 @@ static void surface_load_sysmem(struct wined3d_surface *surface,
@@ -4023,33 +4024,33 @@ static void surface_load_sysmem(struct wined3d_surface *surface,
{
const struct wined3d_gl_info *gl_info = context->gl_info;
@ -263,7 +259,7 @@ index dc5d249..e937e36 100644
}
/* Context activation is done by the caller. */
@@ -4092,14 +4093,14 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4089,14 +4090,14 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
if (wined3d_settings.offscreen_rendering_mode != ORM_FBO
&& wined3d_resource_is_offscreen(&texture->resource)
@ -280,7 +276,7 @@ index dc5d249..e937e36 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,
@@ -4115,13 +4116,13 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4112,13 +4113,13 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
return WINED3D_OK;
}
@ -296,7 +292,7 @@ index dc5d249..e937e36 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};
@@ -4136,7 +4137,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4133,7 +4134,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
if (srgb)
{
@ -305,7 +301,7 @@ index dc5d249..e937e36 100644
== WINED3D_LOCATION_TEXTURE_RGB)
{
/* Performance warning... */
@@ -4147,7 +4148,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4144,7 +4145,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
}
else
{
@ -314,7 +310,7 @@ index dc5d249..e937e36 100644
== WINED3D_LOCATION_TEXTURE_SRGB)
{
/* Performance warning... */
@@ -4157,7 +4158,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4154,7 +4155,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
}
}
@ -323,7 +319,7 @@ index dc5d249..e937e36 100644
{
WARN("Trying to load a texture from sysmem, but no simple location is valid.\n");
/* Lets hope we get it from somewhere... */
@@ -4192,7 +4193,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4189,7 +4190,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
surface_remove_pbo(surface, gl_info);
}
@ -332,16 +328,22 @@ index dc5d249..e937e36 100644
if (format.convert)
{
/* This code is entered for texture formats which need a fixup. */
@@ -4248,7 +4249,7 @@ static void surface_multisample_resolve(struct wined3d_surface *surface, struct
{
RECT rect = {0, 0, surface->resource.width, surface->resource.height};
@@ -4247,11 +4248,11 @@ static void surface_load_renderbuffer(struct wined3d_surface *surface, struct wi
const RECT rect = {0, 0, surface->resource.width, surface->resource.height};
DWORD src_location;
- if (!(surface->locations & WINED3D_LOCATION_RB_MULTISAMPLE))
+ if (!(surface->resource.locations & WINED3D_LOCATION_RB_MULTISAMPLE))
ERR("Trying to resolve multisampled surface %p, but location WINED3D_LOCATION_RB_MULTISAMPLE not current.\n",
surface);
@@ -4266,12 +4267,12 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
- if (surface->locations & WINED3D_LOCATION_RB_MULTISAMPLE)
+ if (surface->resource.locations & WINED3D_LOCATION_RB_MULTISAMPLE)
src_location = WINED3D_LOCATION_RB_MULTISAMPLE;
- else if (surface->locations & WINED3D_LOCATION_RB_RESOLVED)
+ else if (surface->resource.locations & WINED3D_LOCATION_RB_RESOLVED)
src_location = WINED3D_LOCATION_RB_RESOLVED;
- else if (surface->locations & WINED3D_LOCATION_TEXTURE_SRGB)
+ else if (surface->resource.locations & WINED3D_LOCATION_TEXTURE_SRGB)
src_location = WINED3D_LOCATION_TEXTURE_SRGB;
else /* surface_blt_fbo will load the source location if necessary. */
src_location = WINED3D_LOCATION_TEXTURE_RGB;
@@ -4270,12 +4271,12 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
if (surface->resource.usage & WINED3DUSAGE_DEPTHSTENCIL)
{
if (location == WINED3D_LOCATION_TEXTURE_RGB
@ -356,7 +358,7 @@ index dc5d249..e937e36 100644
&& surface->container->resource.draw_binding != WINED3D_LOCATION_DRAWABLE)
{
/* Already up to date, nothing to do. */
@@ -4280,12 +4281,12 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
@@ -4284,12 +4285,12 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
else
{
FIXME("Unimplemented copy from %s to %s for depth/stencil buffers.\n",
@ -371,7 +373,7 @@ index dc5d249..e937e36 100644
{
TRACE("Location already up to date.\n");
return;
@@ -4299,7 +4300,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
@@ -4303,7 +4304,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
required_access, surface->resource.access_flags);
}
@ -380,7 +382,7 @@ index dc5d249..e937e36 100644
{
ERR("Surface %p does not have any up to date location.\n", surface);
surface->flags |= SFLAG_LOST;
@@ -4338,7 +4339,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
@@ -4343,7 +4344,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
surface_validate_location(surface, location);
@ -389,7 +391,7 @@ index dc5d249..e937e36 100644
surface_evict_sysmem(surface);
return;
@@ -5390,8 +5391,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
@@ -5395,8 +5396,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
/* In principle this would apply to depth blits as well, but we don't
* implement those in the CPU blitter at the moment. */
@ -400,7 +402,7 @@ index dc5d249..e937e36 100644
{
if (scale)
TRACE("Not doing sysmem blit because of scaling.\n");
@@ -5431,8 +5432,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
@@ -5436,8 +5437,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
color_key = &src_surface->container->async.src_blt_color_key;
blit_op = WINED3D_BLIT_OP_COLOR_BLIT_CKEY;
}
@ -412,10 +414,10 @@ index dc5d249..e937e36 100644
/* Upload */
if (scale)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index f42325e..2a23afc 100644
index ea31e35..5abda05 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2401,7 +2401,6 @@ struct wined3d_surface
@@ -2407,7 +2407,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 e8ce3e8bef910f4908f92344d7c2d60abfa61935 Mon Sep 17 00:00:00 2001
From 808dc946d520997b207c6dbea8c034465ea26c41 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.
@ -6,17 +6,17 @@ 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/surface.c | 31 ++++++++++++-------------------
dlls/wined3d/swapchain.c | 4 ++--
dlls/wined3d/texture.c | 4 +---
dlls/wined3d/wined3d_private.h | 1 -
6 files changed, 17 insertions(+), 27 deletions(-)
6 files changed, 18 insertions(+), 28 deletions(-)
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
index fc91209..582746c 100644
index e8526d8..a87b09b 100644
--- a/dlls/wined3d/arb_program_shader.c
+++ b/dlls/wined3d/arb_program_shader.c
@@ -7886,7 +7886,7 @@ static void arbfp_blit_surface(struct wined3d_device *device, DWORD filter,
@@ -7888,7 +7888,7 @@ static void arbfp_blit_surface(struct wined3d_device *device, DWORD filter,
context_release(context);
@ -26,10 +26,10 @@ index fc91209..582746c 100644
}
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 1ef681a..2683140 100644
index 14f28a6..12bc454 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
@@ -397,7 +397,7 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
if (rt)
{
@ -38,7 +38,7 @@ index 1ef681a..2683140 100644
surface_invalidate_location(rt, ~rt->container->resource.draw_binding);
}
}
@@ -4041,7 +4041,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
@@ -4018,7 +4018,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
context_release(context);
@ -48,19 +48,27 @@ index 1ef681a..2683140 100644
}
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index d1493a2..dac754e 100644
index dd26bb0..afbb97e 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -1170,7 +1170,7 @@ static void surface_unload(struct wined3d_resource *resource)
@@ -1158,14 +1158,14 @@ 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);
- surface_validate_location(surface, WINED3D_LOCATION_SYSMEM);
+ wined3d_resource_validate_location(&surface->resource, WINED3D_LOCATION_SYSMEM);
surface_invalidate_location(surface, ~WINED3D_LOCATION_SYSMEM);
if (resource->usage & WINED3DUSAGE_DEPTHSTENCIL)
{
- surface_validate_location(surface, WINED3D_LOCATION_DISCARDED);
+ wined3d_resource_validate_location(&surface->resource, WINED3D_LOCATION_DISCARDED);
surface_invalidate_location(surface, ~WINED3D_LOCATION_DISCARDED);
}
else
{
surface_prepare_system_memory(surface);
memset(surface->resource.heap_memory, 0, surface->resource.size);
- surface_validate_location(surface, WINED3D_LOCATION_SYSMEM);
+ wined3d_resource_validate_location(&surface->resource, WINED3D_LOCATION_SYSMEM);
surface_invalidate_location(surface, ~WINED3D_LOCATION_SYSMEM);
}
/* We also get here when the ddraw swapchain is destroyed, for example
@@ -1683,7 +1683,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
@@ -1701,7 +1701,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
context_release(context);
@ -69,7 +77,7 @@ index d1493a2..dac754e 100644
surface_invalidate_location(dst_surface, ~WINED3D_LOCATION_TEXTURE_RGB);
return WINED3D_OK;
@@ -2169,7 +2169,7 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
@@ -2155,7 +2155,7 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
valid_location = WINED3D_LOCATION_SYSMEM;
}
@ -78,7 +86,7 @@ index d1493a2..dac754e 100644
return WINED3D_OK;
}
@@ -2715,7 +2715,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
@@ -2701,7 +2701,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));
@ -87,7 +95,7 @@ index d1493a2..dac754e 100644
}
else
{
@@ -3206,7 +3206,7 @@ static void fb_copy_to_texture_direct(struct wined3d_surface *dst_surface, struc
@@ -3189,7 +3189,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 +104,7 @@ index d1493a2..dac754e 100644
surface_invalidate_location(dst_surface, ~WINED3D_LOCATION_TEXTURE_RGB);
}
@@ -3479,7 +3479,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
@@ -3462,7 +3462,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 +113,7 @@ index d1493a2..dac754e 100644
surface_invalidate_location(dst_surface, ~WINED3D_LOCATION_TEXTURE_RGB);
}
@@ -3985,13 +3985,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
@@ -3940,13 +3940,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
surface->ds_current_size.cy = surface->resource.height;
}
@ -119,7 +127,7 @@ index d1493a2..dac754e 100644
void surface_invalidate_location(struct wined3d_surface *surface, DWORD location)
{
TRACE("surface %p, location %s.\n", surface, wined3d_debug_location(location));
@@ -4379,7 +4372,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
@@ -4342,7 +4335,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
break;
}
@ -128,7 +136,7 @@ index d1493a2..dac754e 100644
if (location != WINED3D_LOCATION_SYSMEM && (surface->resource.locations & WINED3D_LOCATION_SYSMEM))
surface_evict_sysmem(surface);
@@ -4553,7 +4546,7 @@ static void ffp_blit_blit_surface(struct wined3d_device *device, DWORD filter,
@@ -4516,7 +4509,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 +145,7 @@ index d1493a2..dac754e 100644
surface_invalidate_location(dst_surface, ~dst_surface->container->resource.draw_binding);
}
@@ -5533,7 +5526,7 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
@@ -5497,7 +5490,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 +154,7 @@ index d1493a2..dac754e 100644
surface_invalidate_location(dst_surface, ~dst_surface->container->resource.draw_binding);
return WINED3D_OK;
@@ -5623,7 +5616,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
@@ -5587,7 +5580,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
}
surface->container = container;
@ -155,7 +163,7 @@ index d1493a2..dac754e 100644
list_init(&surface->renderbuffers);
list_init(&surface->overlays);
@@ -5655,7 +5648,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
@@ -5619,7 +5612,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,10 +173,10 @@ index d1493a2..dac754e 100644
}
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
index 27bcf70..bbe1b63 100644
index e45fe17..9758be4 100644
--- a/dlls/wined3d/swapchain.c
+++ b/dlls/wined3d/swapchain.c
@@ -556,7 +556,7 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
@@ -562,7 +562,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));
@ -177,7 +185,7 @@ index 27bcf70..bbe1b63 100644
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
@@ -835,7 +835,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))
{
@ -187,10 +195,10 @@ index 27bcf70..bbe1b63 100644
}
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index 187862c..7671f46 100644
index 0f40a3c..6b41db8 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -794,9 +794,7 @@ static void texture2d_sub_resource_invalidate_location(struct wined3d_resource *
@@ -795,9 +795,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)
{
@ -202,10 +210,10 @@ 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 2353881..e1f211f 100644
index 5abda05..b0b0d0b 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,
@@ -2477,7 +2477,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;
@ -214,5 +222,5 @@ index 2353881..e1f211f 100644
GLenum target, unsigned int level, unsigned int layer, DWORD flags,
struct wined3d_surface **surface) DECLSPEC_HIDDEN;
--
2.5.1
2.6.2

View File

@ -1,4 +1,4 @@
From 855de6d9c2e7e1254123141eb8962061e1234d0a Mon Sep 17 00:00:00 2001
From b868f6317602bb184f3f0ef13c191905096ad342 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.
@ -8,17 +8,17 @@ Subject: wined3d: Remove surface_invalidate_location.
dlls/wined3d/context.c | 2 +-
dlls/wined3d/device.c | 4 ++--
dlls/wined3d/drawprim.c | 2 +-
dlls/wined3d/surface.c | 45 ++++++++++++++++-----------------------
dlls/wined3d/swapchain.c | 6 +++---
dlls/wined3d/texture.c | 6 ++----
dlls/wined3d/surface.c | 47 ++++++++++++++++-----------------------
dlls/wined3d/swapchain.c | 6 ++---
dlls/wined3d/texture.c | 6 ++---
dlls/wined3d/wined3d_private.h | 1 -
8 files changed, 28 insertions(+), 40 deletions(-)
8 files changed, 29 insertions(+), 41 deletions(-)
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
index d080585..9a882cc 100644
index a87b09b..4df6e2f 100644
--- a/dlls/wined3d/arb_program_shader.c
+++ b/dlls/wined3d/arb_program_shader.c
@@ -7888,7 +7888,7 @@ static void arbfp_blit_surface(struct wined3d_device *device, DWORD filter,
@@ -7889,7 +7889,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,10 +28,10 @@ index d080585..9a882cc 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 97f3c04..abc41dc 100644
index 0e8b32b..52fb407 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -3295,7 +3295,7 @@ static void context_setup_target(struct wined3d_context *context, struct wined3d
@@ -3298,7 +3298,7 @@ static void context_setup_target(struct wined3d_context *context, struct wined3d
if (texture->texture_srgb.name)
wined3d_texture_load(texture, context, TRUE);
wined3d_texture_load(texture, context, FALSE);
@ -41,10 +41,10 @@ index 97f3c04..abc41dc 100644
}
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 86671dd..5f2fa7c 100644
index 58478ba..77ea1e9 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
@@ -398,7 +398,7 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
if (rt)
{
wined3d_resource_validate_location(&rt->resource, rt->container->resource.draw_binding);
@ -53,7 +53,7 @@ index 86671dd..5f2fa7c 100644
}
}
@@ -4013,7 +4013,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
@@ -4019,7 +4019,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,20 +63,20 @@ index 86671dd..5f2fa7c 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 afccecd..d756182 100644
index 943a829..95245a9 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
if (target)
@@ -628,7 +628,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
if (state->render_states[WINED3D_RS_COLORWRITEENABLE])
{
surface_load_location(target, context, target->container->resource.draw_binding);
- surface_invalidate_location(target, ~target->container->resource.draw_binding);
+ wined3d_resource_invalidate_location(&target->resource, ~target->container->resource.draw_binding);
}
}
}
else
{
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 596ad5c..307ac96 100644
index 74d3878..35e7adf 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -599,7 +599,7 @@ static void surface_evict_sysmem(struct wined3d_surface *surface)
@ -88,7 +88,7 @@ index 596ad5c..307ac96 100644
}
static void surface_release_client_storage(struct wined3d_surface *surface)
@@ -1114,7 +1114,7 @@ static void surface_remove_pbo(struct wined3d_surface *surface, const struct win
@@ -1119,7 +1119,7 @@ static void surface_remove_pbo(struct wined3d_surface *surface, const struct win
checkGLcall("glDeleteBuffers(1, &surface->pbo)");
surface->pbo = 0;
@ -97,16 +97,24 @@ index 596ad5c..307ac96 100644
}
static ULONG surface_resource_incref(struct wined3d_resource *resource)
@@ -1154,7 +1154,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);
- surface_invalidate_location(surface, ~WINED3D_LOCATION_SYSMEM);
+ wined3d_resource_invalidate_location(&surface->resource, ~WINED3D_LOCATION_SYSMEM);
@@ -1159,14 +1159,14 @@ static void surface_unload(struct wined3d_resource *resource)
if (resource->usage & WINED3DUSAGE_DEPTHSTENCIL)
{
wined3d_resource_validate_location(&surface->resource, WINED3D_LOCATION_DISCARDED);
- surface_invalidate_location(surface, ~WINED3D_LOCATION_DISCARDED);
+ wined3d_resource_invalidate_location(&surface->resource, ~WINED3D_LOCATION_DISCARDED);
}
else
{
surface_prepare_system_memory(surface);
memset(surface->resource.heap_memory, 0, surface->resource.size);
wined3d_resource_validate_location(&surface->resource, WINED3D_LOCATION_SYSMEM);
- surface_invalidate_location(surface, ~WINED3D_LOCATION_SYSMEM);
+ wined3d_resource_invalidate_location(&surface->resource, ~WINED3D_LOCATION_SYSMEM);
}
/* We also get here when the ddraw swapchain is destroyed, for example
* for a mode switch. In this case this surface won't necessarily be
@@ -1166,7 +1166,7 @@ static void surface_unload(struct wined3d_resource *resource)
@@ -1179,7 +1179,7 @@ static void surface_unload(struct wined3d_resource *resource)
{
surface_prepare_map_memory(surface);
surface_load_location(surface, context, surface->resource.map_binding);
@ -115,7 +123,7 @@ index 596ad5c..307ac96 100644
}
/* Destroy PBOs, but load them into real sysmem before */
@@ -1217,7 +1217,10 @@ static HRESULT surface_resource_sub_resource_unmap(struct wined3d_resource *reso
@@ -1230,7 +1230,10 @@ static HRESULT surface_resource_sub_resource_unmap(struct wined3d_resource *reso
static void wined3d_surface_location_invalidated(struct wined3d_resource *resource, DWORD location)
{
@ -127,7 +135,7 @@ index 596ad5c..307ac96 100644
}
static const struct wined3d_resource_ops surface_resource_ops =
@@ -1695,7 +1698,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
@@ -1708,7 +1711,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);
@ -136,7 +144,7 @@ index 596ad5c..307ac96 100644
return WINED3D_OK;
}
@@ -2711,7 +2714,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
@@ -2724,7 +2727,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
}
if (!(flags & (WINED3D_MAP_NO_DIRTY_UPDATE | WINED3D_MAP_READONLY)))
@ -145,7 +153,7 @@ index 596ad5c..307ac96 100644
switch (surface->resource.map_binding)
{
@@ -2827,7 +2830,7 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
@@ -2840,7 +2843,7 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
}
surface_load_location(surface, context, WINED3D_LOCATION_DIB);
@ -154,7 +162,7 @@ index 596ad5c..307ac96 100644
if (context)
context_release(context);
@@ -2876,7 +2879,7 @@ HRESULT CDECL wined3d_surface_releasedc(struct wined3d_surface *surface, HDC dc)
@@ -2889,7 +2892,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);
@ -163,7 +171,7 @@ index 596ad5c..307ac96 100644
if (context)
context_release(context);
}
@@ -3183,7 +3186,7 @@ static void fb_copy_to_texture_direct(struct wined3d_surface *dst_surface, struc
@@ -3196,7 +3199,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 +180,7 @@ index 596ad5c..307ac96 100644
}
/* Uses the hardware to stretch and flip the image */
@@ -3251,7 +3254,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
@@ -3264,7 +3267,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 +189,7 @@ index 596ad5c..307ac96 100644
}
/* Make sure that the top pixel is always above the bottom pixel, and keep a separate upside down flag
@@ -3456,7 +3459,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
@@ -3469,7 +3472,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 +198,7 @@ index 596ad5c..307ac96 100644
}
/* Front buffer coordinates are always full screen coordinates, but our GL
@@ -3949,18 +3952,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
@@ -3946,18 +3949,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
surface->ds_current_size.cy = surface->resource.height;
}
@ -209,7 +217,7 @@ index 596ad5c..307ac96 100644
static DWORD resource_access_from_location(DWORD location)
{
switch (location)
@@ -4511,7 +4502,7 @@ static void ffp_blit_blit_surface(struct wined3d_device *device, DWORD filter,
@@ -4516,7 +4507,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 +226,7 @@ index 596ad5c..307ac96 100644
}
const struct blit_shader ffp_blit = {
@@ -5492,7 +5483,7 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
@@ -5497,7 +5488,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 +235,7 @@ index 596ad5c..307ac96 100644
return WINED3D_OK;
}
@@ -5614,7 +5605,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
@@ -5619,7 +5610,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);
@ -292,10 +300,10 @@ index 7e31832..be378fc 100644
static void texture2d_sub_resource_validate_location(struct wined3d_resource *sub_resource, DWORD location)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index da39f65..f20121e 100644
index 4c1e3e4..3e07a16 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2452,7 +2452,6 @@ HRESULT surface_color_fill(struct wined3d_surface *s,
@@ -2458,7 +2458,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;

View File

@ -1,4 +1,4 @@
From 4c30573555207c5e8fa9518f50c611446c89097c Mon Sep 17 00:00:00 2001
From b26629e64f25b8a3a431f7b784fc4d70d1539c48 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Sun, 17 Nov 2013 20:33:17 +0100
Subject: wined3d: Replace surface_load_location with resource_load_location.
@ -15,10 +15,10 @@ FIXME: Check if this patch is complete enough to make sense.
7 files changed, 46 insertions(+), 89 deletions(-)
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index abc41dc..a9d6664 100644
index 52fb407..15a2dc3 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -2293,7 +2293,7 @@ static void context_validate_onscreen_formats(struct wined3d_context *context,
@@ -2287,7 +2287,7 @@ static void context_validate_onscreen_formats(struct wined3d_context *context,
WARN("Depth stencil format is not supported by WGL, rendering the backbuffer in an FBO\n");
/* The currently active context is the necessary context to access the swapchain's onscreen buffers */
@ -28,19 +28,19 @@ index abc41dc..a9d6664 100644
swapchain_update_draw_bindings(swapchain);
context_set_render_offscreen(context, TRUE);
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 5f2fa7c..1dc934d 100644
index 77ea1e9..367dc22 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -323,7 +323,7 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
if (rt && rt->resource.format->id != WINED3DFMT_NULL)
{
struct wined3d_surface *rt = wined3d_rendertarget_view_get_surface(fb->render_targets[i]);
if (rt)
if (flags & WINED3DCLEAR_TARGET && !is_full_clear(target, draw_rect, clear_rect))
- surface_load_location(rt, context, rt->container->resource.draw_binding);
+ wined3d_resource_load_location(&rt->resource, context, rt->container->resource.draw_binding);
else
wined3d_surface_prepare(rt, context, rt->container->resource.draw_binding);
}
}
@@ -4004,7 +4004,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
@@ -4010,7 +4010,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
&& src_rect.bottom == sub_resource->height)
wined3d_texture_prepare_texture(texture, context, FALSE);
else
@ -50,20 +50,20 @@ index 5f2fa7c..1dc934d 100644
wined3d_surface_upload_data(surface, gl_info, resource->format,
diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c
index d756182..0e1f4ec 100644
index 95245a9..4b01b7d 100644
--- a/dlls/wined3d/drawprim.c
+++ b/dlls/wined3d/drawprim.c
@@ -628,7 +628,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
struct wined3d_surface *target = wined3d_rendertarget_view_get_surface(device->fb.render_targets[i]);
if (target)
@@ -627,7 +627,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
{
if (state->render_states[WINED3D_RS_COLORWRITEENABLE])
{
- surface_load_location(target, context, target->container->resource.draw_binding);
+ wined3d_resource_load_location(&target->resource, context, target->container->resource.draw_binding);
wined3d_resource_invalidate_location(&target->resource, ~target->container->resource.draw_binding);
}
}
else
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 0b1716e..c0f7479 100644
index 9aff2f2..421b1ed 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -759,7 +759,7 @@ static void surface_unmap(struct wined3d_surface *surface)
@ -84,10 +84,10 @@ index 0b1716e..c0f7479 100644
if (!surface_is_full_rect(dst_surface, dst_rect))
- surface_load_location(dst_surface, context, dst_location);
+ wined3d_resource_load_location(&dst_surface->resource, context, dst_location);
else
wined3d_surface_prepare(dst_surface, context, dst_location);
gl_info = context->gl_info;
@@ -916,9 +916,9 @@ static void surface_blt_fbo(const struct wined3d_device *device,
@@ -918,9 +918,9 @@ static void surface_blt_fbo(const struct wined3d_device *device,
* surface isn't required if the entire surface is overwritten. (And is
* in fact harmful if we're being called by surface_load_location() with
* the purpose of loading the destination surface.) */
@ -96,10 +96,10 @@ index 0b1716e..c0f7479 100644
if (!surface_is_full_rect(dst_surface, &dst_rect))
- surface_load_location(dst_surface, old_ctx, dst_location);
+ wined3d_resource_load_location(&dst_surface->resource, old_ctx, dst_location);
else
wined3d_surface_prepare(dst_surface, old_ctx, dst_location);
if (src_location == WINED3D_LOCATION_DRAWABLE) required_rt = src_surface;
else if (dst_location == WINED3D_LOCATION_DRAWABLE) required_rt = dst_surface;
@@ -1165,7 +1165,7 @@ static void surface_unload(struct wined3d_resource *resource)
@@ -1178,7 +1178,7 @@ static void surface_unload(struct wined3d_resource *resource)
else
{
surface_prepare_map_memory(surface);
@ -108,7 +108,7 @@ index 0b1716e..c0f7479 100644
wined3d_resource_invalidate_location(&surface->resource, ~surface->resource.map_binding);
}
@@ -1223,24 +1223,6 @@ static void wined3d_surface_location_invalidated(struct wined3d_resource *resour
@@ -1236,24 +1236,6 @@ static void wined3d_surface_location_invalidated(struct wined3d_resource *resour
wined3d_texture_set_dirty(surface->container);
}
@ -133,7 +133,7 @@ index 0b1716e..c0f7479 100644
static const struct wined3d_surface_ops surface_ops =
{
surface_private_setup,
@@ -1694,7 +1676,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
@@ -1707,7 +1689,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
if (update_w == dst_w && update_h == dst_h)
wined3d_texture_prepare_texture(dst_surface->container, context, FALSE);
else
@ -142,7 +142,7 @@ index 0b1716e..c0f7479 100644
wined3d_texture_bind_and_dirtify(dst_surface->container, context, FALSE);
surface_get_memory(src_surface, &data, src_surface->resource.locations);
@@ -1827,7 +1809,7 @@ void surface_load(struct wined3d_surface *surface, struct wined3d_context *conte
@@ -1840,7 +1822,7 @@ void surface_load(struct wined3d_surface *surface, struct wined3d_context *conte
}
TRACE("Reloading because surface is dirty.\n");
@ -151,7 +151,7 @@ index 0b1716e..c0f7479 100644
surface_evict_sysmem(surface);
}
@@ -2716,7 +2698,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
@@ -2729,7 +2711,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
if (surface->resource.device->d3d_initialized)
context = context_acquire(surface->resource.device, NULL);
@ -160,7 +160,7 @@ index 0b1716e..c0f7479 100644
if (context)
context_release(context);
}
@@ -2821,7 +2803,7 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
@@ -2834,7 +2816,7 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
{
if (surface->flags & SFLAG_CLIENT)
{
@ -169,7 +169,7 @@ index 0b1716e..c0f7479 100644
surface_release_client_storage(surface);
}
hr = surface_create_dib_section(surface);
@@ -2837,7 +2819,7 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
@@ -2850,7 +2832,7 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
surface->resource.map_binding = WINED3D_LOCATION_DIB;
}
@ -178,7 +178,7 @@ index 0b1716e..c0f7479 100644
wined3d_resource_invalidate_location(&surface->resource, ~WINED3D_LOCATION_DIB);
if (context)
@@ -2886,7 +2868,7 @@ HRESULT CDECL wined3d_surface_releasedc(struct wined3d_surface *surface, HDC dc)
@@ -2899,7 +2881,7 @@ HRESULT CDECL wined3d_surface_releasedc(struct wined3d_surface *surface, HDC dc)
if (device->d3d_initialized)
context = context_acquire(device, NULL);
@ -187,7 +187,7 @@ index 0b1716e..c0f7479 100644
wined3d_resource_invalidate_location(&surface->resource, WINED3D_LOCATION_DIB);
if (context)
context_release(context);
@@ -3523,8 +3505,8 @@ static void surface_blt_to_drawable(const struct wined3d_device *device,
@@ -3536,8 +3518,8 @@ static void surface_blt_to_drawable(const struct wined3d_device *device,
gl_info = context->gl_info;
/* Make sure the surface is up-to-date. This should probably use
@ -198,7 +198,7 @@ index 0b1716e..c0f7479 100644
wined3d_texture_load(src_surface->container, context, FALSE);
/* Activate the destination context, set it up for blitting */
@@ -3960,29 +3942,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
@@ -3957,29 +3939,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
surface->ds_current_size.cy = surface->resource.height;
}
@ -228,7 +228,7 @@ index 0b1716e..c0f7479 100644
static void surface_copy_simple_location(struct wined3d_surface *surface, DWORD location)
{
struct wined3d_device *device = surface->resource.device;
@@ -4032,7 +3991,7 @@ static void surface_load_sysmem(struct wined3d_surface *surface,
@@ -4029,7 +3988,7 @@ static void surface_load_sysmem(struct wined3d_surface *surface,
}
if (surface->resource.locations & (WINED3D_LOCATION_RB_MULTISAMPLE | WINED3D_LOCATION_RB_RESOLVED))
@ -237,7 +237,7 @@ index 0b1716e..c0f7479 100644
/* Download the surface to system memory. */
if (surface->resource.locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB))
@@ -4068,7 +4027,7 @@ static HRESULT surface_load_drawable(struct wined3d_surface *surface,
@@ -4065,7 +4024,7 @@ static HRESULT surface_load_drawable(struct wined3d_surface *surface,
}
surface_get_rect(surface, NULL, &r);
@ -246,7 +246,7 @@ index 0b1716e..c0f7479 100644
surface_blt_to_drawable(surface->resource.device, context,
WINED3D_TEXF_POINT, FALSE, surface, &r, surface, &r);
@@ -4141,7 +4100,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4138,7 +4097,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
/* Performance warning... */
FIXME("Downloading RGB surface %p to reload it as sRGB.\n", surface);
surface_prepare_map_memory(surface);
@ -255,7 +255,7 @@ index 0b1716e..c0f7479 100644
}
}
else
@@ -4152,7 +4111,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4149,7 +4108,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
/* Performance warning... */
FIXME("Downloading sRGB surface %p to reload it as RGB.\n", surface);
surface_prepare_map_memory(surface);
@ -264,7 +264,7 @@ index 0b1716e..c0f7479 100644
}
}
@@ -4161,7 +4120,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4158,7 +4117,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
WARN("Trying to load a texture from sysmem, but no simple location is valid.\n");
/* Lets hope we get it from somewhere... */
surface_prepare_system_memory(surface);
@ -273,7 +273,7 @@ index 0b1716e..c0f7479 100644
}
wined3d_texture_prepare_texture(texture, context, srgb);
@@ -4187,7 +4146,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4184,7 +4143,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
surface->resource.map_binding = WINED3D_LOCATION_SYSMEM;
surface_prepare_map_memory(surface);
@ -282,8 +282,8 @@ index 0b1716e..c0f7479 100644
surface_remove_pbo(surface, gl_info);
}
@@ -4255,9 +4214,11 @@ static void surface_multisample_resolve(struct wined3d_surface *surface, struct
surface, WINED3D_LOCATION_RB_MULTISAMPLE, &rect, surface, WINED3D_LOCATION_RB_RESOLVED, &rect);
@@ -4259,9 +4218,11 @@ static void surface_load_renderbuffer(struct wined3d_surface *surface, struct wi
surface, src_location, &rect, surface, dst_location, &rect);
}
-/* Context activation is done by the caller. Context may be NULL in ddraw-only mode. */
@ -296,7 +296,7 @@ index 0b1716e..c0f7479 100644
HRESULT hr;
TRACE("surface %p, location %s.\n", surface, wined3d_debug_location(location));
@@ -4284,20 +4245,6 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
@@ -4288,20 +4249,6 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
}
}
@ -317,7 +317,7 @@ index 0b1716e..c0f7479 100644
if (!surface->resource.locations)
{
ERR("Surface %p does not have any up to date location.\n", surface);
@@ -5447,7 +5394,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
@@ -5452,7 +5399,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
if (!wined3d_resource_is_offscreen(&dst_surface->container->resource))
{
struct wined3d_context *context = context_acquire(device, dst_surface);
@ -327,7 +327,7 @@ index 0b1716e..c0f7479 100644
context_release(context);
}
return WINED3D_OK;
@@ -5520,6 +5468,17 @@ cpu:
@@ -5525,6 +5473,17 @@ cpu:
return surface_cpu_blt(dst_surface, &dst_rect, src_surface, &src_rect, flags, fx, filter);
}
@ -398,18 +398,18 @@ index 2a183e8..29c7eec 100644
wined3d_resource_invalidate_location(&surface->resource, ~surface->resource.map_binding);
}
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 3a6309c..ff547d3 100644
index 031e684..879d5f0 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2460,8 +2460,6 @@ void surface_load_ds_location(struct wined3d_surface *surface,
@@ -2466,8 +2466,6 @@ void surface_load_ds_location(struct wined3d_surface *surface,
struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
void surface_load_fb_texture(struct wined3d_surface *surface, BOOL srgb,
struct wined3d_context *context) DECLSPEC_HIDDEN;
-void surface_load_location(struct wined3d_surface *surface,
- struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
void surface_modify_ds_location(struct wined3d_surface *surface, DWORD location, UINT w, UINT h) DECLSPEC_HIDDEN;
void surface_prepare_rb(struct wined3d_surface *surface,
const struct wined3d_gl_info *gl_info, BOOL multisample) DECLSPEC_HIDDEN;
void wined3d_surface_prepare(struct wined3d_surface *surface, struct wined3d_context *context,
DWORD location) DECLSPEC_HIDDEN;
--
2.6.2

View File

@ -1,17 +1,17 @@
From 50e46931f38887d0164033482e502f90ef806ffd Mon Sep 17 00:00:00 2001
From 5a18a8e392bd8e65126b384670e94297b6095aa1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Sat, 4 Jan 2014 13:20:25 +0100
Subject: wined3d: Discard implicit surfaces on unload.
---
dlls/wined3d/surface.c | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
dlls/wined3d/surface.c | 21 +++------------------
1 file changed, 3 insertions(+), 18 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 4a7e982..29f4563 100644
index 38af18c..5d97899 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -1190,16 +1190,9 @@ static void surface_unload(struct wined3d_resource *resource)
@@ -1124,24 +1124,9 @@ static void surface_unload(struct wined3d_resource *resource)
/* Default pool resources are supposed to be destroyed before Reset is called.
* Implicit resources stay however. So this means we have an implicit render target
* or depth stencil. The content may be destroyed, but we still have to tear down
@ -21,10 +21,18 @@ index 4a7e982..29f4563 100644
- * but we can't set the sysmem INDRAWABLE because when we're rendering the swapchain
- * or the depth stencil into an FBO the texture or render buffer will be removed
- * and all flags get lost */
- surface_prepare_system_memory(surface);
- memset(surface->resource.heap_memory, 0, surface->resource.size);
- wined3d_resource_validate_location(&surface->resource, WINED3D_LOCATION_SYSMEM);
- wined3d_resource_invalidate_location(&surface->resource, ~WINED3D_LOCATION_SYSMEM);
- if (resource->usage & WINED3DUSAGE_DEPTHSTENCIL)
- {
- wined3d_resource_validate_location(&surface->resource, WINED3D_LOCATION_DISCARDED);
- wined3d_resource_invalidate_location(&surface->resource, ~WINED3D_LOCATION_DISCARDED);
- }
- else
- {
- surface_prepare_system_memory(surface);
- memset(surface->resource.heap_memory, 0, surface->resource.size);
- wined3d_resource_validate_location(&surface->resource, WINED3D_LOCATION_SYSMEM);
- wined3d_resource_invalidate_location(&surface->resource, ~WINED3D_LOCATION_SYSMEM);
- }
+ * opengl resources, so we cannot leave early. */
+ wined3d_resource_validate_location(&surface->resource, WINED3D_LOCATION_DISCARDED);
+ wined3d_resource_invalidate_location(&surface->resource, ~WINED3D_LOCATION_DISCARDED);
@ -32,5 +40,5 @@ index 4a7e982..29f4563 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
--
2.1.3
2.6.2

View File

@ -1,4 +1,4 @@
From 8831f7064e0757addb08763c263bf7498f8a6f43 Mon Sep 17 00:00:00 2001
From 68280056e300f90beae6bac338aa94ebacaa4bfc 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
@ -42,10 +42,10 @@ index 9a882cc..df89a05 100644
}
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index a9d6664..9f8397f 100644
index 6d08df9..104172f 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -1513,6 +1513,12 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
@@ -1506,6 +1506,12 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
goto out;
}
@ -58,7 +58,7 @@ index a9d6664..9f8397f 100644
/* Initialize the texture unit mapping to a 1:1 mapping */
for (s = 0; s < MAX_COMBINED_SAMPLERS; ++s)
{
@@ -1840,6 +1846,7 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
@@ -1833,6 +1839,7 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
out:
device->shader_backend->shader_free_context_data(ret);
device->adapter->fragment_pipe->free_context_data(ret);
@ -66,7 +66,7 @@ index a9d6664..9f8397f 100644
HeapFree(GetProcessHeap(), 0, ret->free_event_queries);
HeapFree(GetProcessHeap(), 0, ret->free_occlusion_queries);
HeapFree(GetProcessHeap(), 0, ret->free_timestamp_queries);
@@ -1874,6 +1881,7 @@ void context_destroy(struct wined3d_device *device, struct wined3d_context *cont
@@ -1867,6 +1874,7 @@ void context_destroy(struct wined3d_device *device, struct wined3d_context *cont
device->shader_backend->shader_free_context_data(context);
device->adapter->fragment_pipe->free_context_data(context);
@ -74,7 +74,7 @@ index a9d6664..9f8397f 100644
HeapFree(GetProcessHeap(), 0, context->draw_buffers);
HeapFree(GetProcessHeap(), 0, context->blit_targets);
device_context_remove(device, context);
@@ -2385,7 +2393,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
@@ -2378,7 +2386,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
DWORD rt_mask = 0, *cur_mask;
UINT i;
@ -83,7 +83,7 @@ index a9d6664..9f8397f 100644
|| rt_count != context->gl_info->limits.buffers)
{
if (!context_validate_rt_config(rt_count, rts, dsv))
@@ -2430,6 +2438,8 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
@@ -2423,6 +2431,8 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
rt_mask = context_generate_rt_mask_no_fbo(device,
rt_count ? wined3d_rendertarget_view_get_surface(rts[0]) : NULL);
}
@ -92,7 +92,7 @@ index a9d6664..9f8397f 100644
}
else if (wined3d_settings.offscreen_rendering_mode == ORM_FBO
&& (!rt_count || wined3d_resource_is_offscreen(rts[0]->resource)))
@@ -2480,7 +2490,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
@@ -2473,7 +2483,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const struct wined3d_device *device)
{
const struct wined3d_state *state = &device->state;
@ -101,7 +101,7 @@ index a9d6664..9f8397f 100644
struct wined3d_shader *ps = state->shader[WINED3D_SHADER_TYPE_PIXEL];
DWORD rt_mask, rt_mask_bits;
unsigned int i;
@@ -2510,7 +2520,7 @@ static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const
@@ -2503,7 +2513,7 @@ static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const
void context_state_fb(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
{
const struct wined3d_device *device = context->swapchain->device;
@ -110,7 +110,7 @@ index a9d6664..9f8397f 100644
DWORD rt_mask = find_draw_buffers_mask(context, device);
DWORD *cur_mask;
@@ -2542,6 +2552,8 @@ void context_state_fb(struct wined3d_context *context, const struct wined3d_stat
@@ -2535,6 +2545,8 @@ void context_state_fb(struct wined3d_context *context, const struct wined3d_stat
context_apply_draw_buffers(context, rt_mask);
*cur_mask = rt_mask;
}
@ -119,7 +119,7 @@ index a9d6664..9f8397f 100644
}
static void context_map_stage(struct wined3d_context *context, DWORD stage, DWORD unit)
@@ -3166,7 +3178,7 @@ BOOL context_apply_draw_state(struct wined3d_context *context, struct wined3d_de
@@ -3159,7 +3171,7 @@ BOOL context_apply_draw_state(struct wined3d_context *context, struct wined3d_de
{
const struct wined3d_state *state = &device->state;
const struct StateEntry *state_table = context->state_table;
@ -205,10 +205,10 @@ index 316ccb8..eefa142 100644
HeapFree(GetProcessHeap(), 0, cs);
}
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 1dc934d..d05ff2d 100644
index a5c1e59..42c5d14 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
@@ -865,7 +865,7 @@ static void device_init_swapchain_state(struct wined3d_device *device, struct wi
BOOL ds_enable = !!swapchain->desc.enable_auto_depth_stencil;
unsigned int i;
@ -217,7 +217,7 @@ index 1dc934d..d05ff2d 100644
{
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
{
@@ -878,7 +878,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
@@ -883,7 +883,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
struct wined3d_swapchain_desc *swapchain_desc)
{
static const struct wined3d_color black = {0.0f, 0.0f, 0.0f, 0.0f};
@ -225,7 +225,7 @@ index 1dc934d..d05ff2d 100644
struct wined3d_swapchain *swapchain = NULL;
struct wined3d_context *context;
DWORD clear_flags = 0;
@@ -891,9 +890,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
@@ -896,9 +895,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
if (device->wined3d->flags & WINED3D_NO3D)
return WINED3DERR_INVALIDCALL;
@ -235,7 +235,7 @@ index 1dc934d..d05ff2d 100644
if (FAILED(hr = device->shader_backend->shader_alloc_private(device,
device->adapter->vertex_pipe, device->adapter->fragment_pipe)))
{
@@ -981,7 +977,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
@@ -986,7 +982,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
return WINED3D_OK;
err_out:
@ -243,7 +243,7 @@ index 1dc934d..d05ff2d 100644
HeapFree(GetProcessHeap(), 0, device->swapchains);
device->swapchain_count = 0;
if (device->back_buffer_view)
@@ -1060,8 +1055,25 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
@@ -1065,8 +1060,25 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
if (device->cursor_texture)
wined3d_texture_decref(device->cursor_texture);
@ -269,7 +269,7 @@ index 1dc934d..d05ff2d 100644
/* Unload resources */
LIST_FOR_EACH_ENTRY_SAFE(resource, cursor, &device->resources, struct wined3d_resource, resource_list_entry)
{
@@ -1092,37 +1104,6 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
@@ -1097,37 +1109,6 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
* destroy the context. */
context_release(context);
@ -307,7 +307,7 @@ index 1dc934d..d05ff2d 100644
if (device->back_buffer_view)
{
wined3d_rendertarget_view_decref(device->back_buffer_view);
@@ -1140,9 +1121,6 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
@@ -1145,9 +1126,6 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
device->swapchains = NULL;
device->swapchain_count = 0;
@ -317,7 +317,7 @@ index 1dc934d..d05ff2d 100644
device->d3d_initialized = FALSE;
return WINED3D_OK;
@@ -1938,7 +1916,7 @@ static void resolve_depth_buffer(struct wined3d_state *state)
@@ -1943,7 +1921,7 @@ static void resolve_depth_buffer(struct wined3d_state *state)
|| !(texture->resource.format_flags & WINED3DFMT_FLAG_DEPTH))
return;
surface = surface_from_resource(texture->sub_resources[0]);
@ -326,7 +326,7 @@ index 1dc934d..d05ff2d 100644
return;
wined3d_surface_blt(surface, NULL, depth_stencil, NULL, 0, NULL, WINED3D_TEXF_POINT);
@@ -3293,6 +3271,8 @@ HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device)
@@ -3298,6 +3276,8 @@ HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device)
HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_count,
const RECT *rects, DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil)
{
@ -335,7 +335,7 @@ index 1dc934d..d05ff2d 100644
TRACE("device %p, rect_count %u, rects %p, flags %#x, color {%.8e, %.8e, %.8e, %.8e}, depth %.8e, stencil %u.\n",
device, rect_count, rects, flags, color->r, color->g, color->b, color->a, depth, stencil);
@@ -3304,7 +3284,7 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
@@ -3309,7 +3289,7 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
if (flags & (WINED3DCLEAR_ZBUFFER | WINED3DCLEAR_STENCIL))
{
@ -344,7 +344,7 @@ index 1dc934d..d05ff2d 100644
if (!ds)
{
WARN("Clearing depth and/or stencil without a depth stencil buffer attached, returning WINED3DERR_INVALIDCALL\n");
@@ -3313,8 +3293,8 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
@@ -3318,8 +3298,8 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
}
else if (flags & WINED3DCLEAR_TARGET)
{
@ -355,7 +355,7 @@ index 1dc934d..d05ff2d 100644
{
WARN("Silently ignoring depth and target clear with mismatching sizes\n");
return WINED3D_OK;
@@ -3677,8 +3657,8 @@ HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device
@@ -3682,8 +3662,8 @@ HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device
if (state->render_states[WINED3D_RS_ZENABLE] || state->render_states[WINED3D_RS_ZWRITEENABLE]
|| state->render_states[WINED3D_RS_STENCILENABLE])
{
@ -366,7 +366,7 @@ index 1dc934d..d05ff2d 100644
if (ds && rt && (ds->width < rt->width || ds->height < rt->height))
{
@@ -4060,20 +4040,21 @@ struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(co
@@ -4065,20 +4045,21 @@ struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(co
return NULL;
}
@ -390,7 +390,7 @@ index 1dc934d..d05ff2d 100644
TRACE("device %p, view_idx %u, view %p, set_viewport %#x.\n",
device, view_idx, view, set_viewport);
@@ -4113,13 +4094,13 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
@@ -4118,13 +4099,13 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
}
@ -406,7 +406,7 @@ index 1dc934d..d05ff2d 100644
wined3d_cs_emit_set_rendertarget_view(device->cs, view_idx, view);
/* Release after the assignment, to prevent device_resource_released()
* from seeing the surface as still in use. */
@@ -4131,18 +4112,19 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
@@ -4136,18 +4117,19 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
void CDECL wined3d_device_set_depth_stencil_view(struct wined3d_device *device, struct wined3d_rendertarget_view *view)
{
@ -428,7 +428,7 @@ index 1dc934d..d05ff2d 100644
wined3d_rendertarget_view_incref(view);
wined3d_cs_emit_set_depth_stencil_view(device->cs, view);
if (prev)
@@ -4506,10 +4488,9 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
@@ -4511,10 +4493,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 1dc934d..d05ff2d 100644
{
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
{
@@ -4518,6 +4499,11 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
@@ -4523,6 +4504,11 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
}
wined3d_device_set_depth_stencil_view(device, NULL);
@ -452,7 +452,7 @@ index 1dc934d..d05ff2d 100644
if (device->onscreen_depth_stencil)
{
wined3d_texture_decref(device->onscreen_depth_stencil->container);
@@ -4736,7 +4722,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
@@ -4741,7 +4727,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
if (device->d3d_initialized)
delete_opengl_contexts(device, swapchain);
@ -461,7 +461,7 @@ index 1dc934d..d05ff2d 100644
&device->adapter->d3d_info, WINED3D_STATE_INIT_DEFAULT)))
ERR("Failed to initialize device state, hr %#x.\n", hr);
device->update_state = &device->state;
@@ -4745,22 +4731,21 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
@@ -4750,22 +4736,21 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
}
else if (device->back_buffer_view)
{
@ -489,7 +489,7 @@ index 1dc934d..d05ff2d 100644
wined3d_cs_emit_set_scissor_rect(device->cs, &state->scissor_rect);
}
@@ -4848,17 +4833,17 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
@@ -4853,17 +4838,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 1dc934d..d05ff2d 100644
}
}
break;
@@ -5021,7 +5006,7 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d,
@@ -5026,7 +5011,7 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d,
device->blitter = adapter->blitter;
@ -521,7 +521,7 @@ index 1dc934d..d05ff2d 100644
{
ERR("Failed to initialize device state, hr %#x.\n", hr);
diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c
index 0e1f4ec..17054c1 100644
index 4b01b7d..7e3a7f7 100644
--- a/dlls/wined3d/drawprim.c
+++ b/dlls/wined3d/drawprim.c
@@ -611,7 +611,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
@ -533,16 +533,16 @@ index 0e1f4ec..17054c1 100644
if (!context->valid)
{
context_release(context);
@@ -625,7 +625,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
/* Invalidate the back buffer memory so LockRect will read it the next time */
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
@@ -622,7 +622,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
{
- struct wined3d_surface *target = wined3d_rendertarget_view_get_surface(device->fb.render_targets[i]);
+ struct wined3d_surface *target = wined3d_rendertarget_view_get_surface(state->fb.render_targets[i]);
if (target && target->resource.format->id != WINED3DFMT_NULL)
{
- struct wined3d_surface *target = wined3d_rendertarget_view_get_surface(device->fb.render_targets[i]);
+ struct wined3d_surface *target = wined3d_rendertarget_view_get_surface(state->fb.render_targets[i]);
if (target)
{
wined3d_resource_load_location(&target->resource, context, target->container->resource.draw_binding);
@@ -634,18 +634,18 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
if (state->render_states[WINED3D_RS_COLORWRITEENABLE])
@@ -637,16 +637,16 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
}
}
@ -557,14 +557,12 @@ index 0e1f4ec..17054c1 100644
- DWORD location = context->render_offscreen ? device->fb.depth_stencil->resource->draw_binding
+ DWORD location = context->render_offscreen ? state->fb.depth_stencil->resource->draw_binding
: WINED3D_LOCATION_DRAWABLE;
- struct wined3d_surface *ds = wined3d_rendertarget_view_get_surface(device->fb.depth_stencil);
+ struct wined3d_surface *ds = wined3d_rendertarget_view_get_surface(state->fb.depth_stencil);
if (state->render_states[WINED3D_RS_ZWRITEENABLE] || state->render_states[WINED3D_RS_ZENABLE])
{
- struct wined3d_surface *ds = wined3d_rendertarget_view_get_surface(device->fb.depth_stencil);
+ struct wined3d_surface *ds = wined3d_rendertarget_view_get_surface(state->fb.depth_stencil);
RECT current_rect, draw_rect, r;
if (!context->render_offscreen && ds != device->onscreen_depth_stencil)
@@ -671,9 +671,9 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
@@ -679,9 +679,9 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
return;
}
@ -790,10 +788,10 @@ index cb3d494..6b348b8 100644
if (FAILED(hr = stateblock_allocate_shader_constants(stateblock)))
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index f2494b8..a8c48be 100644
index de8d6dc..db36a59 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -3278,8 +3278,8 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE
@@ -3283,8 +3283,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;
@ -839,7 +837,7 @@ index 4ddfead..32519eb 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 40e806a..41b14bd 100644
index 720eb3a..6a10ad7 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -1149,6 +1149,36 @@ struct wined3d_timestamp_query
@ -917,7 +915,7 @@ index 40e806a..41b14bd 100644
struct wined3d_surface *onscreen_depth_stencil;
struct wined3d_rendertarget_view *auto_depth_stencil_view;
@@ -2606,9 +2630,8 @@ struct wined3d_stateblock
@@ -2608,9 +2632,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 40e806a..41b14bd 100644
void state_unbind_resources(struct wined3d_state *state) DECLSPEC_HIDDEN;
struct wined3d_cs_ops
@@ -2621,7 +2644,6 @@ struct wined3d_cs
@@ -2623,7 +2646,6 @@ struct wined3d_cs
{
const struct wined3d_cs_ops *ops;
struct wined3d_device *device;

View File

@ -1,4 +1,4 @@
From b8968006147a8c5708e737055655b0360643dd81 Mon Sep 17 00:00:00 2001
From 78e1e4771d85128087e911b9a0ad81998fb98096 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Tue, 2 Apr 2013 17:25:19 +0200
Subject: wined3d: Pass the state to draw_primitive
@ -15,7 +15,7 @@ Subject: wined3d: Pass the state to draw_primitive
8 files changed, 29 insertions(+), 28 deletions(-)
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
index 7adfb28..55c972b 100644
index 6fff047..4f4827f 100644
--- a/dlls/wined3d/buffer.c
+++ b/dlls/wined3d/buffer.c
@@ -423,7 +423,7 @@ static inline void fixup_d3dcolor(DWORD *dst_color)
@ -27,7 +27,7 @@ index 7adfb28..55c972b 100644
* If we want that stuff to work on big endian machines too we have to consider more things
*
* 0xff000000: Alpha mask
@@ -1230,11 +1230,11 @@ static HRESULT buffer_init(struct wined3d_buffer *buffer, struct wined3d_device
@@ -1190,11 +1190,11 @@ static HRESULT buffer_init(struct wined3d_buffer *buffer, struct wined3d_device
dynamic_buffer_ok = gl_info->supported[APPLE_FLUSH_BUFFER_RANGE] || gl_info->supported[ARB_MAP_BUFFER_RANGE];
@ -42,10 +42,10 @@ index 7adfb28..55c972b 100644
*/
if (!gl_info->supported[ARB_VERTEX_BUFFER_OBJECT])
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 474af3b..f21c81d 100644
index c1b6e01..d9e2bc1 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -2999,7 +2999,7 @@ static void context_update_stream_info(struct wined3d_context *context, const st
@@ -2992,7 +2992,7 @@ static void context_update_stream_info(struct wined3d_context *context, const st
{
if (state->vertex_declaration->half_float_conv_needed && !stream_info->all_vbo)
{
@ -54,7 +54,7 @@ index 474af3b..f21c81d 100644
context->use_immediate_mode_draw = TRUE;
}
else
@@ -3174,9 +3174,9 @@ static void context_bind_shader_resources(struct wined3d_context *context, const
@@ -3167,9 +3167,9 @@ static void context_bind_shader_resources(struct wined3d_context *context, const
}
/* Context activation is done by the caller. */
@ -67,7 +67,7 @@ index 474af3b..f21c81d 100644
const struct wined3d_fb_state *fb = &state->fb;
unsigned int i;
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 7fdfb9b..680e2bc 100644
index 784de6e..d14fd82 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -492,7 +492,7 @@ static UINT wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
@ -80,10 +80,10 @@ index 7fdfb9b..680e2bc 100644
return sizeof(*op);
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index a7329e7..1892dec 100644
index d7f0512..71688a5 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -5486,7 +5486,7 @@ static void WINE_GLAPI invalid_texcoord_func(GLenum unit, const void *data)
@@ -5503,7 +5503,7 @@ static void WINE_GLAPI invalid_texcoord_func(GLenum unit, const void *data)
}
/* Helper functions for providing vertex data to opengl. The arrays are initialized based on
@ -93,7 +93,7 @@ index a7329e7..1892dec 100644
static void WINE_GLAPI position_d3dcolor(const void *data)
{
diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c
index d39bf28..b682088 100644
index af51dfd..bfbdf8c 100644
--- a/dlls/wined3d/drawprim.c
+++ b/dlls/wined3d/drawprim.c
@@ -36,7 +36,7 @@ WINE_DECLARE_DEBUG_CHANNEL(d3d_perf);
@ -154,8 +154,8 @@ index d39bf28..b682088 100644
const struct wined3d_stream_info *stream_info;
struct wined3d_event_query *ib_query = NULL;
struct wined3d_stream_info si_emulated;
@@ -664,7 +663,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
}
@@ -672,7 +671,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
wined3d_surface_prepare(ds, context, location);
}
- if (!context_apply_draw_state(context, device))
@ -163,7 +163,7 @@ index d39bf28..b682088 100644
{
context_release(context);
WARN("Unable to apply draw state, skipping draw.\n");
@@ -756,28 +755,28 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
@@ -764,28 +763,28 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
else
WARN_(d3d_perf)("Using immediate mode with vertex shaders for half float emulation.\n");
@ -220,7 +220,7 @@ index e789786..8362ef8 100644
*/
WARN("unsupported blending in openGl\n");
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
index 32519eb..04c6dc6 100644
index 81af9d5..64e6d6a 100644
--- a/dlls/wined3d/utils.c
+++ b/dlls/wined3d/utils.c
@@ -3866,7 +3866,7 @@ static void compute_texture_matrix(const struct wined3d_gl_info *gl_info, const
@ -233,7 +233,7 @@ index 32519eb..04c6dc6 100644
default:
mat._14 = mat._24 = mat._34 = 0.0f; mat._44 = 1.0f;
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index e11e11a..076fe88 100644
index 2667936..2467c22 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -1021,8 +1021,9 @@ struct wined3d_stream_info
@ -259,5 +259,5 @@ index e11e11a..076fe88 100644
struct wined3d_surface *render_target, struct wined3d_surface *depth_stencil, DWORD location) DECLSPEC_HIDDEN;
void context_active_texture(struct wined3d_context *context, const struct wined3d_gl_info *gl_info,
--
2.6.2
2.6.1

View File

@ -1,4 +1,4 @@
From 610e06aa206c46a868c373e485adde24638727d9 Mon Sep 17 00:00:00 2001
From 8842cf6a7d2b87f69462e5fe513f51bc127a8140 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Fri, 5 Apr 2013 14:37:44 +0200
Subject: wined3d: Keep track of the onscreen depth stencil in the command
@ -64,7 +64,7 @@ index d5e2c52..b20d32f 100644
{
struct wined3d_cs *cs = thread_param;
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 99e68d0..6360275 100644
index 1fef5ff..4de7eb2 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -198,22 +198,6 @@ void device_context_remove(struct wined3d_device *device, struct wined3d_context
@ -90,7 +90,7 @@ index 99e68d0..6360275 100644
static BOOL is_full_clear(const struct wined3d_surface *target, const RECT *draw_rect, const RECT *clear_rect)
{
/* partial draw rect */
@@ -343,8 +327,8 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
@@ -348,8 +332,8 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
{
DWORD location = render_offscreen ? fb->depth_stencil->resource->draw_binding : WINED3D_LOCATION_DRAWABLE;
@ -101,7 +101,7 @@ index 99e68d0..6360275 100644
prepare_ds_clear(depth_stencil, context, location,
draw_rect, rect_count, clear_rect, &ds_rect);
}
@@ -1059,11 +1043,12 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
@@ -1064,11 +1048,12 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
/* Release the buffers (with sanity checks).
* FIXME: Move this move into a separate patch. I think the idea
* behind this is that those surfaces should be freed before unloading
@ -118,7 +118,7 @@ index 99e68d0..6360275 100644
wined3d_texture_decref(surface->container);
}
@@ -4556,10 +4541,10 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
@@ -4561,10 +4546,10 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
state_unbind_resources(&device->state);
}
@ -133,11 +133,11 @@ index 99e68d0..6360275 100644
if (reset_state)
diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c
index 03095e0..bfdf814 100644
index 21ce53a..9ec380a 100644
--- a/dlls/wined3d/drawprim.c
+++ b/dlls/wined3d/drawprim.c
@@ -647,8 +647,8 @@ void draw_primitive(struct wined3d_device *device, const struct wined3d_state *s
struct wined3d_surface *ds = wined3d_rendertarget_view_get_surface(state->fb.depth_stencil);
@@ -651,8 +651,8 @@ void draw_primitive(struct wined3d_device *device, const struct wined3d_state *s
{
RECT current_rect, draw_rect, r;
- if (!context->render_offscreen && ds != device->onscreen_depth_stencil)
@ -166,7 +166,7 @@ index 6ded6cc..0a8da3d 100644
}
}
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 5e5d900..4050489 100644
index dec58e5..035517f 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2116,15 +2116,12 @@ struct wined3d_device
@ -195,7 +195,7 @@ index 5e5d900..4050489 100644
void device_invalidate_state(const struct wined3d_device *device, DWORD state) DECLSPEC_HIDDEN;
static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD state)
@@ -2665,6 +2660,7 @@ struct wined3d_cs
@@ -2667,6 +2662,7 @@ struct wined3d_cs
struct wined3d_state state;
HANDLE thread;
DWORD tls_idx;
@ -203,7 +203,7 @@ index 5e5d900..4050489 100644
size_t data_size;
void *data;
@@ -2675,6 +2671,8 @@ struct wined3d_cs
@@ -2677,6 +2673,8 @@ struct wined3d_cs
struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device) DECLSPEC_HIDDEN;
void wined3d_cs_destroy(struct wined3d_cs *cs) DECLSPEC_HIDDEN;

File diff suppressed because it is too large Load Diff

View File

@ -1,255 +0,0 @@
From 204883cb596e0e0c2b2e1812df5c69247b870e1e Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Tue, 10 Nov 2015 00:36:45 +0100
Subject: Revert "wined3d: Prepare GL resources before calling
context_apply_fbo_state."
This reverts commit 1ca9dfc8ee25f4ae188fdacd4d3d56046cef8003.
---
dlls/wined3d/context.c | 7 ++++++
dlls/wined3d/device.c | 13 ++++--------
dlls/wined3d/drawprim.c | 20 ++++++------------
dlls/wined3d/surface.c | 48 ++++++++++++++++--------------------------
dlls/wined3d/wined3d_private.h | 4 ++--
5 files changed, 37 insertions(+), 55 deletions(-)
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 80a9ba7..52533b7 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -141,6 +141,8 @@ static void context_attach_depth_stencil_fbo(struct wined3d_context *context,
{
case WINED3D_LOCATION_TEXTURE_RGB:
case WINED3D_LOCATION_TEXTURE_SRGB:
+ wined3d_texture_prepare_texture(depth_stencil->container, context, FALSE);
+
if (format_flags & WINED3DFMT_FLAG_DEPTH)
{
gl_info->fbo_ops.glFramebufferTexture2D(fbo_target, GL_DEPTH_ATTACHMENT,
@@ -159,11 +161,13 @@ static void context_attach_depth_stencil_fbo(struct wined3d_context *context,
break;
case WINED3D_LOCATION_RB_MULTISAMPLE:
+ surface_prepare_rb(depth_stencil, gl_info, TRUE);
context_attach_depth_stencil_rb(gl_info, fbo_target,
format_flags, depth_stencil->rb_multisample);
break;
case WINED3D_LOCATION_RB_RESOLVED:
+ surface_prepare_rb(depth_stencil, gl_info, FALSE);
context_attach_depth_stencil_rb(gl_info, fbo_target,
format_flags, depth_stencil->rb_resolved);
break;
@@ -213,6 +217,7 @@ static void context_attach_surface_fbo(struct wined3d_context *context,
case WINED3D_LOCATION_TEXTURE_RGB:
case WINED3D_LOCATION_TEXTURE_SRGB:
srgb = location == WINED3D_LOCATION_TEXTURE_SRGB;
+ wined3d_texture_prepare_texture(surface->container, context, srgb);
gl_info->fbo_ops.glFramebufferTexture2D(fbo_target, GL_COLOR_ATTACHMENT0 + idx,
surface->texture_target, surface_get_texture_name(surface, gl_info, srgb),
surface->texture_level);
@@ -220,12 +225,14 @@ static void context_attach_surface_fbo(struct wined3d_context *context,
break;
case WINED3D_LOCATION_RB_MULTISAMPLE:
+ surface_prepare_rb(surface, gl_info, TRUE);
gl_info->fbo_ops.glFramebufferRenderbuffer(fbo_target, GL_COLOR_ATTACHMENT0 + idx,
GL_RENDERBUFFER, surface->rb_multisample);
checkGLcall("glFramebufferRenderbuffer()");
break;
case WINED3D_LOCATION_RB_RESOLVED:
+ surface_prepare_rb(surface, gl_info, FALSE);
gl_info->fbo_ops.glFramebufferRenderbuffer(fbo_target, GL_COLOR_ATTACHMENT0 + idx,
GL_RENDERBUFFER, surface->rb_resolved);
checkGLcall("glFramebufferRenderbuffer()");
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 170536d..90f923f 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -317,15 +317,13 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
* anyway. If we're not clearing the color buffer we don't have to copy either since we're not going to set
* the drawable up to date. We have to check all settings that limit the clear area though. Do not bother
* checking all this if the dest surface is in the drawable anyway. */
- for (i = 0; i < rt_count; ++i)
+ if (flags & WINED3DCLEAR_TARGET && !is_full_clear(target, draw_rect, clear_rect))
{
- struct wined3d_surface *rt = wined3d_rendertarget_view_get_surface(fb->render_targets[i]);
- if (rt && rt->resource.format->id != WINED3DFMT_NULL)
+ for (i = 0; i < rt_count; ++i)
{
- if (flags & WINED3DCLEAR_TARGET && !is_full_clear(target, draw_rect, clear_rect))
+ struct wined3d_surface *rt = wined3d_rendertarget_view_get_surface(fb->render_targets[i]);
+ if (rt)
surface_load_location(rt, context, rt->container->resource.draw_binding);
- else
- wined3d_surface_prepare(rt, context, rt->container->resource.draw_binding);
}
}
@@ -341,9 +339,6 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
drawable_height = depth_stencil->pow2Height;
}
- if (depth_stencil && render_offscreen)
- wined3d_surface_prepare(depth_stencil, context, depth_stencil->container->resource.draw_binding);
-
if (flags & WINED3DCLEAR_ZBUFFER)
{
DWORD location = render_offscreen ? fb->depth_stencil->resource->draw_binding : WINED3D_LOCATION_DRAWABLE;
diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c
index 3761830..d2d3bce 100644
--- a/dlls/wined3d/drawprim.c
+++ b/dlls/wined3d/drawprim.c
@@ -620,20 +620,17 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
}
gl_info = context->gl_info;
- for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
+ if (state->render_states[WINED3D_RS_COLORWRITEENABLE])
{
- struct wined3d_surface *target = wined3d_rendertarget_view_get_surface(device->fb.render_targets[i]);
- if (target && target->resource.format->id != WINED3DFMT_NULL)
+ /* Invalidate the back buffer memory so LockRect will read it the next time */
+ for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
{
- if (state->render_states[WINED3D_RS_COLORWRITEENABLE])
+ struct wined3d_surface *target = wined3d_rendertarget_view_get_surface(device->fb.render_targets[i]);
+ if (target)
{
surface_load_location(target, context, target->container->resource.draw_binding);
surface_invalidate_location(target, ~target->container->resource.draw_binding);
}
- else
- {
- wined3d_surface_prepare(target, context, target->container->resource.draw_binding);
- }
}
}
@@ -646,10 +643,9 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
* that we never copy the stencil data.*/
DWORD location = context->render_offscreen ? device->fb.depth_stencil->resource->draw_binding
: WINED3D_LOCATION_DRAWABLE;
- struct wined3d_surface *ds = wined3d_rendertarget_view_get_surface(device->fb.depth_stencil);
-
if (state->render_states[WINED3D_RS_ZWRITEENABLE] || state->render_states[WINED3D_RS_ZENABLE])
{
+ struct wined3d_surface *ds = wined3d_rendertarget_view_get_surface(device->fb.depth_stencil);
RECT current_rect, draw_rect, r;
if (!context->render_offscreen && ds != device->onscreen_depth_stencil)
@@ -665,11 +661,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
IntersectRect(&r, &draw_rect, &current_rect);
if (!EqualRect(&r, &draw_rect))
surface_load_ds_location(ds, context, location);
- else
- wined3d_surface_prepare(ds, context, location);
}
- else
- wined3d_surface_prepare(ds, context, location);
}
if (!context_apply_draw_state(context, device))
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 0a7112c..816bace 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -821,8 +821,6 @@ static void surface_depth_blt_fbo(const struct wined3d_device *device,
surface_load_location(src_surface, context, src_location);
if (!surface_is_full_rect(dst_surface, dst_rect))
surface_load_location(dst_surface, context, dst_location);
- else
- wined3d_surface_prepare(dst_surface, context, dst_location);
gl_info = context->gl_info;
@@ -914,9 +912,6 @@ static void surface_blt_fbo(const struct wined3d_device *device,
surface_load_location(src_surface, old_ctx, src_location);
if (!surface_is_full_rect(dst_surface, &dst_rect))
surface_load_location(dst_surface, old_ctx, dst_location);
- else
- wined3d_surface_prepare(dst_surface, old_ctx, dst_location);
-
if (src_location == WINED3D_LOCATION_DRAWABLE) required_rt = src_surface;
else if (dst_location == WINED3D_LOCATION_DRAWABLE) required_rt = dst_surface;
@@ -2885,7 +2880,7 @@ void surface_load_fb_texture(struct wined3d_surface *surface, BOOL srgb, struct
context_restore(context, restore_rt);
}
-static void surface_prepare_rb(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info, BOOL multisample)
+void surface_prepare_rb(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info, BOOL multisample)
{
if (multisample)
{
@@ -3678,7 +3673,23 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
if (surface->locations & WINED3D_LOCATION_DISCARDED)
{
TRACE("Surface was discarded, no need copy data.\n");
- wined3d_surface_prepare(surface, context, location);
+ switch (location)
+ {
+ case WINED3D_LOCATION_TEXTURE_RGB:
+ wined3d_texture_prepare_texture(surface->container, context, FALSE);
+ break;
+ case WINED3D_LOCATION_RB_MULTISAMPLE:
+ surface_prepare_rb(surface, gl_info, TRUE);
+ break;
+ case WINED3D_LOCATION_RB_RESOLVED:
+ surface_prepare_rb(surface, gl_info, FALSE);
+ break;
+ case WINED3D_LOCATION_DRAWABLE:
+ /* Nothing to do */
+ break;
+ default:
+ FIXME("Unhandled location %#x\n", location);
+ }
surface->locations &= ~WINED3D_LOCATION_DISCARDED;
surface->locations |= location;
surface->ds_current_size.cx = surface->resource.width;
@@ -5501,26 +5512,3 @@ HRESULT wined3d_surface_create(struct wined3d_texture *container, const struct w
return hr;
}
-
-/* Context activation is done by the caller. */
-void wined3d_surface_prepare(struct wined3d_surface *surface, struct wined3d_context *context, DWORD location)
-{
- switch (location)
- {
- case WINED3D_LOCATION_TEXTURE_RGB:
- wined3d_texture_prepare_texture(surface->container, context, FALSE);
- break;
-
- case WINED3D_LOCATION_TEXTURE_SRGB:
- wined3d_texture_prepare_texture(surface->container, context, TRUE);
- break;
-
- case WINED3D_LOCATION_RB_MULTISAMPLE:
- surface_prepare_rb(surface, context->gl_info, TRUE);
- break;
-
- case WINED3D_LOCATION_RB_RESOLVED:
- surface_prepare_rb(surface, context->gl_info, FALSE);
- break;
- }
-}
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index a60919e..16fda97 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2465,8 +2465,8 @@ void surface_load_fb_texture(struct wined3d_surface *surface, BOOL srgb,
HRESULT surface_load_location(struct wined3d_surface *surface,
struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
void surface_modify_ds_location(struct wined3d_surface *surface, DWORD location, UINT w, UINT h) DECLSPEC_HIDDEN;
-void wined3d_surface_prepare(struct wined3d_surface *surface, struct wined3d_context *context,
- DWORD location) DECLSPEC_HIDDEN;
+void surface_prepare_rb(struct wined3d_surface *surface,
+ const struct wined3d_gl_info *gl_info, BOOL multisample) DECLSPEC_HIDDEN;
void surface_set_compatible_renderbuffer(struct wined3d_surface *surface,
const struct wined3d_surface *rt) DECLSPEC_HIDDEN;
void surface_set_texture_target(struct wined3d_surface *surface, GLenum target, GLint level) DECLSPEC_HIDDEN;
--
2.6.2

View File

@ -1 +0,0 @@
Fixes: [!39536] Revert patch to prepare GL resources before calling context_apply_fbo_state

View File

@ -1,3 +1,8 @@
wine-staging (1.8~rc2) unstable; urgency=low
* Removed patch to revert "prepare GLresources before calling
context_apply_fbo_state" commit.
-- Sebastian Lackner <sebastian@fds-team.de> Wed, 25 Nov 2015 20:21:46 +0100
wine-staging (1.8~rc1) unstable; urgency=low
* Removed patch to allow dinput EnumDevices callback with broken calling
convention (accepted upstream).