You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Rebase against 0922865b377913a27cea568ac688787a8117d8a7.
Rebasing of CSMT will need some additional work / thoughts.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From fc87bc1d66c8ba3a0880d2feafa0462cb1058bcf Mon Sep 17 00:00:00 2001
|
||||
From 0384901fc9ef670f7e83e7dfcbdad35edff52746 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Sun, 17 Nov 2013 20:19:24 +0100
|
||||
Subject: wined3d: Pass a context to surface_load_location.
|
||||
@@ -14,10 +14,10 @@ Subject: wined3d: Pass a context to surface_load_location.
|
||||
7 files changed, 107 insertions(+), 77 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
index 0334d1c..cb3a435 100644
|
||||
index a122845..12a172b 100644
|
||||
--- a/dlls/wined3d/context.c
|
||||
+++ b/dlls/wined3d/context.c
|
||||
@@ -2208,7 +2208,7 @@ static BOOL match_depth_stencil_format(const struct wined3d_format *existing,
|
||||
@@ -2212,7 +2212,7 @@ static BOOL match_depth_stencil_format(const struct wined3d_format *existing,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ index 0334d1c..cb3a435 100644
|
||||
static void context_validate_onscreen_formats(struct wined3d_context *context,
|
||||
const struct wined3d_rendertarget_view *depth_stencil)
|
||||
{
|
||||
@@ -2224,7 +2224,7 @@ static void context_validate_onscreen_formats(struct wined3d_context *context,
|
||||
@@ -2228,7 +2228,7 @@ static void context_validate_onscreen_formats(struct wined3d_context *context,
|
||||
WARN("Depth stencil format is not supported by WGL, rendering the backbuffer in an FBO\n");
|
||||
|
||||
/* The currently active context is the necessary context to access the swapchain's onscreen buffers */
|
||||
@@ -36,7 +36,7 @@ index 0334d1c..cb3a435 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 4954d00..657e099 100644
|
||||
index 56cf325..0521a94 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -300,6 +300,15 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
|
||||
@@ -120,7 +120,7 @@ index c0654a6..913ada5 100644
|
||||
{
|
||||
/* Note that this depends on the context_acquire() call above to set
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 22726f2..2cc217e 100644
|
||||
index 320bd31..a0342a0 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -753,7 +753,16 @@ static void surface_unmap(struct wined3d_surface *surface)
|
||||
@@ -138,7 +138,7 @@ index 22726f2..2cc217e 100644
|
||||
+ if (context)
|
||||
+ context_release(context);
|
||||
+ }
|
||||
else if (surface->resource.format_flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL))
|
||||
else if (surface->container->resource.format_flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL))
|
||||
FIXME("Depth / stencil buffer locking is not implemented.\n");
|
||||
}
|
||||
@@ -806,12 +815,6 @@ static void surface_depth_blt_fbo(const struct wined3d_device *device,
|
||||
@@ -179,7 +179,7 @@ index 22726f2..2cc217e 100644
|
||||
|
||||
if (src_location == WINED3D_LOCATION_DRAWABLE) required_rt = src_surface;
|
||||
else if (dst_location == WINED3D_LOCATION_DRAWABLE) required_rt = dst_surface;
|
||||
@@ -1143,6 +1152,9 @@ static void surface_unload(struct wined3d_resource *resource)
|
||||
@@ -1145,6 +1154,9 @@ static void surface_unload(struct wined3d_resource *resource)
|
||||
|
||||
TRACE("surface %p.\n", surface);
|
||||
|
||||
@@ -189,7 +189,7 @@ index 22726f2..2cc217e 100644
|
||||
if (resource->pool == WINED3D_POOL_DEFAULT)
|
||||
{
|
||||
/* Default pool resources are supposed to be destroyed before Reset is called.
|
||||
@@ -1168,13 +1180,10 @@ static void surface_unload(struct wined3d_resource *resource)
|
||||
@@ -1170,13 +1182,10 @@ static void surface_unload(struct wined3d_resource *resource)
|
||||
else
|
||||
{
|
||||
surface_prepare_map_memory(surface);
|
||||
@@ -204,7 +204,7 @@ index 22726f2..2cc217e 100644
|
||||
/* Destroy PBOs, but load them into real sysmem before */
|
||||
if (surface->pbo)
|
||||
surface_remove_pbo(surface, gl_info);
|
||||
@@ -1661,7 +1670,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
|
||||
@@ -1663,7 +1672,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
|
||||
@@ -213,7 +213,7 @@ index 22726f2..2cc217e 100644
|
||||
wined3d_texture_bind_and_dirtify(dst_surface->container, context, FALSE);
|
||||
|
||||
surface_get_memory(src_surface, &data, src_surface->locations);
|
||||
@@ -1777,7 +1786,8 @@ GLenum surface_get_gl_buffer(const struct wined3d_surface *surface)
|
||||
@@ -1779,7 +1788,8 @@ GLenum surface_get_gl_buffer(const struct wined3d_surface *surface)
|
||||
return GL_BACK;
|
||||
}
|
||||
|
||||
@@ -223,7 +223,7 @@ index 22726f2..2cc217e 100644
|
||||
{
|
||||
DWORD location = srgb ? WINED3D_LOCATION_TEXTURE_SRGB : WINED3D_LOCATION_TEXTURE_RGB;
|
||||
|
||||
@@ -1793,7 +1803,7 @@ void surface_load(struct wined3d_surface *surface, BOOL srgb)
|
||||
@@ -1795,7 +1805,7 @@ void surface_load(struct wined3d_surface *surface, BOOL srgb)
|
||||
}
|
||||
TRACE("Reloading because surface is dirty.\n");
|
||||
|
||||
@@ -232,7 +232,7 @@ index 22726f2..2cc217e 100644
|
||||
surface_evict_sysmem(surface);
|
||||
}
|
||||
|
||||
@@ -2720,10 +2730,16 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
|
||||
@@ -2722,10 +2732,16 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -250,7 +250,7 @@ index 22726f2..2cc217e 100644
|
||||
}
|
||||
|
||||
if (!(flags & (WINED3D_MAP_NO_DIRTY_UPDATE | WINED3D_MAP_READONLY)))
|
||||
@@ -2805,6 +2821,8 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
|
||||
@@ -2807,6 +2823,8 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
|
||||
HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
|
||||
{
|
||||
HRESULT hr;
|
||||
@@ -259,7 +259,7 @@ index 22726f2..2cc217e 100644
|
||||
|
||||
TRACE("surface %p, dc %p.\n", surface, dc);
|
||||
|
||||
@@ -2816,26 +2834,36 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
|
||||
@@ -2818,26 +2836,36 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
|
||||
if (surface->resource.map_count)
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
|
||||
@@ -299,7 +299,7 @@ index 22726f2..2cc217e 100644
|
||||
surface->flags |= SFLAG_DCINUSE;
|
||||
surface->resource.map_count++;
|
||||
|
||||
@@ -2873,8 +2901,16 @@ HRESULT CDECL wined3d_surface_releasedc(struct wined3d_surface *surface, HDC dc)
|
||||
@@ -2875,8 +2903,16 @@ HRESULT CDECL wined3d_surface_releasedc(struct wined3d_surface *surface, HDC dc)
|
||||
* copied back to the DIB in the next getdc call.
|
||||
*
|
||||
* The same consideration applies to user memory surfaces. */
|
||||
@@ -317,7 +317,7 @@ index 22726f2..2cc217e 100644
|
||||
}
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -4115,7 +4151,7 @@ static void surface_load_sysmem(struct wined3d_surface *surface,
|
||||
@@ -4117,7 +4153,7 @@ static void surface_load_sysmem(struct wined3d_surface *surface,
|
||||
}
|
||||
|
||||
if (surface->locations & (WINED3D_LOCATION_RB_MULTISAMPLE | WINED3D_LOCATION_RB_RESOLVED))
|
||||
@@ -326,7 +326,7 @@ index 22726f2..2cc217e 100644
|
||||
|
||||
/* Download the surface to system memory. */
|
||||
if (surface->locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB))
|
||||
@@ -4151,7 +4187,7 @@ static HRESULT surface_load_drawable(struct wined3d_surface *surface,
|
||||
@@ -4153,7 +4189,7 @@ static HRESULT surface_load_drawable(struct wined3d_surface *surface,
|
||||
}
|
||||
|
||||
surface_get_rect(surface, NULL, &r);
|
||||
@@ -335,7 +335,7 @@ index 22726f2..2cc217e 100644
|
||||
surface_blt_to_drawable(surface->resource.device, context,
|
||||
WINED3D_TEXF_POINT, FALSE, surface, &r, surface, &r);
|
||||
|
||||
@@ -4224,7 +4260,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4226,7 +4262,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);
|
||||
@@ -344,7 +344,7 @@ index 22726f2..2cc217e 100644
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -4235,7 +4271,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4237,7 +4273,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);
|
||||
@@ -353,7 +353,7 @@ index 22726f2..2cc217e 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4244,7 +4280,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4246,7 +4282,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);
|
||||
@@ -362,7 +362,7 @@ index 22726f2..2cc217e 100644
|
||||
}
|
||||
|
||||
wined3d_texture_prepare_texture(texture, context, srgb);
|
||||
@@ -4270,7 +4306,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4272,7 +4308,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
surface->resource.map_binding = WINED3D_LOCATION_SYSMEM;
|
||||
|
||||
surface_prepare_map_memory(surface);
|
||||
@@ -371,7 +371,7 @@ index 22726f2..2cc217e 100644
|
||||
surface_remove_pbo(surface, gl_info);
|
||||
}
|
||||
|
||||
@@ -4338,11 +4374,10 @@ static void surface_multisample_resolve(struct wined3d_surface *surface, struct
|
||||
@@ -4340,11 +4376,10 @@ static void surface_multisample_resolve(struct wined3d_surface *surface, struct
|
||||
surface, WINED3D_LOCATION_RB_MULTISAMPLE, &rect, surface, WINED3D_LOCATION_RB_RESOLVED, &rect);
|
||||
}
|
||||
|
||||
@@ -385,7 +385,7 @@ index 22726f2..2cc217e 100644
|
||||
|
||||
TRACE("surface %p, location %s.\n", surface, wined3d_debug_location(location));
|
||||
|
||||
@@ -4351,9 +4386,7 @@ HRESULT surface_load_location(struct wined3d_surface *surface, DWORD location)
|
||||
@@ -4353,9 +4388,7 @@ HRESULT surface_load_location(struct wined3d_surface *surface, DWORD location)
|
||||
if (location == WINED3D_LOCATION_TEXTURE_RGB
|
||||
&& surface->locations & (WINED3D_LOCATION_DRAWABLE | WINED3D_LOCATION_DISCARDED))
|
||||
{
|
||||
@@ -395,7 +395,7 @@ index 22726f2..2cc217e 100644
|
||||
return WINED3D_OK;
|
||||
}
|
||||
else if (location & surface->locations
|
||||
@@ -4397,33 +4430,22 @@ HRESULT surface_load_location(struct wined3d_surface *surface, DWORD location)
|
||||
@@ -4399,33 +4432,22 @@ HRESULT surface_load_location(struct wined3d_surface *surface, DWORD location)
|
||||
case WINED3D_LOCATION_USER_MEMORY:
|
||||
case WINED3D_LOCATION_SYSMEM:
|
||||
case WINED3D_LOCATION_BUFFER:
|
||||
@@ -432,7 +432,7 @@ index 22726f2..2cc217e 100644
|
||||
return hr;
|
||||
break;
|
||||
|
||||
@@ -5540,7 +5562,11 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
@@ -5542,7 +5564,11 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
if (SUCCEEDED(surface_upload_from_surface(dst_surface, &dst_point, src_surface, &src_rect)))
|
||||
{
|
||||
if (!wined3d_resource_is_offscreen(&dst_surface->container->resource))
|
||||
@@ -485,10 +485,10 @@ index 146f5d6..4f4d4df 100644
|
||||
src_dc = front->hDC;
|
||||
window = swapchain->win_handle;
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index 4425ecb..dbb0392 100644
|
||||
index f4e77fb..2f0d3d4 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -766,16 +766,19 @@ static void wined3d_texture_upload_data(struct wined3d_texture *texture, const s
|
||||
@@ -753,16 +753,19 @@ static void wined3d_texture_upload_data(struct wined3d_texture *texture, const s
|
||||
static void texture2d_sub_resource_load(struct wined3d_resource *sub_resource,
|
||||
struct wined3d_context *context, BOOL srgb)
|
||||
{
|
||||
@@ -511,10 +511,10 @@ index 4425ecb..dbb0392 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 1a7cade..e7ec65e 100644
|
||||
index 9e6cb5e..ccfebf0 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2385,11 +2385,12 @@ GLenum surface_get_gl_buffer(const struct wined3d_surface *surface) DECLSPEC_HID
|
||||
@@ -2399,11 +2399,12 @@ GLenum surface_get_gl_buffer(const struct wined3d_surface *surface) DECLSPEC_HID
|
||||
void surface_get_drawable_size(const struct wined3d_surface *surface, const struct wined3d_context *context,
|
||||
unsigned int *width, unsigned int *height) DECLSPEC_HIDDEN;
|
||||
void surface_invalidate_location(struct wined3d_surface *surface, DWORD location) DECLSPEC_HIDDEN;
|
||||
@@ -530,5 +530,5 @@ index 1a7cade..e7ec65e 100644
|
||||
void surface_prepare_rb(struct wined3d_surface *surface,
|
||||
const struct wined3d_gl_info *gl_info, BOOL multisample) DECLSPEC_HIDDEN;
|
||||
--
|
||||
2.3.5
|
||||
2.4.2
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 77640d30bc5d0699ffc7bf76051c6f786feb56f3 Mon Sep 17 00:00:00 2001
|
||||
From 518ce36e50012eb7f2dea0e4daf34c73fae4456c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Tue, 21 Jan 2014 12:22:30 +0100
|
||||
Subject: wined3d: Move surface locations into the resource.
|
||||
@@ -13,10 +13,10 @@ Subject: wined3d: Move surface locations into the resource.
|
||||
6 files changed, 56 insertions(+), 56 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
|
||||
index 96d2f74..2d4aadc 100644
|
||||
index 0bd7c22..f218979 100644
|
||||
--- a/dlls/wined3d/arb_program_shader.c
|
||||
+++ b/dlls/wined3d/arb_program_shader.c
|
||||
@@ -7779,7 +7779,7 @@ static void arbfp_blit_surface(struct wined3d_device *device, DWORD filter,
|
||||
@@ -7821,7 +7821,7 @@ static void arbfp_blit_surface(struct wined3d_device *device, DWORD filter,
|
||||
|
||||
/* Now load the surface */
|
||||
if (wined3d_settings.offscreen_rendering_mode != ORM_FBO
|
||||
@@ -26,7 +26,7 @@ index 96d2f74..2d4aadc 100644
|
||||
&& !wined3d_resource_is_offscreen(&src_surface->container->resource))
|
||||
{
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 657e099..9f4ab69 100644
|
||||
index 0521a94..b4bc3ac 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -236,7 +236,7 @@ static void prepare_ds_clear(struct wined3d_surface *ds, struct wined3d_context
|
||||
@@ -61,7 +61,7 @@ index 913ada5..567550e 100644
|
||||
else
|
||||
SetRectEmpty(¤t_rect);
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index bb41de5..5fdda96 100644
|
||||
index 9abffb3..78f92d3 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)
|
||||
@@ -91,7 +91,7 @@ index bb41de5..5fdda96 100644
|
||||
{
|
||||
TRACE("Not dirtified, nothing to do.\n");
|
||||
return;
|
||||
@@ -1673,7 +1673,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
|
||||
@@ -1675,7 +1675,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);
|
||||
|
||||
@@ -100,7 +100,7 @@ index bb41de5..5fdda96 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,
|
||||
@@ -1796,7 +1796,7 @@ void surface_load(struct wined3d_surface *surface, struct wined3d_context *conte
|
||||
@@ -1798,7 +1798,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");
|
||||
|
||||
@@ -109,7 +109,7 @@ index bb41de5..5fdda96 100644
|
||||
{
|
||||
TRACE("surface is already in texture\n");
|
||||
return;
|
||||
@@ -2107,7 +2107,7 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
|
||||
@@ -2109,7 +2109,7 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
|
||||
create_dib = TRUE;
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ index bb41de5..5fdda96 100644
|
||||
wined3d_resource_free_sysmem(&surface->resource);
|
||||
|
||||
width = texture_resource->width;
|
||||
@@ -3173,9 +3173,9 @@ void flip_surface(struct wined3d_surface *front, struct wined3d_surface *back)
|
||||
@@ -3175,9 +3175,9 @@ void flip_surface(struct wined3d_surface *front, struct wined3d_surface *back)
|
||||
back->flags = front->flags;
|
||||
front->flags = tmp_flags;
|
||||
|
||||
@@ -131,7 +131,7 @@ index bb41de5..5fdda96 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3354,7 +3354,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
|
||||
@@ -3356,7 +3356,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
|
||||
checkGLcall("glEnable(texture_target)");
|
||||
|
||||
/* For now invalidate the texture copy of the back buffer. Drawable and sysmem copy are untouched */
|
||||
@@ -140,7 +140,7 @@ index bb41de5..5fdda96 100644
|
||||
}
|
||||
|
||||
/* Make sure that the top pixel is always above the bottom pixel, and keep a separate upside down flag
|
||||
@@ -3892,13 +3892,14 @@ void surface_modify_ds_location(struct wined3d_surface *surface,
|
||||
@@ -3894,13 +3894,14 @@ void surface_modify_ds_location(struct wined3d_surface *surface,
|
||||
{
|
||||
TRACE("surface %p, new location %#x, w %u, h %u.\n", surface, location, w, h);
|
||||
|
||||
@@ -158,7 +158,7 @@ index bb41de5..5fdda96 100644
|
||||
}
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
@@ -3913,7 +3914,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
@@ -3915,7 +3916,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
/* TODO: Make this work for modes other than FBO */
|
||||
if (wined3d_settings.offscreen_rendering_mode != ORM_FBO) return;
|
||||
|
||||
@@ -167,7 +167,7 @@ index bb41de5..5fdda96 100644
|
||||
{
|
||||
w = surface->ds_current_size.cx;
|
||||
h = surface->ds_current_size.cy;
|
||||
@@ -3939,7 +3940,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
@@ -3941,7 +3942,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@ index bb41de5..5fdda96 100644
|
||||
{
|
||||
TRACE("Surface was discarded, no need copy data.\n");
|
||||
switch (location)
|
||||
@@ -3956,17 +3957,17 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
@@ -3958,17 +3959,17 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
default:
|
||||
FIXME("Unhandled location %#x\n", location);
|
||||
}
|
||||
@@ -198,7 +198,7 @@ index bb41de5..5fdda96 100644
|
||||
surface->ds_current_size.cx = surface->resource.width;
|
||||
surface->ds_current_size.cy = surface->resource.height;
|
||||
return;
|
||||
@@ -4055,7 +4056,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
@@ -4057,7 +4058,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
ERR("Invalid location (%#x) specified.\n", location);
|
||||
}
|
||||
|
||||
@@ -207,7 +207,7 @@ index bb41de5..5fdda96 100644
|
||||
surface->ds_current_size.cx = surface->resource.width;
|
||||
surface->ds_current_size.cy = surface->resource.height;
|
||||
}
|
||||
@@ -4064,7 +4065,7 @@ void surface_validate_location(struct wined3d_surface *surface, DWORD location)
|
||||
@@ -4066,7 +4067,7 @@ void surface_validate_location(struct wined3d_surface *surface, DWORD location)
|
||||
{
|
||||
TRACE("surface %p, location %s.\n", surface, wined3d_debug_location(location));
|
||||
|
||||
@@ -216,7 +216,7 @@ index bb41de5..5fdda96 100644
|
||||
}
|
||||
|
||||
void surface_invalidate_location(struct wined3d_surface *surface, DWORD location)
|
||||
@@ -4073,9 +4074,9 @@ void surface_invalidate_location(struct wined3d_surface *surface, DWORD location
|
||||
@@ -4075,9 +4076,9 @@ void surface_invalidate_location(struct wined3d_surface *surface, DWORD location
|
||||
|
||||
if (location & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB))
|
||||
wined3d_texture_set_dirty(surface->container);
|
||||
@@ -228,7 +228,7 @@ index bb41de5..5fdda96 100644
|
||||
ERR("Surface %p does not have any up to date location.\n", surface);
|
||||
}
|
||||
|
||||
@@ -4111,7 +4112,7 @@ static void surface_copy_simple_location(struct wined3d_surface *surface, DWORD
|
||||
@@ -4113,7 +4114,7 @@ static void surface_copy_simple_location(struct wined3d_surface *surface, DWORD
|
||||
UINT size = surface->resource.size;
|
||||
|
||||
surface_get_memory(surface, &dst, location);
|
||||
@@ -237,7 +237,7 @@ index bb41de5..5fdda96 100644
|
||||
|
||||
if (dst.buffer_object)
|
||||
{
|
||||
@@ -4144,33 +4145,33 @@ static void surface_load_sysmem(struct wined3d_surface *surface,
|
||||
@@ -4146,33 +4147,33 @@ static void surface_load_sysmem(struct wined3d_surface *surface,
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
|
||||
@@ -277,7 +277,7 @@ index bb41de5..5fdda96 100644
|
||||
}
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
@@ -4210,14 +4211,14 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4212,14 +4213,14 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
|
||||
if (wined3d_settings.offscreen_rendering_mode != ORM_FBO
|
||||
&& wined3d_resource_is_offscreen(&texture->resource)
|
||||
@@ -291,16 +291,16 @@ index bb41de5..5fdda96 100644
|
||||
|
||||
- if (surface->locations & (WINED3D_LOCATION_TEXTURE_SRGB | WINED3D_LOCATION_TEXTURE_RGB)
|
||||
+ if (surface->resource.locations & (WINED3D_LOCATION_TEXTURE_SRGB | WINED3D_LOCATION_TEXTURE_RGB)
|
||||
&& (surface->resource.format_flags & WINED3DFMT_FLAG_FBO_ATTACHABLE_SRGB)
|
||||
&& (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,
|
||||
@@ -4233,13 +4234,13 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4235,13 +4236,13 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
- if (surface->locations & (WINED3D_LOCATION_RB_MULTISAMPLE | WINED3D_LOCATION_RB_RESOLVED)
|
||||
+ if (surface->resource.locations & (WINED3D_LOCATION_RB_MULTISAMPLE | WINED3D_LOCATION_RB_RESOLVED)
|
||||
&& (!srgb || (surface->resource.format_flags & WINED3DFMT_FLAG_FBO_ATTACHABLE_SRGB))
|
||||
&& (!srgb || (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,
|
||||
NULL, surface->resource.usage, surface->resource.pool, surface->resource.format))
|
||||
@@ -310,7 +310,7 @@ index bb41de5..5fdda96 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};
|
||||
@@ -4254,7 +4255,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4256,7 +4257,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
|
||||
if (srgb)
|
||||
{
|
||||
@@ -319,7 +319,7 @@ index bb41de5..5fdda96 100644
|
||||
== WINED3D_LOCATION_TEXTURE_RGB)
|
||||
{
|
||||
/* Performance warning... */
|
||||
@@ -4265,7 +4266,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4267,7 +4268,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -328,7 +328,7 @@ index bb41de5..5fdda96 100644
|
||||
== WINED3D_LOCATION_TEXTURE_SRGB)
|
||||
{
|
||||
/* Performance warning... */
|
||||
@@ -4275,7 +4276,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4277,7 +4278,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -337,7 +337,7 @@ index bb41de5..5fdda96 100644
|
||||
{
|
||||
WARN("Trying to load a texture from sysmem, but no simple location is valid.\n");
|
||||
/* Lets hope we get it from somewhere... */
|
||||
@@ -4310,7 +4311,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4312,7 +4313,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
surface_remove_pbo(surface, gl_info);
|
||||
}
|
||||
|
||||
@@ -346,7 +346,7 @@ index bb41de5..5fdda96 100644
|
||||
if (format.convert)
|
||||
{
|
||||
/* This code is entered for texture formats which need a fixup. */
|
||||
@@ -4366,7 +4367,7 @@ static void surface_multisample_resolve(struct wined3d_surface *surface, struct
|
||||
@@ -4368,7 +4369,7 @@ static void surface_multisample_resolve(struct wined3d_surface *surface, struct
|
||||
{
|
||||
RECT rect = {0, 0, surface->resource.width, surface->resource.height};
|
||||
|
||||
@@ -355,7 +355,7 @@ index bb41de5..5fdda96 100644
|
||||
ERR("Trying to resolve multisampled surface %p, but location WINED3D_LOCATION_RB_MULTISAMPLE not current.\n",
|
||||
surface);
|
||||
|
||||
@@ -4384,12 +4385,12 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
@@ -4386,12 +4387,12 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
if (surface->resource.usage & WINED3DUSAGE_DEPTHSTENCIL)
|
||||
{
|
||||
if (location == WINED3D_LOCATION_TEXTURE_RGB
|
||||
@@ -370,7 +370,7 @@ index bb41de5..5fdda96 100644
|
||||
&& surface->container->resource.draw_binding != WINED3D_LOCATION_DRAWABLE)
|
||||
{
|
||||
/* Already up to date, nothing to do. */
|
||||
@@ -4398,12 +4399,12 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
@@ -4400,12 +4401,12 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
else
|
||||
{
|
||||
FIXME("Unimplemented copy from %s to %s for depth/stencil buffers.\n",
|
||||
@@ -385,7 +385,7 @@ index bb41de5..5fdda96 100644
|
||||
{
|
||||
TRACE("Location already up to date.\n");
|
||||
return;
|
||||
@@ -4417,7 +4418,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
@@ -4419,7 +4420,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
required_access, surface->resource.access_flags);
|
||||
}
|
||||
|
||||
@@ -394,7 +394,7 @@ index bb41de5..5fdda96 100644
|
||||
{
|
||||
ERR("Surface %p does not have any up to date location.\n", surface);
|
||||
surface->flags |= SFLAG_LOST;
|
||||
@@ -4456,7 +4457,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
@@ -4458,7 +4459,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
|
||||
surface_validate_location(surface, location);
|
||||
|
||||
@@ -403,7 +403,7 @@ index bb41de5..5fdda96 100644
|
||||
surface_evict_sysmem(surface);
|
||||
|
||||
return;
|
||||
@@ -5506,8 +5507,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
@@ -5508,8 +5509,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
|
||||
/* In principle this would apply to depth blits as well, but we don't
|
||||
* implement those in the CPU blitter at the moment. */
|
||||
@@ -414,7 +414,7 @@ index bb41de5..5fdda96 100644
|
||||
{
|
||||
if (scale)
|
||||
TRACE("Not doing sysmem blit because of scaling.\n");
|
||||
@@ -5547,8 +5548,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
@@ -5549,8 +5550,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
color_key = &src_surface->container->async.src_blt_color_key;
|
||||
blit_op = WINED3D_BLIT_OP_COLOR_BLIT_CKEY;
|
||||
}
|
||||
@@ -441,10 +441,10 @@ index 4f4d4df..e702d61 100644
|
||||
/* Both memory copies of the surfaces are ok, flip them around too instead of dirtifying
|
||||
* Doesn't work with render_to_fbo because we're not flipping
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 46d5e65..f74eddf 100644
|
||||
index 2828e47..bc6f994 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2334,7 +2334,6 @@ struct wined3d_surface
|
||||
@@ -2348,7 +2348,6 @@ struct wined3d_surface
|
||||
const struct wined3d_surface_ops *surface_ops;
|
||||
struct wined3d_texture *container;
|
||||
void *user_memory;
|
||||
@@ -453,5 +453,5 @@ index 46d5e65..f74eddf 100644
|
||||
DWORD flags;
|
||||
|
||||
--
|
||||
2.3.5
|
||||
2.4.2
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From cebc544748ed5c4f41f39ff600b5768d7aa86505 Mon Sep 17 00:00:00 2001
|
||||
From e714feefbc666c34518c908acbc630e9a9f0b48e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Wed, 18 Sep 2013 22:30:57 +0200
|
||||
Subject: wined3d: Introduce helper functions for mapping volumes.
|
||||
@@ -8,7 +8,7 @@ Subject: wined3d: Introduce helper functions for mapping volumes.
|
||||
1 file changed, 96 insertions(+), 61 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
|
||||
index a1fce20..5a4e939 100644
|
||||
index f82347d..17502ee 100644
|
||||
--- a/dlls/wined3d/volume.c
|
||||
+++ b/dlls/wined3d/volume.c
|
||||
@@ -480,12 +480,67 @@ static BOOL wined3d_volume_check_box_dimensions(const struct wined3d_volume *vol
|
||||
@@ -79,7 +79,7 @@ index a1fce20..5a4e939 100644
|
||||
- const struct wined3d_gl_info *gl_info;
|
||||
BYTE *base_memory;
|
||||
const struct wined3d_format *format = volume->resource.format;
|
||||
const unsigned int fmt_flags = volume->resource.format_flags;
|
||||
const unsigned int fmt_flags = volume->container->resource.format_flags;
|
||||
@@ -518,58 +573,22 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume,
|
||||
|
||||
flags = wined3d_resource_sanitize_map_flags(&volume->resource, flags);
|
||||
@@ -209,5 +209,5 @@ index a1fce20..5a4e939 100644
|
||||
volume->resource.map_count--;
|
||||
|
||||
--
|
||||
2.3.5
|
||||
2.4.2
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 92eadfba3a70866690a3993fc67252ab29736524 Mon Sep 17 00:00:00 2001
|
||||
From 68ee5f83114581754be6462ea029dfeea654206e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Tue, 21 Jan 2014 13:30:59 +0100
|
||||
Subject: wined3d: Use resource buffer mapping facilities in surfaces.
|
||||
@@ -9,10 +9,10 @@ Subject: wined3d: Use resource buffer mapping facilities in surfaces.
|
||||
2 files changed, 23 insertions(+), 63 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
|
||||
index 4c90dee..df6af90 100644
|
||||
index 01bde00..41b222f 100644
|
||||
--- a/dlls/wined3d/resource.c
|
||||
+++ b/dlls/wined3d/resource.c
|
||||
@@ -473,6 +473,12 @@ BYTE *wined3d_resource_get_map_ptr(const struct wined3d_resource *resource,
|
||||
@@ -535,6 +535,12 @@ BYTE *wined3d_resource_get_map_ptr(const struct wined3d_resource *resource,
|
||||
case WINED3D_LOCATION_SYSMEM:
|
||||
return resource->heap_memory;
|
||||
|
||||
@@ -25,7 +25,7 @@ index 4c90dee..df6af90 100644
|
||||
default:
|
||||
ERR("Unexpected map binding %s.\n", wined3d_debug_location(resource->map_binding));
|
||||
return NULL;
|
||||
@@ -495,6 +501,8 @@ void wined3d_resource_release_map_ptr(const struct wined3d_resource *resource,
|
||||
@@ -557,6 +563,8 @@ void wined3d_resource_release_map_ptr(const struct wined3d_resource *resource,
|
||||
return;
|
||||
|
||||
case WINED3D_LOCATION_SYSMEM:
|
||||
@@ -35,7 +35,7 @@ index 4c90dee..df6af90 100644
|
||||
|
||||
default:
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index c12b404..77d7890 100644
|
||||
index e85a68b..ee49f29 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -716,36 +716,10 @@ static HRESULT surface_private_setup(struct wined3d_surface *surface)
|
||||
@@ -75,7 +75,7 @@ index c12b404..77d7890 100644
|
||||
if (surface->resource.locations & (WINED3D_LOCATION_DRAWABLE | WINED3D_LOCATION_TEXTURE_RGB))
|
||||
{
|
||||
TRACE("Not dirtified, nothing to do.\n");
|
||||
@@ -2659,6 +2633,8 @@ struct wined3d_surface * CDECL wined3d_surface_from_resource(struct wined3d_reso
|
||||
@@ -2661,6 +2635,8 @@ struct wined3d_surface * CDECL wined3d_surface_from_resource(struct wined3d_reso
|
||||
|
||||
HRESULT CDECL wined3d_surface_unmap(struct wined3d_surface *surface)
|
||||
{
|
||||
@@ -84,7 +84,7 @@ index c12b404..77d7890 100644
|
||||
TRACE("surface %p.\n", surface);
|
||||
|
||||
if (!surface->resource.map_count)
|
||||
@@ -2668,6 +2644,12 @@ HRESULT CDECL wined3d_surface_unmap(struct wined3d_surface *surface)
|
||||
@@ -2670,6 +2646,12 @@ HRESULT CDECL wined3d_surface_unmap(struct wined3d_surface *surface)
|
||||
}
|
||||
--surface->resource.map_count;
|
||||
|
||||
@@ -97,9 +97,9 @@ index c12b404..77d7890 100644
|
||||
surface->surface_ops->surface_unmap(surface);
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -2679,8 +2661,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
|
||||
@@ -2681,8 +2663,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
|
||||
const struct wined3d_format *format = surface->resource.format;
|
||||
unsigned int fmt_flags = surface->resource.format_flags;
|
||||
unsigned int fmt_flags = surface->container->resource.format_flags;
|
||||
struct wined3d_device *device = surface->resource.device;
|
||||
- struct wined3d_context *context;
|
||||
- const struct wined3d_gl_info *gl_info;
|
||||
@@ -107,7 +107,7 @@ index c12b404..77d7890 100644
|
||||
BYTE *base_memory;
|
||||
|
||||
TRACE("surface %p, map_desc %p, rect %s, flags %#x.\n",
|
||||
@@ -2722,6 +2703,9 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
|
||||
@@ -2724,6 +2705,9 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ index c12b404..77d7890 100644
|
||||
surface_prepare_map_memory(surface);
|
||||
if (flags & WINED3D_MAP_DISCARD)
|
||||
{
|
||||
@@ -2731,51 +2715,19 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
|
||||
@@ -2733,51 +2717,19 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -173,5 +173,5 @@ index c12b404..77d7890 100644
|
||||
if (fmt_flags & WINED3DFMT_FLAG_BROKEN_PITCH)
|
||||
map_desc->row_pitch = surface->resource.width * format->byte_count;
|
||||
--
|
||||
2.3.5
|
||||
2.4.2
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From dddaa27583d0479c985c09b2e37f63314fd2d7a3 Mon Sep 17 00:00:00 2001
|
||||
From 240ba2fd70e0e8ed91785aca4e4bce8044d9f129 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Mon, 16 Sep 2013 22:44:33 +0200
|
||||
Subject: wined3d: Introduce a function to retrieve resource memory.
|
||||
@@ -10,10 +10,10 @@ Subject: wined3d: Introduce a function to retrieve resource memory.
|
||||
3 files changed, 38 insertions(+), 39 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
|
||||
index 4454922..0ef2155 100644
|
||||
index 3308c82..7c915bd 100644
|
||||
--- a/dlls/wined3d/resource.c
|
||||
+++ b/dlls/wined3d/resource.c
|
||||
@@ -435,6 +435,36 @@ DWORD wined3d_resource_access_from_location(DWORD location)
|
||||
@@ -497,6 +497,36 @@ DWORD wined3d_resource_access_from_location(DWORD location)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ index 4454922..0ef2155 100644
|
||||
void wined3d_resource_load_location(struct wined3d_resource *resource,
|
||||
struct wined3d_context *context, DWORD location)
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 4f12b02..66a7bd7 100644
|
||||
index 7e2e6c4..3e9a8ef 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -479,39 +479,6 @@ static HRESULT surface_create_dib_section(struct wined3d_surface *surface)
|
||||
@@ -94,16 +94,16 @@ index 4f12b02..66a7bd7 100644
|
||||
static void surface_prepare_buffer(struct wined3d_surface *surface)
|
||||
{
|
||||
struct wined3d_context *context;
|
||||
@@ -1272,7 +1239,7 @@ static void surface_download_data(struct wined3d_surface *surface, const struct
|
||||
@@ -1274,7 +1241,7 @@ static void surface_download_data(struct wined3d_surface *surface, const struct
|
||||
return;
|
||||
}
|
||||
|
||||
- surface_get_memory(surface, &data, dst_location);
|
||||
+ wined3d_resource_get_memory(&surface->resource, dst_location, &data);
|
||||
|
||||
if (surface->resource.format_flags & WINED3DFMT_FLAG_COMPRESSED)
|
||||
if (surface->container->resource.format_flags & WINED3DFMT_FLAG_COMPRESSED)
|
||||
{
|
||||
@@ -1641,7 +1608,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
|
||||
@@ -1643,7 +1610,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
|
||||
wined3d_resource_load_location(&dst_surface->resource, context, WINED3D_LOCATION_TEXTURE_RGB);
|
||||
wined3d_texture_bind_and_dirtify(dst_surface->container, context, FALSE);
|
||||
|
||||
@@ -112,7 +112,7 @@ index 4f12b02..66a7bd7 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,
|
||||
@@ -2876,7 +2843,7 @@ static void read_from_framebuffer(struct wined3d_surface *surface,
|
||||
@@ -2878,7 +2845,7 @@ static void read_from_framebuffer(struct wined3d_surface *surface,
|
||||
struct wined3d_bo_address data;
|
||||
UINT row_pitch, slice_pitch;
|
||||
|
||||
@@ -121,7 +121,7 @@ index 4f12b02..66a7bd7 100644
|
||||
|
||||
/* Context_release does not restore the original context in case of
|
||||
* nested context_acquire calls. Only read_from_framebuffer and
|
||||
@@ -4015,8 +3982,8 @@ static void surface_copy_simple_location(struct wined3d_surface *surface, DWORD
|
||||
@@ -4017,8 +3984,8 @@ static void surface_copy_simple_location(struct wined3d_surface *surface, DWORD
|
||||
struct wined3d_bo_address dst, src;
|
||||
UINT size = surface->resource.size;
|
||||
|
||||
@@ -132,7 +132,7 @@ index 4f12b02..66a7bd7 100644
|
||||
|
||||
if (dst.buffer_object)
|
||||
{
|
||||
@@ -4228,7 +4195,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4230,7 +4197,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
surface_remove_pbo(surface, gl_info);
|
||||
}
|
||||
|
||||
@@ -142,10 +142,10 @@ index 4f12b02..66a7bd7 100644
|
||||
{
|
||||
/* This code is entered for texture formats which need a fixup. */
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 12b1efd..c38451e 100644
|
||||
index f3e8f2a..f8733ad 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2158,6 +2158,8 @@ BOOL wined3d_resource_allocate_sysmem(struct wined3d_resource *resource) DECLSPE
|
||||
@@ -2172,6 +2172,8 @@ BOOL wined3d_resource_allocate_sysmem(struct wined3d_resource *resource) DECLSPE
|
||||
void wined3d_resource_free_sysmem(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
BYTE *wined3d_resource_get_map_ptr(const struct wined3d_resource *resource,
|
||||
const struct wined3d_context *context, DWORD flags) DECLSPEC_HIDDEN;
|
||||
@@ -155,5 +155,5 @@ index 12b1efd..c38451e 100644
|
||||
void wined3d_resource_invalidate_location(struct wined3d_resource *resource, DWORD location) DECLSPEC_HIDDEN;
|
||||
BOOL wined3d_resource_is_offscreen(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
--
|
||||
2.3.5
|
||||
2.4.2
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 1c3c1a3c7117915d4aa9bc8a4c533cde76133080 Mon Sep 17 00:00:00 2001
|
||||
From 10058dd5be622aefa90a05d8e793573da1140bf7 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Thu, 19 Sep 2013 13:36:00 +0200
|
||||
Subject: wined3d: Make surface_ops->unmap specific for front buffers.
|
||||
@@ -9,7 +9,7 @@ Subject: wined3d: Make surface_ops->unmap specific for front buffers.
|
||||
2 files changed, 17 insertions(+), 30 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 66a7bd7..178a949 100644
|
||||
index 3e9a8ef..175f05e 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -681,31 +681,22 @@ static HRESULT surface_private_setup(struct wined3d_surface *surface)
|
||||
@@ -43,7 +43,7 @@ index 66a7bd7..178a949 100644
|
||||
- if (context)
|
||||
- context_release(context);
|
||||
- }
|
||||
- else if (surface->resource.format_flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL))
|
||||
- else if (surface->container->resource.format_flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL))
|
||||
- FIXME("Depth / stencil buffer locking is not implemented.\n");
|
||||
+ if (device->d3d_initialized)
|
||||
+ context = context_acquire(surface->resource.device, NULL);
|
||||
@@ -53,7 +53,7 @@ index 66a7bd7..178a949 100644
|
||||
}
|
||||
|
||||
static BOOL surface_is_full_rect(const struct wined3d_surface *surface, const RECT *r)
|
||||
@@ -1162,7 +1153,7 @@ static void wined3d_surface_location_invalidated(struct wined3d_resource *resour
|
||||
@@ -1164,7 +1155,7 @@ static void wined3d_surface_location_invalidated(struct wined3d_resource *resour
|
||||
static const struct wined3d_surface_ops surface_ops =
|
||||
{
|
||||
surface_private_setup,
|
||||
@@ -62,7 +62,7 @@ index 66a7bd7..178a949 100644
|
||||
};
|
||||
|
||||
/*****************************************************************************
|
||||
@@ -1206,21 +1197,15 @@ static HRESULT gdi_surface_private_setup(struct wined3d_surface *surface)
|
||||
@@ -1208,21 +1199,15 @@ static HRESULT gdi_surface_private_setup(struct wined3d_surface *surface)
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ index 66a7bd7..178a949 100644
|
||||
};
|
||||
|
||||
/* This call just downloads data, the caller is responsible for binding the
|
||||
@@ -2610,7 +2595,9 @@ HRESULT CDECL wined3d_surface_unmap(struct wined3d_surface *surface)
|
||||
@@ -2612,7 +2597,9 @@ HRESULT CDECL wined3d_surface_unmap(struct wined3d_surface *surface)
|
||||
if (context)
|
||||
context_release(context);
|
||||
|
||||
@@ -99,10 +99,10 @@ index 66a7bd7..178a949 100644
|
||||
return WINED3D_OK;
|
||||
}
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index c38451e..96cdac5 100644
|
||||
index f8733ad..b0986cd 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2336,7 +2336,7 @@ struct fbo_entry
|
||||
@@ -2350,7 +2350,7 @@ struct fbo_entry
|
||||
struct wined3d_surface_ops
|
||||
{
|
||||
HRESULT (*surface_private_setup)(struct wined3d_surface *surface);
|
||||
@@ -112,5 +112,5 @@ index c38451e..96cdac5 100644
|
||||
|
||||
struct wined3d_surface
|
||||
--
|
||||
2.3.5
|
||||
2.4.2
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From db0594c57b82e50612dab5008f8947aa6a15fd18 Mon Sep 17 00:00:00 2001
|
||||
From 2ae05213ea4af0cb5725b2b88b51bd7ef2f893c5 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Thu, 19 Sep 2013 17:51:38 +0200
|
||||
Subject: wined3d: Move most of volume_map to resource.c
|
||||
@@ -13,10 +13,10 @@ boundary check behaviours.
|
||||
3 files changed, 124 insertions(+), 95 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
|
||||
index 8903353..4ca8189 100644
|
||||
index 11136de..ba18baa 100644
|
||||
--- a/dlls/wined3d/resource.c
|
||||
+++ b/dlls/wined3d/resource.c
|
||||
@@ -694,3 +694,118 @@ BOOL wined3d_resource_check_block_align(const struct wined3d_resource *resource,
|
||||
@@ -756,3 +756,118 @@ BOOL wined3d_resource_check_block_align(const struct wined3d_resource *resource,
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -136,7 +136,7 @@ index 8903353..4ca8189 100644
|
||||
+ return WINED3D_OK;
|
||||
+}
|
||||
diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
|
||||
index 4d7b349..3a85103 100644
|
||||
index e70fcf4..dd49d01 100644
|
||||
--- a/dlls/wined3d/volume.c
|
||||
+++ b/dlls/wined3d/volume.c
|
||||
@@ -404,26 +404,16 @@ static BOOL wined3d_volume_check_box_dimensions(const struct wined3d_volume *vol
|
||||
@@ -148,7 +148,7 @@ index 4d7b349..3a85103 100644
|
||||
- BYTE *base_memory;
|
||||
+ HRESULT hr;
|
||||
const struct wined3d_format *format = volume->resource.format;
|
||||
const unsigned int fmt_flags = volume->resource.format_flags;
|
||||
const unsigned int fmt_flags = volume->container->resource.format_flags;
|
||||
|
||||
- TRACE("volume %p, map_desc %p, box %p, flags %#x.\n",
|
||||
- volume, map_desc, box, flags);
|
||||
@@ -272,10 +272,10 @@ index 4d7b349..3a85103 100644
|
||||
|
||||
static ULONG volume_resource_incref(struct wined3d_resource *resource)
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index f51a7bf..de55416 100644
|
||||
index 8c511c1..9d33eb6 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2166,12 +2166,15 @@ void wined3d_resource_invalidate_location(struct wined3d_resource *resource, DWO
|
||||
@@ -2182,12 +2182,15 @@ void wined3d_resource_invalidate_location(struct wined3d_resource *resource, DWO
|
||||
BOOL wined3d_resource_is_offscreen(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
void wined3d_resource_load_location(struct wined3d_resource *resource,
|
||||
struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
|
||||
@@ -292,5 +292,5 @@ index f51a7bf..de55416 100644
|
||||
void wined3d_resource_validate_location(struct wined3d_resource *resource, DWORD location) DECLSPEC_HIDDEN;
|
||||
|
||||
--
|
||||
2.3.5
|
||||
2.4.2
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From a63cedcd66546c8005162c860211ce39e7e4cbcd Mon Sep 17 00:00:00 2001
|
||||
From 72f318318de11be998fbbf707dadeb204d51c899 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Thu, 19 Sep 2013 18:00:23 +0200
|
||||
Subject: wined3d: Use resource_map for surface_map.
|
||||
@@ -10,10 +10,10 @@ Subject: wined3d: Use resource_map for surface_map.
|
||||
3 files changed, 22 insertions(+), 89 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
|
||||
index b497955..12a26d8 100644
|
||||
index ba18baa..e5644ce 100644
|
||||
--- a/dlls/wined3d/resource.c
|
||||
+++ b/dlls/wined3d/resource.c
|
||||
@@ -795,7 +795,7 @@ HRESULT wined3d_resource_unmap(struct wined3d_resource *resource)
|
||||
@@ -858,7 +858,7 @@ HRESULT wined3d_resource_unmap(struct wined3d_resource *resource)
|
||||
if (!resource->map_count)
|
||||
{
|
||||
WARN("Trying to unlock an unlocked resource %p.\n", resource);
|
||||
@@ -23,10 +23,10 @@ index b497955..12a26d8 100644
|
||||
|
||||
if (device->d3d_initialized)
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 334335f..cf9c938 100644
|
||||
index f117013..a331e37 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -2474,47 +2474,26 @@ struct wined3d_surface * CDECL wined3d_surface_from_resource(struct wined3d_reso
|
||||
@@ -2476,47 +2476,26 @@ struct wined3d_surface * CDECL wined3d_surface_from_resource(struct wined3d_reso
|
||||
|
||||
HRESULT CDECL wined3d_surface_unmap(struct wined3d_surface *surface)
|
||||
{
|
||||
@@ -64,7 +64,7 @@ index 334335f..cf9c938 100644
|
||||
{
|
||||
+ struct wined3d_box box;
|
||||
const struct wined3d_format *format = surface->resource.format;
|
||||
unsigned int fmt_flags = surface->resource.format_flags;
|
||||
unsigned int fmt_flags = surface->container->resource.format_flags;
|
||||
- struct wined3d_device *device = surface->resource.device;
|
||||
- struct wined3d_context *context = NULL;
|
||||
- BYTE *base_memory;
|
||||
@@ -80,7 +80,7 @@ index 334335f..cf9c938 100644
|
||||
|
||||
if ((fmt_flags & WINED3DFMT_FLAG_BLOCKS) && rect
|
||||
&& !surface_check_block_align(surface, rect))
|
||||
@@ -2526,11 +2505,6 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
|
||||
@@ -2528,11 +2507,6 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ index 334335f..cf9c938 100644
|
||||
/* Performance optimization: Count how often a surface is mapped, if it is
|
||||
* mapped regularly do not throw away the system memory copy. This avoids
|
||||
* the need to download the surface from OpenGL all the time. The surface
|
||||
@@ -2546,72 +2520,26 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
|
||||
@@ -2548,72 +2522,26 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -175,7 +175,7 @@ index 334335f..cf9c938 100644
|
||||
|
||||
HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
|
||||
diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
|
||||
index 3a85103..a656736 100644
|
||||
index dd49d01..01ee33c 100644
|
||||
--- a/dlls/wined3d/volume.c
|
||||
+++ b/dlls/wined3d/volume.c
|
||||
@@ -441,7 +441,12 @@ struct wined3d_volume * CDECL wined3d_volume_from_resource(struct wined3d_resour
|
||||
@@ -193,5 +193,5 @@ index 3a85103..a656736 100644
|
||||
|
||||
static ULONG volume_resource_incref(struct wined3d_resource *resource)
|
||||
--
|
||||
2.3.5
|
||||
2.4.2
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 341f5f1a37a6da02cd3ed172d9e3c3d2653220b5 Mon Sep 17 00:00:00 2001
|
||||
From 9d0010d5add477e39747ac3e458d16b5b1fa101f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Tue, 24 Sep 2013 00:31:39 +0200
|
||||
Subject: wined3d: Don't call the public map function in surface_cpu_blt.
|
||||
@@ -8,7 +8,7 @@ Subject: wined3d: Don't call the public map function in surface_cpu_blt.
|
||||
1 file changed, 72 insertions(+), 35 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 08009da..b562f7a 100644
|
||||
index ff83f29..df8aea6 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -4428,21 +4428,36 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
|
||||
@@ -50,9 +50,9 @@ index 08009da..b562f7a 100644
|
||||
+ src_row_pitch = dst_row_pitch;
|
||||
src_format = dst_surface->resource.format;
|
||||
dst_format = src_format;
|
||||
dst_fmt_flags = dst_surface->resource.format_flags;
|
||||
dst_fmt_flags = dst_surface->container->resource.format_flags;
|
||||
@@ -4454,6 +4469,12 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
|
||||
dst_fmt_flags = dst_surface->resource.format_flags;
|
||||
dst_fmt_flags = dst_surface->container->resource.format_flags;
|
||||
if (src_surface)
|
||||
{
|
||||
+ if (!wined3d_resource_prepare_map_memory(&src_surface->resource, context))
|
||||
@@ -73,7 +73,7 @@ index 08009da..b562f7a 100644
|
||||
+ wined3d_resource_get_pitch(&src_surface->resource, &src_row_pitch, &src_slice_pitch);
|
||||
+ src_data = wined3d_resource_get_map_ptr(&src_surface->resource, context, 0);
|
||||
src_format = src_surface->resource.format;
|
||||
src_fmt_flags = src_surface->resource.format_flags;
|
||||
src_fmt_flags = src_surface->container->resource.format_flags;
|
||||
}
|
||||
@@ -4474,7 +4497,8 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
|
||||
src_fmt_flags = dst_fmt_flags;
|
||||
@@ -273,5 +273,5 @@ index 08009da..b562f7a 100644
|
||||
return hr;
|
||||
}
|
||||
--
|
||||
2.3.5
|
||||
2.4.2
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 8080f13758b622f549724df5d6f9932e8bf2531a Mon Sep 17 00:00:00 2001
|
||||
From fd7f91b6778e7afc1ee6334ccf7d5f9224030945 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Mon, 29 Apr 2013 18:49:53 +0200
|
||||
Subject: wined3d: Send blits through the command stream.
|
||||
@@ -12,7 +12,7 @@ between surface_blt and surface_blt_ugly isn't particularly nice.
|
||||
3 files changed, 226 insertions(+), 139 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 8087812..9531b2f 100644
|
||||
index 77bb485..b5b5ece 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -74,6 +74,7 @@ enum wined3d_cs_op
|
||||
@@ -108,7 +108,7 @@ index 8087812..9531b2f 100644
|
||||
{
|
||||
struct wined3d_cs_block *block;
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index a4a659b..32fc27c 100644
|
||||
index 8464ff1..59a92bf 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -5000,14 +5000,13 @@ const struct blit_shader cpu_blit = {
|
||||
@@ -250,8 +250,8 @@ index a4a659b..32fc27c 100644
|
||||
+ || src_rect->bottom - src_rect->top != dst_rect->bottom - dst_rect->top);
|
||||
convert = src_surface && src_surface->resource.format->id != dst_surface->resource.format->id;
|
||||
|
||||
dst_ds_flags = dst_surface->resource.format_flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL);
|
||||
@@ -5184,22 +5078,16 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
dst_ds_flags = dst_surface->container->resource.format_flags
|
||||
@@ -5186,22 +5080,16 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
TRACE("Depth fill.\n");
|
||||
|
||||
if (!surface_convert_depth_to_float(dst_surface, fx->u5.dwFillDepth, &depth))
|
||||
@@ -279,7 +279,7 @@ index a4a659b..32fc27c 100644
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -5230,8 +5118,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
@@ -5232,8 +5120,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
palette, fx->u5.dwFillColor, &color))
|
||||
goto fallback;
|
||||
|
||||
@@ -290,7 +290,7 @@ index a4a659b..32fc27c 100644
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -5259,9 +5147,9 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
@@ -5261,9 +5149,9 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
TRACE("Not doing upload because of format conversion.\n");
|
||||
else
|
||||
{
|
||||
@@ -302,7 +302,7 @@ index a4a659b..32fc27c 100644
|
||||
{
|
||||
if (!wined3d_resource_is_offscreen(&dst_surface->container->resource))
|
||||
{
|
||||
@@ -5270,7 +5158,7 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
@@ -5272,7 +5160,7 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
dst_surface->container->resource.draw_binding);
|
||||
context_release(context);
|
||||
}
|
||||
@@ -311,7 +311,7 @@ index a4a659b..32fc27c 100644
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5294,50 +5182,191 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
@@ -5296,50 +5184,191 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
wined3d_swapchain_present(dst_swapchain, NULL, NULL, dst_swapchain->win_handle, NULL, 0);
|
||||
dst_swapchain->desc.swap_effect = swap_effect;
|
||||
|
||||
@@ -517,10 +517,10 @@ index a4a659b..32fc27c 100644
|
||||
|
||||
static const struct wined3d_resource_ops surface_resource_ops =
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 908b004..9292862 100644
|
||||
index 85307b7..90c217a 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2444,6 +2444,9 @@ void wined3d_surface_destroy(struct wined3d_surface *surface) DECLSPEC_HIDDEN;
|
||||
@@ -2460,6 +2460,9 @@ void wined3d_surface_destroy(struct wined3d_surface *surface) DECLSPEC_HIDDEN;
|
||||
void wined3d_surface_upload_data(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info,
|
||||
const struct wined3d_format *format, const RECT *src_rect, UINT src_pitch, const POINT *dst_point,
|
||||
BOOL srgb, const struct wined3d_const_bo_address *data) DECLSPEC_HIDDEN;
|
||||
@@ -530,7 +530,7 @@ index 908b004..9292862 100644
|
||||
|
||||
void draw_textured_quad(const struct wined3d_surface *src_surface, struct wined3d_context *context,
|
||||
const RECT *src_rect, const RECT *dst_rect, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
|
||||
@@ -2593,6 +2596,7 @@ struct wined3d_cs
|
||||
@@ -2609,6 +2612,7 @@ struct wined3d_cs
|
||||
struct wined3d_device *device;
|
||||
struct wined3d_state state;
|
||||
HANDLE thread;
|
||||
@@ -538,7 +538,7 @@ index 908b004..9292862 100644
|
||||
DWORD tls_idx;
|
||||
struct wined3d_surface *onscreen_depth_stencil;
|
||||
|
||||
@@ -2671,6 +2675,10 @@ void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs,
|
||||
@@ -2687,6 +2691,10 @@ void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs,
|
||||
GLenum primitive_type) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light_info *light) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, UINT idx, BOOL enable) DECLSPEC_HIDDEN;
|
||||
@@ -550,5 +550,5 @@ index 908b004..9292862 100644
|
||||
/* Direct3D terminology with little modifications. We do not have an issued state
|
||||
* because only the driver knows about it, but we have a created state because d3d
|
||||
--
|
||||
2.3.5
|
||||
2.4.2
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From c2fe136d2b070ad027b0805a24ed3664f02150c8 Mon Sep 17 00:00:00 2001
|
||||
From 4ce0b7d84cd9b320205d4b1626f3486b73e95c03 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Sun, 6 Oct 2013 16:20:32 +0200
|
||||
Subject: wined3d: Clean up texture resources through the cs.
|
||||
@@ -10,7 +10,7 @@ Subject: wined3d: Clean up texture resources through the cs.
|
||||
3 files changed, 60 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 6010791..bea93f9 100644
|
||||
index 997c7d8..f7ede92 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -87,6 +87,7 @@ enum wined3d_cs_op
|
||||
@@ -70,10 +70,10 @@ index 6010791..bea93f9 100644
|
||||
|
||||
static inline void *_wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size, BOOL prio)
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index cded1c0..d0da497 100644
|
||||
index c94dc5b..63e0668 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -123,17 +123,26 @@ static void wined3d_texture_unload_gl_texture(struct wined3d_texture *texture)
|
||||
@@ -114,17 +114,26 @@ static void wined3d_texture_unload_gl_texture(struct wined3d_texture *texture)
|
||||
resource_unload(&texture->resource);
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ index cded1c0..d0da497 100644
|
||||
}
|
||||
|
||||
for (i = 0; i < sub_count; ++i)
|
||||
@@ -144,11 +153,8 @@ static void wined3d_texture_cleanup(struct wined3d_texture *texture)
|
||||
@@ -135,11 +144,8 @@ static void wined3d_texture_cleanup(struct wined3d_texture *texture)
|
||||
texture->texture_ops->texture_sub_resource_cleanup(sub_resource);
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ index cded1c0..d0da497 100644
|
||||
}
|
||||
|
||||
void wined3d_texture_set_swapchain(struct wined3d_texture *texture, struct wined3d_swapchain *swapchain)
|
||||
@@ -428,9 +434,10 @@ ULONG CDECL wined3d_texture_decref(struct wined3d_texture *texture)
|
||||
@@ -419,9 +425,10 @@ ULONG CDECL wined3d_texture_decref(struct wined3d_texture *texture)
|
||||
|
||||
if (!refcount)
|
||||
{
|
||||
@@ -127,7 +127,7 @@ index cded1c0..d0da497 100644
|
||||
}
|
||||
|
||||
return refcount;
|
||||
@@ -1012,6 +1019,7 @@ static HRESULT cubetexture_init(struct wined3d_texture *texture, const struct wi
|
||||
@@ -1003,6 +1010,7 @@ static HRESULT cubetexture_init(struct wined3d_texture *texture, const struct wi
|
||||
if (WINED3DFMT_UNKNOWN >= desc->format)
|
||||
{
|
||||
WARN("(%p) : Texture cannot be created with a format of WINED3DFMT_UNKNOWN.\n", texture);
|
||||
@@ -135,7 +135,7 @@ index cded1c0..d0da497 100644
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@@ -1021,12 +1029,14 @@ static HRESULT cubetexture_init(struct wined3d_texture *texture, const struct wi
|
||||
@@ -1012,12 +1020,14 @@ static HRESULT cubetexture_init(struct wined3d_texture *texture, const struct wi
|
||||
if (!gl_info->supported[SGIS_GENERATE_MIPMAP])
|
||||
{
|
||||
WARN("No mipmap generation support, returning D3DERR_INVALIDCALL.\n");
|
||||
@@ -150,7 +150,7 @@ index cded1c0..d0da497 100644
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
}
|
||||
@@ -1047,6 +1057,7 @@ static HRESULT cubetexture_init(struct wined3d_texture *texture, const struct wi
|
||||
@@ -1038,6 +1048,7 @@ static HRESULT cubetexture_init(struct wined3d_texture *texture, const struct wi
|
||||
else
|
||||
{
|
||||
WARN("Attempted to create a NPOT cube texture (edge length %u) without GL support.\n", desc->width);
|
||||
@@ -158,23 +158,23 @@ index cded1c0..d0da497 100644
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
}
|
||||
@@ -1056,6 +1067,7 @@ static HRESULT cubetexture_init(struct wined3d_texture *texture, const struct wi
|
||||
surface_flags, WINED3D_GL_RES_TYPE_TEX_CUBE, device, parent, parent_ops, &texture_resource_ops)))
|
||||
@@ -1047,6 +1058,7 @@ static HRESULT cubetexture_init(struct wined3d_texture *texture, const struct wi
|
||||
surface_flags, device, parent, parent_ops, &texture_resource_ops)))
|
||||
{
|
||||
WARN("Failed to initialize texture, returning %#x\n", hr);
|
||||
+ HeapFree(GetProcessHeap(), 0, texture);
|
||||
return hr;
|
||||
}
|
||||
|
||||
@@ -1121,6 +1133,7 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
|
||||
@@ -1109,6 +1121,7 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
|
||||
if (WINED3DFMT_UNKNOWN >= desc->format)
|
||||
{
|
||||
WARN("(%p) : Texture cannot be created with a format of WINED3DFMT_UNKNOWN.\n", texture);
|
||||
+ HeapFree(GetProcessHeap(), 0, texture);
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
format = wined3d_get_format(gl_info, desc->format);
|
||||
@@ -1152,6 +1165,7 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
|
||||
|
||||
@@ -1139,6 +1152,7 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
|
||||
else
|
||||
{
|
||||
WARN("Attempted to create a mipmapped NPOT texture without unconditional NPOT support.\n");
|
||||
@@ -182,7 +182,7 @@ index cded1c0..d0da497 100644
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
}
|
||||
@@ -1164,12 +1178,14 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
|
||||
@@ -1151,12 +1165,14 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
|
||||
if (!gl_info->supported[SGIS_GENERATE_MIPMAP])
|
||||
{
|
||||
WARN("No mipmap generation support, returning WINED3DERR_INVALIDCALL.\n");
|
||||
@@ -197,15 +197,15 @@ index cded1c0..d0da497 100644
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
}
|
||||
@@ -1195,6 +1211,7 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
|
||||
surface_flags, WINED3D_GL_RES_TYPE_TEX_2D, device, parent, parent_ops, &texture_resource_ops)))
|
||||
@@ -1165,6 +1181,7 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
|
||||
surface_flags, device, parent, parent_ops, &texture_resource_ops)))
|
||||
{
|
||||
WARN("Failed to initialize texture, returning %#x.\n", hr);
|
||||
+ HeapFree(GetProcessHeap(), 0, texture);
|
||||
return hr;
|
||||
}
|
||||
|
||||
@@ -1367,12 +1384,14 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct
|
||||
@@ -1337,12 +1354,14 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct
|
||||
if (WINED3DFMT_UNKNOWN >= desc->format)
|
||||
{
|
||||
WARN("(%p) : Texture cannot be created with a format of WINED3DFMT_UNKNOWN.\n", texture);
|
||||
@@ -220,7 +220,7 @@ index cded1c0..d0da497 100644
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@@ -1382,12 +1401,14 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct
|
||||
@@ -1352,12 +1371,14 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct
|
||||
if (!gl_info->supported[SGIS_GENERATE_MIPMAP])
|
||||
{
|
||||
WARN("No mipmap generation support, returning D3DERR_INVALIDCALL.\n");
|
||||
@@ -235,7 +235,7 @@ index cded1c0..d0da497 100644
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
}
|
||||
@@ -1415,6 +1436,7 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct
|
||||
@@ -1385,6 +1406,7 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct
|
||||
{
|
||||
WARN("Attempted to create a NPOT volume texture (%u, %u, %u) without GL support.\n",
|
||||
desc->width, desc->height, desc->depth);
|
||||
@@ -243,15 +243,15 @@ index cded1c0..d0da497 100644
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
}
|
||||
@@ -1424,6 +1446,7 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct
|
||||
0, WINED3D_GL_RES_TYPE_TEX_3D, device, parent, parent_ops, &texture_resource_ops)))
|
||||
@@ -1394,6 +1416,7 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct
|
||||
0, device, parent, parent_ops, &texture_resource_ops)))
|
||||
{
|
||||
WARN("Failed to initialize texture, returning %#x.\n", hr);
|
||||
+ HeapFree(GetProcessHeap(), 0, texture);
|
||||
return hr;
|
||||
}
|
||||
|
||||
@@ -1500,7 +1523,6 @@ HRESULT CDECL wined3d_texture_create(struct wined3d_device *device, const struct
|
||||
@@ -1470,7 +1493,6 @@ HRESULT CDECL wined3d_texture_create(struct wined3d_device *device, const struct
|
||||
if (FAILED(hr))
|
||||
{
|
||||
WARN("Failed to initialize texture, returning %#x.\n", hr);
|
||||
@@ -260,10 +260,10 @@ index cded1c0..d0da497 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index de97d8b..f9a459a 100644
|
||||
index b40d7d3..a0e9871 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2332,6 +2332,7 @@ static inline struct gl_texture *wined3d_texture_get_gl_texture(struct wined3d_t
|
||||
@@ -2343,6 +2343,7 @@ static inline struct gl_texture *wined3d_texture_get_gl_texture(struct wined3d_t
|
||||
|
||||
void wined3d_texture_apply_sampler_desc(struct wined3d_texture *texture,
|
||||
const struct wined3d_sampler_desc *sampler_desc, const struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN;
|
||||
@@ -271,7 +271,7 @@ index de97d8b..f9a459a 100644
|
||||
void wined3d_texture_bind(struct wined3d_texture *texture,
|
||||
struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN;
|
||||
void wined3d_texture_bind_and_dirtify(struct wined3d_texture *texture,
|
||||
@@ -2761,6 +2762,7 @@ void wined3d_cs_emit_resource_cleanup(struct wined3d_cs *cs,
|
||||
@@ -2772,6 +2773,7 @@ void wined3d_cs_emit_resource_cleanup(struct wined3d_cs *cs,
|
||||
void wined3d_cs_emit_buffer_cleanup(struct wined3d_cs *cs, struct wined3d_buffer *buffer) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_volume_cleanup(struct wined3d_cs *cs, struct wined3d_volume *volume) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_surface_cleanup(struct wined3d_cs *cs, struct wined3d_surface *surface) DECLSPEC_HIDDEN;
|
||||
@@ -280,5 +280,5 @@ index de97d8b..f9a459a 100644
|
||||
/* Direct3D terminology with little modifications. We do not have an issued state
|
||||
* because only the driver knows about it, but we have a created state because d3d
|
||||
--
|
||||
2.3.5
|
||||
2.4.2
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user