Rebase against f0053d06c4fc168360da638fa26f1927fe975262.

This commit is contained in:
Sebastian Lackner 2016-02-09 23:57:18 +01:00
parent cf7f966347
commit e2e98ce27a
4 changed files with 121 additions and 121 deletions

View File

@ -1,4 +1,4 @@
From 166196873b1b6149e6f026abefef31b17e087cf4 Mon Sep 17 00:00:00 2001
From fa15751fb4c91885360b81474abf16b5a4b93a99 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 20 Jul 2014 22:22:14 +0200
Subject: wined3d: allow changing strict drawing through an exported function
@ -9,7 +9,7 @@ Subject: wined3d: allow changing strict drawing through an exported function
2 files changed, 7 insertions(+)
diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec
index 53eb97a..57500f2 100644
index d31cf9a..dd2def2 100644
--- a/dlls/wined3d/wined3d.spec
+++ b/dlls/wined3d/wined3d.spec
@@ -222,6 +222,8 @@
@ -20,7 +20,7 @@ index 53eb97a..57500f2 100644
+
@ cdecl wined3d_surface_get_parent(ptr)
@ cdecl wined3d_surface_get_pitch(ptr)
@ cdecl wined3d_surface_update_overlay_z_order(ptr long ptr)
diff --git a/dlls/wined3d/wined3d_main.c b/dlls/wined3d/wined3d_main.c
index 0543d97..78cc3a2 100644
--- a/dlls/wined3d/wined3d_main.c

View File

@ -51,7 +51,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "02008a6f2e373ba4ff06deb8ca124ecd65b57227"
echo "f0053d06c4fc168360da638fa26f1927fe975262"
}
# Show version information

View File

@ -1,4 +1,4 @@
From 9ac5eaa0e224fa33ef7afc9520d54262de9e506d Mon Sep 17 00:00:00 2001
From 0121313746277d4ade36ddf19f616fbbb481304e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 19 Sep 2013 14:22:24 +0200
Subject: wined3d: Merge get_pitch functions.
@ -51,7 +51,7 @@ index 44cdb43..ed598cc 100644
+ TRACE("Returning row pitch %u, slice pitch %u.\n", *row_pitch, *slice_pitch);
+}
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index b14d0a3..df9b855 100644
index 65cb3b7..293b78d 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -364,6 +364,7 @@ HRESULT surface_create_dib_section(struct wined3d_surface *surface)
@ -157,8 +157,8 @@ index b14d0a3..df9b855 100644
+ return row_pitch;
}
HRESULT CDECL wined3d_surface_update_overlay_z_order(struct wined3d_surface *surface,
@@ -2020,20 +2011,21 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
@@ -1959,20 +1950,21 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
surface->resource.map_binding = WINED3D_LOCATION_USER_MEMORY;
valid_location = WINED3D_LOCATION_USER_MEMORY;
}
@ -184,7 +184,7 @@ index b14d0a3..df9b855 100644
}
/* The format might be changed to a format that needs conversion.
@@ -2655,7 +2647,7 @@ HRESULT wined3d_surface_map(struct wined3d_surface *surface, struct wined3d_map_
@@ -2594,7 +2586,7 @@ HRESULT wined3d_surface_map(struct wined3d_surface *surface, struct wined3d_map_
if (fmt_flags & WINED3DFMT_FLAG_BROKEN_PITCH)
map_desc->row_pitch = surface->resource.width * format->byte_count;
else
@ -193,7 +193,7 @@ index b14d0a3..df9b855 100644
map_desc->slice_pitch = surface->resource.height * map_desc->row_pitch;
if (!box)
@@ -2706,6 +2698,7 @@ static void read_from_framebuffer(struct wined3d_surface *surface,
@@ -2645,6 +2637,7 @@ static void read_from_framebuffer(struct wined3d_surface *surface,
int i;
BOOL srcIsUpsideDown;
struct wined3d_bo_address data;
@ -201,7 +201,7 @@ index b14d0a3..df9b855 100644
surface_get_memory(surface, &data, dst_location);
@@ -2747,8 +2740,8 @@ static void read_from_framebuffer(struct wined3d_surface *surface,
@@ -2686,8 +2679,8 @@ static void read_from_framebuffer(struct wined3d_surface *surface,
}
/* Setup pixel store pack state -- to glReadPixels into the correct place */
@ -212,7 +212,7 @@ index b14d0a3..df9b855 100644
checkGLcall("glPixelStorei");
gl_info->gl_ops.gl.p_glReadPixels(0, 0,
@@ -2765,8 +2758,6 @@ static void read_from_framebuffer(struct wined3d_surface *surface,
@@ -2704,8 +2697,6 @@ static void read_from_framebuffer(struct wined3d_surface *surface,
{
/* glReadPixels returns the image upside down, and there is no way to prevent this.
* Flip the lines in software. */
@ -221,7 +221,7 @@ index b14d0a3..df9b855 100644
if (!(row = HeapAlloc(GetProcessHeap(), 0, pitch)))
goto error;
@@ -3920,7 +3911,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -3859,7 +3850,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
struct wined3d_device *device = surface->resource.device;
const struct wined3d_color_key_conversion *conversion;
struct wined3d_texture *texture = surface->container;
@ -230,7 +230,7 @@ index b14d0a3..df9b855 100644
struct wined3d_bo_address data;
struct wined3d_format format;
POINT dst_point = {0, 0};
@@ -4005,7 +3996,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -3944,7 +3935,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
wined3d_texture_bind_and_dirtify(texture, context, srgb);
width = surface->resource.width;
@ -239,7 +239,7 @@ index b14d0a3..df9b855 100644
format = *texture->resource.format;
if ((conversion = wined3d_format_get_color_key_conversion(texture, TRUE)))
@@ -4043,9 +4034,9 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -3982,9 +3973,9 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
context_release(context);
return E_OUTOFMEMORY;
}
@ -251,7 +251,7 @@ index b14d0a3..df9b855 100644
data.addr = mem;
}
else if (conversion)
@@ -4065,14 +4056,14 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4004,14 +3995,14 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
}
if (texture->swapchain && texture->swapchain->palette)
palette = texture->swapchain->palette;
@ -270,10 +270,10 @@ index b14d0a3..df9b855 100644
HeapFree(GetProcessHeap(), 0, mem);
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index 297ab27..6daf572 100644
index 0c48c91..8646e82 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -1142,7 +1142,7 @@ static void texture3d_sub_resource_upload_data(struct wined3d_resource *sub_reso
@@ -1141,7 +1141,7 @@ static void texture3d_sub_resource_upload_data(struct wined3d_resource *sub_reso
struct wined3d_const_bo_address addr;
unsigned int row_pitch, slice_pitch;
@ -336,10 +336,10 @@ index 3ac7f98..9235f3f 100644
if (!box)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 1f29257..865f476 100644
index 8b2cdb2..a0b7681 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2275,6 +2275,7 @@ struct wined3d_resource
@@ -2276,6 +2276,7 @@ struct wined3d_resource
UINT size;
DWORD priority;
void *heap_memory;
@ -347,7 +347,7 @@ index 1f29257..865f476 100644
struct list resource_list_entry;
void *parent;
@@ -2302,6 +2303,8 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
@@ -2303,6 +2304,8 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
void resource_unload(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
BOOL wined3d_resource_allocate_sysmem(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
void wined3d_resource_free_sysmem(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
@ -356,7 +356,7 @@ index 1f29257..865f476 100644
GLbitfield wined3d_resource_gl_map_flags(DWORD d3d_flags) DECLSPEC_HIDDEN;
GLenum wined3d_resource_gl_legacy_map_flags(DWORD d3d_flags) DECLSPEC_HIDDEN;
BOOL wined3d_resource_is_offscreen(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
@@ -2437,7 +2440,6 @@ BOOL volume_prepare_system_memory(struct wined3d_volume *volume) DECLSPEC_HIDDEN
@@ -2438,7 +2441,6 @@ BOOL volume_prepare_system_memory(struct wined3d_volume *volume) DECLSPEC_HIDDEN
HRESULT wined3d_volume_create(struct wined3d_texture *container, const struct wined3d_resource_desc *desc,
unsigned int level, struct wined3d_volume **volume) DECLSPEC_HIDDEN;
void wined3d_volume_destroy(struct wined3d_volume *volume) DECLSPEC_HIDDEN;
@ -364,7 +364,7 @@ index 1f29257..865f476 100644
void wined3d_volume_load(struct wined3d_volume *volume, struct wined3d_context *context,
BOOL srgb_mode) DECLSPEC_HIDDEN;
void wined3d_volume_invalidate_location(struct wined3d_volume *volume, DWORD location) DECLSPEC_HIDDEN;
@@ -2490,7 +2492,6 @@ struct wined3d_surface
@@ -2491,7 +2493,6 @@ struct wined3d_surface
DWORD flags;

View File

@ -5750,8 +5750,8 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
+#endif /* STAGING_CSMT */
}
HRESULT CDECL wined3d_surface_update_overlay_z_order(struct wined3d_surface *surface,
@@ -1749,6 +2195,7 @@
HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
@@ -1735,6 +2181,7 @@
{
DeleteDC(surface->hDC);
DeleteObject(surface->dib.DIBsection);
@ -5759,7 +5759,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
surface->resource.bitmap_data = NULL;
surface->flags &= ~SFLAG_DIBSECTION;
create_dib = TRUE;
@@ -1757,6 +2204,15 @@
@@ -1743,6 +2190,15 @@
surface->resource.locations = 0;
wined3d_resource_free_sysmem(&surface->resource);
surface->resource.map_heap_memory = NULL;
@ -5775,7 +5775,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
width = texture_resource->width;
height = texture_resource->height;
@@ -1782,6 +2238,7 @@
@@ -1768,6 +2224,7 @@
else
surface->flags &= ~SFLAG_NONPOW2;
@ -5783,7 +5783,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if ((surface->resource.user_memory = mem))
{
surface->resource.map_binding = WINED3D_LOCATION_USER_MEMORY;
@@ -1802,6 +2259,27 @@
@@ -1788,6 +2245,27 @@
surface->resource.size = wined3d_format_calculate_size(texture_resource->format,
1, width, height, 1);
surface->resource.custom_row_pitch = wined3d_format_calculate_pitch(texture_resource->format, width);
@ -5811,7 +5811,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
/* The format might be changed to a format that needs conversion.
@@ -1824,11 +2302,19 @@
@@ -1810,11 +2288,19 @@
if (!valid_location)
{
@ -5831,7 +5831,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
return WINED3D_OK;
}
@@ -2187,6 +2673,7 @@
@@ -2173,6 +2659,7 @@
static struct wined3d_texture *surface_convert_format(struct wined3d_surface *source, enum wined3d_format_id to_fmt)
{
@ -5839,7 +5839,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
void *dst_data = NULL, *src_data = NULL;
UINT src_row_pitch, src_slice_pitch, dst_row_pitch, dst_slice_pitch;
const struct d3dfmt_converter_desc *conv;
@@ -2195,6 +2682,13 @@
@@ -2181,6 +2668,13 @@
struct wined3d_surface *dst;
struct wined3d_context *context = NULL;
struct wined3d_device *device = source->resource.device;
@ -5853,7 +5853,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
conv = find_converter(source->resource.format->id, to_fmt);
if (!conv)
@@ -2219,6 +2713,7 @@
@@ -2205,6 +2699,7 @@
}
dst = surface_from_resource(wined3d_texture_get_sub_resource(ret, 0));
@ -5861,7 +5861,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
wined3d_resource_get_pitch(&source->resource, &src_row_pitch, &src_slice_pitch);
wined3d_resource_get_pitch(&ret->resource, &dst_row_pitch, &dst_slice_pitch);
@@ -2259,6 +2754,32 @@
@@ -2245,6 +2740,32 @@
if (context)
context_release(context);
return NULL;
@ -5894,7 +5894,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
static HRESULT _Blt_ColorFill(BYTE *buf, unsigned int width, unsigned int height,
@@ -2321,6 +2842,7 @@
@@ -2307,6 +2828,7 @@
HRESULT wined3d_surface_unmap(struct wined3d_surface *surface)
{
@ -5902,7 +5902,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
HRESULT hr;
TRACE("surface %p.\n", surface);
@@ -2331,6 +2853,20 @@
@@ -2317,6 +2839,20 @@
memset(&surface->lockedRect, 0, sizeof(surface->lockedRect));
return hr;
@ -5923,7 +5923,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
HRESULT wined3d_surface_map(struct wined3d_surface *surface, struct wined3d_map_desc *map_desc,
@@ -2338,6 +2874,21 @@
@@ -2324,6 +2860,21 @@
{
const struct wined3d_format *format = surface->resource.format;
unsigned int fmt_flags = surface->container->resource.format_flags;
@ -5945,7 +5945,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if ((fmt_flags & WINED3DFMT_FLAG_BLOCKS) && box
&& !surface_check_block_align(surface, box))
@@ -2349,6 +2900,13 @@
@@ -2335,6 +2886,13 @@
return WINED3DERR_INVALIDCALL;
}
@ -5959,7 +5959,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
/* 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
@@ -2364,6 +2922,7 @@
@@ -2350,6 +2908,7 @@
}
}
@ -5967,7 +5967,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if (box)
{
surface->lockedRect.left = box->left;
@@ -2453,6 +3012,119 @@
@@ -2439,6 +2998,119 @@
DWORD slice_pitch, pitch;
wined3d_resource_get_memory(&surface->resource, dst_location, &data);
@ -6087,7 +6087,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if (surface != old_ctx->current_rt)
{
@@ -2492,8 +3164,13 @@
@@ -2478,8 +3150,13 @@
}
/* Setup pixel store pack state -- to glReadPixels into the correct place */
@ -6101,7 +6101,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
checkGLcall("glPixelStorei");
gl_info->gl_ops.gl.p_glReadPixels(0, 0,
@@ -2510,6 +3187,10 @@
@@ -2496,6 +3173,10 @@
{
/* glReadPixels returns the image upside down, and there is no way to prevent this.
* Flip the lines in software. */
@ -6112,7 +6112,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if (!(row = HeapAlloc(GetProcessHeap(), 0, pitch)))
goto error;
@@ -2754,8 +3435,13 @@
@@ -2740,8 +3421,13 @@
/* The texture is now most up to date - If the surface is a render target
* and has a drawable, this path is never entered. */
@ -6126,7 +6126,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
/* Uses the hardware to stretch and flip the image */
@@ -2823,7 +3509,11 @@
@@ -2809,7 +3495,11 @@
checkGLcall("glEnable(texture_target)");
/* For now invalidate the texture copy of the back buffer. Drawable and sysmem copy are untouched */
@ -6138,7 +6138,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
/* Make sure that the top pixel is always above the bottom pixel, and keep a separate upside down flag
@@ -3020,6 +3710,7 @@
@@ -3006,6 +3696,7 @@
checkGLcall("glDeleteTextures(1, &backup)");
}
@ -6146,7 +6146,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if (wined3d_settings.cs_multithreaded)
gl_info->gl_ops.gl.p_glFinish();
else if (wined3d_settings.strict_draw_ordering)
@@ -3031,6 +3722,17 @@
@@ -3017,6 +3708,17 @@
* and has a drawable, this path is never entered. */
wined3d_resource_validate_location(&dst_surface->resource, WINED3D_LOCATION_TEXTURE_RGB);
wined3d_resource_invalidate_location(&dst_surface->resource, ~WINED3D_LOCATION_TEXTURE_RGB);
@ -6164,7 +6164,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
/* Front buffer coordinates are always full screen coordinates, but our GL
@@ -3085,9 +3787,15 @@
@@ -3071,9 +3773,15 @@
gl_info = context->gl_info;
@ -6180,7 +6180,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
wined3d_texture_load(src_surface->container, context, FALSE);
/* Activate the destination context, set it up for blitting */
@@ -3130,9 +3838,13 @@
@@ -3116,9 +3824,13 @@
/* Leave the opengl state valid for blitting */
device->blitter->unset_shader(context->gl_info);
@ -6194,7 +6194,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|| (dst_surface->container->swapchain
&& dst_surface->container->swapchain->front_buffer == dst_surface->container))
gl_info->gl_ops.gl.p_glFlush(); /* Flush to ensure ordering across contexts. */
@@ -3145,8 +3857,13 @@
@@ -3131,8 +3843,13 @@
{
struct wined3d_resource *resource = &s->container->resource;
struct wined3d_device *device = resource->device;
@ -6208,7 +6208,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
const struct blit_shader *blitter;
HRESULT hr;
@@ -3157,6 +3874,7 @@
@@ -3143,6 +3860,7 @@
return WINED3DERR_INVALIDCALL;
}
@ -6216,7 +6216,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
/* Can't incref / decref the resource here. This is executed inside the worker
* thread. Playing with the refcount here makes the worker thread visible to
* the client lib. Problems occur when the worker thread happens to hold the
@@ -3173,6 +3891,21 @@
@@ -3159,6 +3877,21 @@
view.sub_resource_idx = s->texture_layer * texture->level_count + s->texture_level;
hr = blitter->color_fill(device, &view, rect, color);
@ -6238,7 +6238,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
return hr;
}
@@ -3182,8 +3915,13 @@
@@ -3168,8 +3901,13 @@
enum wined3d_texture_filter_type filter)
{
struct wined3d_device *device = dst_surface->resource.device;
@ -6252,7 +6252,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
TRACE("dst_surface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#x, blt_fx %p, filter %s.\n",
dst_surface, wine_dbgstr_rect(dst_rect), src_surface, wine_dbgstr_rect(src_rect),
@@ -3374,6 +4112,7 @@
@@ -3360,6 +4098,7 @@
{
TRACE("surface %p, new location %#x, w %u, h %u.\n", surface, location, w, h);
@ -6260,7 +6260,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if (((surface->resource.locations & WINED3D_LOCATION_TEXTURE_RGB) && !(location & WINED3D_LOCATION_TEXTURE_RGB))
|| (!(surface->resource.locations & WINED3D_LOCATION_TEXTURE_RGB)
&& (location & WINED3D_LOCATION_TEXTURE_RGB)))
@@ -3382,6 +4121,15 @@
@@ -3368,6 +4107,15 @@
surface->ds_current_size.cx = w;
surface->ds_current_size.cy = h;
surface->resource.locations = location;
@ -6276,7 +6276,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
/* Context activation is done by the caller. */
@@ -3396,7 +4144,11 @@
@@ -3382,7 +4130,11 @@
/* TODO: Make this work for modes other than FBO */
if (wined3d_settings.offscreen_rendering_mode != ORM_FBO) return;
@ -6288,7 +6288,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
{
w = surface->ds_current_size.cx;
h = surface->ds_current_size.cy;
@@ -3423,6 +4175,7 @@
@@ -3409,6 +4161,7 @@
}
wined3d_surface_prepare(surface, context, location);
@ -6296,7 +6296,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if (surface->resource.locations & WINED3D_LOCATION_DISCARDED)
{
TRACE("Surface was discarded, no need copy data.\n");
@@ -3437,6 +4190,22 @@
@@ -3423,6 +4176,22 @@
{
FIXME("No up to date depth stencil location.\n");
surface->resource.locations |= location;
@ -6319,7 +6319,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
surface->ds_current_size.cx = surface->resource.width;
surface->ds_current_size.cy = surface->resource.height;
return;
@@ -3500,9 +4269,13 @@
@@ -3486,9 +4255,13 @@
context_invalidate_state(context, STATE_FRAMEBUFFER);
@ -6333,7 +6333,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
gl_info->gl_ops.gl.p_glFlush(); /* Flush to ensure ordering across contexts. */
}
else if (location == WINED3D_LOCATION_DRAWABLE)
@@ -3518,9 +4291,13 @@
@@ -3504,9 +4277,13 @@
context_invalidate_state(context, STATE_FRAMEBUFFER);
@ -6347,7 +6347,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
gl_info->gl_ops.gl.p_glFlush(); /* Flush to ensure ordering across contexts. */
}
else
@@ -3528,6 +4305,7 @@
@@ -3514,6 +4291,7 @@
ERR("Invalid location (%#x) specified.\n", location);
}
@ -6355,7 +6355,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
surface->resource.locations |= location;
surface->ds_current_size.cx = surface->resource.width;
surface->ds_current_size.cy = surface->resource.height;
@@ -3560,6 +4338,124 @@
@@ -3546,6 +4324,124 @@
FIXME("Can't load surface %p with location flags %s into sysmem.\n",
surface, wined3d_debug_location(surface->resource.locations));
@ -6480,7 +6480,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
/* Context activation is done by the caller. */
@@ -3568,12 +4464,14 @@
@@ -3554,12 +4450,14 @@
{
RECT r;
@ -6495,7 +6495,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if (wined3d_settings.offscreen_rendering_mode == ORM_FBO
&& wined3d_resource_is_offscreen(&surface->container->resource))
{
@@ -3582,7 +4480,11 @@
@@ -3568,7 +4466,11 @@
}
surface_get_rect(surface, NULL, &r);
@ -6507,7 +6507,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
surface_blt_to_drawable(surface->resource.device, context,
WINED3D_TEXF_POINT, FALSE, surface, &r, surface, &r);
@@ -3597,6 +4499,7 @@
@@ -3583,6 +4485,7 @@
struct wined3d_device *device = surface->resource.device;
const struct wined3d_color_key_conversion *conversion;
struct wined3d_texture *texture = surface->container;
@ -6515,7 +6515,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
UINT width, src_row_pitch, src_slice_pitch, dst_pitch;
struct wined3d_bo_address data;
struct wined3d_format format;
@@ -3623,6 +4526,24 @@
@@ -3609,6 +4512,24 @@
}
if (surface->resource.locations & (WINED3D_LOCATION_TEXTURE_SRGB | WINED3D_LOCATION_TEXTURE_RGB)
@ -6540,7 +6540,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
&& (surface->container->resource.format_flags & WINED3DFMT_FLAG_FBO_ATTACHABLE_SRGB)
&& fbo_blit_supported(gl_info, WINED3D_BLIT_OP_COLOR_BLIT,
NULL, surface->resource.usage, surface->resource.pool, surface->resource.format,
@@ -3638,6 +4559,7 @@
@@ -3624,6 +4545,7 @@
return WINED3D_OK;
}
@ -6548,7 +6548,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if (surface->resource.locations & (WINED3D_LOCATION_RB_MULTISAMPLE | WINED3D_LOCATION_RB_RESOLVED)
&& (!srgb || (surface->container->resource.format_flags & WINED3DFMT_FLAG_FBO_ATTACHABLE_SRGB))
&& fbo_blit_supported(gl_info, WINED3D_BLIT_OP_COLOR_BLIT,
@@ -3645,6 +4567,15 @@
@@ -3631,6 +4553,15 @@
NULL, surface->resource.usage, surface->resource.pool, surface->resource.format))
{
DWORD src_location = surface->resource.locations & WINED3D_LOCATION_RB_RESOLVED ?
@ -6564,7 +6564,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
WINED3D_LOCATION_RB_RESOLVED : WINED3D_LOCATION_RB_MULTISAMPLE;
DWORD dst_location = srgb ? WINED3D_LOCATION_TEXTURE_SRGB : WINED3D_LOCATION_TEXTURE_RGB;
RECT rect = {0, 0, surface->resource.width, surface->resource.height};
@@ -3659,6 +4590,7 @@
@@ -3645,6 +4576,7 @@
if (srgb)
{
@ -6572,7 +6572,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if ((surface->resource.locations & (WINED3D_LOCATION_TEXTURE_RGB | surface->resource.map_binding))
== WINED3D_LOCATION_TEXTURE_RGB)
{
@@ -3693,6 +4625,42 @@
@@ -3679,6 +4611,42 @@
width = surface->resource.width;
wined3d_resource_get_pitch(&surface->resource, &src_row_pitch, &src_slice_pitch);
@ -6615,7 +6615,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
format = *texture->resource.format;
if ((conversion = wined3d_format_get_color_key_conversion(texture, TRUE)))
@@ -3701,7 +4669,11 @@
@@ -3687,7 +4655,11 @@
/* Don't use PBOs for converted surfaces. During PBO conversion we look at
* WINED3D_TEXTURE_CONVERTED but it isn't set (yet) in all cases it is
* getting called. */
@ -6627,7 +6627,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
{
TRACE("Removing the pbo attached to surface %p.\n", surface);
@@ -3710,6 +4682,7 @@
@@ -3696,6 +4668,7 @@
else
surface->resource.map_binding = WINED3D_LOCATION_SYSMEM;
@ -6635,7 +6635,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
wined3d_resource_prepare_map_memory(&surface->resource, context);
wined3d_resource_load_location(&surface->resource, context, surface->resource.map_binding);
wined3d_resource_free_bo(&surface->resource);
@@ -3717,6 +4690,14 @@
@@ -3703,6 +4676,14 @@
}
wined3d_resource_get_memory(&surface->resource, surface->resource.locations, &data);
@ -6650,7 +6650,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if (format.convert)
{
/* This code is entered for texture formats which need a fixup. */
@@ -3731,9 +4712,15 @@
@@ -3717,9 +4698,15 @@
context_release(context);
return E_OUTOFMEMORY;
}
@ -6666,7 +6666,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
data.addr = mem;
}
else if (conversion)
@@ -3753,6 +4740,7 @@
@@ -3739,6 +4726,7 @@
}
if (texture->swapchain && texture->swapchain->palette)
palette = texture->swapchain->palette;
@ -6674,7 +6674,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
conversion->convert(data.addr, src_row_pitch, mem, dst_pitch,
width, height, palette, &texture->async.gl_color_key);
src_row_pitch = dst_pitch;
@@ -3761,6 +4749,16 @@
@@ -3747,6 +4735,16 @@
wined3d_surface_upload_data(surface, gl_info, &format, &src_rect,
src_row_pitch, &dst_point, srgb, wined3d_const_bo_address(&data));
@ -6691,7 +6691,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
HeapFree(GetProcessHeap(), 0, mem);
@@ -3774,11 +4772,19 @@
@@ -3760,11 +4758,19 @@
const RECT rect = {0, 0, surface->resource.width, surface->resource.height};
DWORD src_location;
@ -6711,7 +6711,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
src_location = WINED3D_LOCATION_TEXTURE_SRGB;
else /* surface_blt_fbo will load the source location if necessary. */
src_location = WINED3D_LOCATION_TEXTURE_RGB;
@@ -3787,11 +4793,17 @@
@@ -3773,11 +4779,17 @@
surface, src_location, &rect, surface, dst_location, &rect);
}
@ -6729,7 +6729,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
HRESULT hr;
TRACE("surface %p, location %s.\n", surface, wined3d_debug_location(location));
@@ -3799,6 +4811,7 @@
@@ -3785,6 +4797,7 @@
if (surface->resource.usage & WINED3DUSAGE_DEPTHSTENCIL)
{
if (location == WINED3D_LOCATION_TEXTURE_RGB
@ -6737,7 +6737,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
&& surface->resource.locations & (WINED3D_LOCATION_DRAWABLE | WINED3D_LOCATION_DISCARDED))
{
surface_load_ds_location(surface, context, location);
@@ -3822,6 +4835,45 @@
@@ -3808,6 +4821,45 @@
{
ERR("Surface %p does not have any up to date location.\n", surface);
return;
@ -6783,7 +6783,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
switch (location)
@@ -3835,7 +4887,11 @@
@@ -3821,7 +4873,11 @@
case WINED3D_LOCATION_DRAWABLE:
if (FAILED(hr = surface_load_drawable(surface, context)))
@ -6795,7 +6795,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
break;
case WINED3D_LOCATION_RB_RESOLVED:
@@ -3847,7 +4903,11 @@
@@ -3833,7 +4889,11 @@
case WINED3D_LOCATION_TEXTURE_SRGB:
if (FAILED(hr = surface_load_texture(surface, context,
location == WINED3D_LOCATION_TEXTURE_SRGB)))
@ -6807,7 +6807,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
break;
default:
@@ -3855,12 +4915,21 @@
@@ -3841,12 +4901,21 @@
break;
}
@ -6829,7 +6829,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
static HRESULT ffp_blit_alloc(struct wined3d_device *device) { return WINED3D_OK; }
@@ -3969,7 +5038,11 @@
@@ -3955,7 +5024,11 @@
const RECT *rect, const struct wined3d_color *color)
{
const RECT draw_rect = {0, 0, view->width, view->height};
@ -6841,7 +6841,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
device_clear_render_targets(device, 1, &fb, 1, rect, &draw_rect, WINED3DCLEAR_TARGET, color, 0.0f, 0);
@@ -4019,8 +5092,13 @@
@@ -4005,8 +5078,13 @@
wined3d_texture_set_color_key(src_surface->container, WINED3D_CKEY_SRC_BLT,
(old_color_key_flags & WINED3D_CKEY_SRC_BLT) ? &old_blt_key : NULL);
@ -6855,7 +6855,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
const struct blit_shader ffp_blit = {
@@ -4176,6 +5254,7 @@
@@ -4162,6 +5240,7 @@
struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags,
const WINEDDBLTFX *fx, enum wined3d_texture_filter_type filter)
{
@ -6863,7 +6863,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
int bpp, srcheight, srcwidth, dstheight, dstwidth, width;
const struct wined3d_format *src_format, *dst_format;
unsigned int src_fmt_flags, dst_fmt_flags;
@@ -4210,6 +5289,28 @@
@@ -4196,6 +5275,28 @@
wined3d_resource_get_pitch(&dst_surface->resource, &dst_row_pitch, &dst_slice_pitch);
src_data = dst_data;
src_row_pitch = dst_row_pitch;
@ -6892,7 +6892,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
src_format = dst_surface->resource.format;
dst_format = src_format;
dst_fmt_flags = dst_surface->container->resource.format_flags;
@@ -4221,12 +5322,14 @@
@@ -4207,12 +5308,14 @@
dst_fmt_flags = dst_surface->container->resource.format_flags;
if (src_surface)
{
@ -6907,7 +6907,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if (dst_surface->resource.format->id != src_surface->resource.format->id)
{
if (!(src_texture = surface_convert_format(src_surface, dst_format->id)))
@@ -4237,9 +5340,13 @@
@@ -4223,9 +5326,13 @@
}
src_surface = surface_from_resource(wined3d_texture_get_sub_resource(src_texture, 0));
}
@ -6921,7 +6921,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
src_format = src_surface->resource.format;
src_fmt_flags = src_surface->container->resource.format_flags;
}
@@ -4249,8 +5356,12 @@
@@ -4235,8 +5342,12 @@
src_fmt_flags = dst_fmt_flags;
}
@ -6934,7 +6934,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
bpp = dst_surface->resource.format->byte_count;
@@ -4261,12 +5372,24 @@
@@ -4247,12 +5358,24 @@
width = (dst_rect->right - dst_rect->left) * bpp;
if (src_surface)
@ -6959,7 +6959,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if (src_fmt_flags & dst_fmt_flags & WINED3DFMT_FLAG_BLOCKS)
{
@@ -4301,7 +5424,11 @@
@@ -4287,7 +5410,11 @@
}
hr = surface_cpu_blt_compressed(sbase, dbuf,
@ -6971,7 +6971,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
src_format, flags, fx);
goto release;
}
@@ -4309,7 +5436,11 @@
@@ -4295,7 +5422,11 @@
/* First, all the 'source-less' blits */
if (flags & WINEDDBLT_COLORFILL)
{
@ -6983,7 +6983,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
flags &= ~WINEDDBLT_COLORFILL;
}
@@ -4359,6 +5490,7 @@
@@ -4345,6 +5476,7 @@
for (y = 0; y < dstheight; ++y)
{
memcpy(dbuf, sbuf, width);
@ -6991,7 +6991,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
sbuf += src_row_pitch;
dbuf += dst_row_pitch;
}
@@ -4372,6 +5504,21 @@
@@ -4358,6 +5490,21 @@
{
sbuf -= src_row_pitch;
dbuf -= dst_row_pitch;
@ -7013,7 +7013,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
memcpy(dbuf, sbuf, width);
}
}
@@ -4381,8 +5528,13 @@
@@ -4367,8 +5514,13 @@
for (y = 0; y < dstheight; ++y)
{
memmove(dbuf, sbuf, width);
@ -7027,7 +7027,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
}
}
@@ -4391,9 +5543,15 @@
@@ -4377,9 +5529,15 @@
/* Stretching in y direction only. */
for (y = sy = 0; y < dstheight; ++y, sy += yinc)
{
@ -7043,7 +7043,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
}
}
@@ -4403,6 +5561,7 @@
@@ -4389,6 +5547,7 @@
int last_sy = -1;
for (y = sy = 0; y < dstheight; ++y, sy += yinc)
{
@ -7051,7 +7051,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
sbuf = sbase + (sy >> 16) * src_row_pitch;
if ((sy >> 16) == (last_sy >> 16))
@@ -4410,6 +5569,15 @@
@@ -4396,6 +5555,15 @@
/* This source row is the same as last source row -
* Copy the already stretched row. */
memcpy(dbuf, dbuf - dst_row_pitch, width);
@ -7067,7 +7067,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
else
{
@@ -4456,6 +5624,7 @@
@@ -4442,6 +5610,7 @@
}
#undef STRETCH_ROW
}
@ -7075,7 +7075,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
dbuf += dst_row_pitch;
last_sy = sy;
}
@@ -4464,6 +5633,16 @@
@@ -4450,6 +5619,16 @@
else
{
LONG dstyinc = dst_row_pitch, dstxinc = bpp;
@ -7092,7 +7092,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
DWORD keylow = 0xffffffff, keyhigh = 0, keymask = 0xffffffff;
DWORD destkeylow = 0x0, destkeyhigh = 0xffffffff, destkeymask = 0xffffffff;
if (flags & (WINEDDBLT_KEYSRC | WINEDDBLT_KEYDEST | WINEDDBLT_KEYSRCOVERRIDE | WINEDDBLT_KEYDESTOVERRIDE))
@@ -4513,7 +5692,11 @@
@@ -4499,7 +5678,11 @@
LONG tmpxy;
dTopLeft = dbuf;
dTopRight = dbuf + ((dstwidth - 1) * bpp);
@ -7104,7 +7104,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
dBottomRight = dBottomLeft + ((dstwidth - 1) * bpp);
if (fx->dwDDFX & WINEDDBLTFX_ARITHSTRETCHY)
@@ -4590,6 +5773,7 @@
@@ -4576,6 +5759,7 @@
flags &= ~(WINEDDBLT_DDFX);
}
@ -7112,7 +7112,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
#define COPY_COLORKEY_FX(type) \
do { \
const type *s; \
@@ -4611,6 +5795,29 @@
@@ -4597,6 +5781,29 @@
d = (type *)(((BYTE *)d) + dstyinc); \
} \
} while(0)
@ -7142,7 +7142,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
switch (bpp)
{
@@ -4629,7 +5836,11 @@
@@ -4615,7 +5822,11 @@
BYTE *d = dbuf, *dx;
for (y = sy = 0; y < dstheight; ++y, sy += yinc)
{
@ -7154,7 +7154,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
dx = d;
for (x = sx = 0; x < dstwidth; ++x, sx+= xinc)
{
@@ -4660,10 +5871,12 @@
@@ -4646,10 +5857,12 @@
}
}
@ -7167,7 +7167,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
error:
if (flags && FIXME_ON(d3d_surface))
{
@@ -4671,6 +5884,7 @@
@@ -4657,6 +5870,7 @@
}
release:
@ -7175,7 +7175,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if (dst_data)
{
wined3d_resource_release_map_ptr(&dst_surface->resource, context);
@@ -4689,6 +5903,14 @@
@@ -4675,6 +5889,14 @@
wined3d_texture_decref(src_texture);
if (context)
context_release(context);
@ -7190,7 +7190,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
return hr;
}
@@ -4734,7 +5956,11 @@
@@ -4720,7 +5942,11 @@
cpu_blit_blit_surface,
};
@ -7202,7 +7202,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags,
const WINEDDBLTFX *fx, enum wined3d_texture_filter_type filter)
{
@@ -4752,6 +5978,98 @@
@@ -4738,6 +5964,98 @@
| WINEDDBLT_DONOTWAIT
| WINEDDBLT_ALPHATEST;
@ -7301,7 +7301,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if (!device->d3d_initialized)
{
WARN("D3D not initialized, using fallback.\n");
@@ -4815,6 +6133,7 @@
@@ -4801,6 +6119,7 @@
TRACE("Depth fill.\n");
if (!surface_convert_depth_to_float(dst_surface, fx->u5.dwFillDepth, &depth))
@ -7309,7 +7309,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
return;
if (SUCCEEDED(wined3d_surface_depth_fill(dst_surface, dst_rect, depth)))
@@ -4825,6 +6144,24 @@
@@ -4811,6 +6130,24 @@
if (SUCCEEDED(wined3d_surface_depth_blt(src_surface, src_surface->container->resource.draw_binding,
src_rect, dst_surface, dst_surface->container->resource.draw_binding, dst_rect)))
return;
@ -7334,7 +7334,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
}
else
@@ -4833,8 +6170,13 @@
@@ -4819,8 +6156,13 @@
/* In principle this would apply to depth blits as well, but we don't
* implement those in the CPU blitter at the moment. */
@ -7348,7 +7348,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
{
if (scale)
TRACE("Not doing sysmem blit because of scaling.\n");
@@ -4856,7 +6198,11 @@
@@ -4842,7 +6184,11 @@
goto fallback;
if (SUCCEEDED(surface_color_fill(dst_surface, dst_rect, &color)))
@ -7360,7 +7360,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
else
{
@@ -4878,8 +6224,13 @@
@@ -4864,8 +6210,13 @@
{
blit_op = WINED3D_BLIT_OP_COLOR_BLIT_ALPHATEST;
}
@ -7374,7 +7374,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
{
/* Upload */
if (scale)
@@ -4895,11 +6246,18 @@
@@ -4881,11 +6232,18 @@
if (!wined3d_resource_is_offscreen(&dst_surface->container->resource))
{
struct wined3d_context *context = context_acquire(device, dst_surface);
@ -7393,7 +7393,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
}
}
@@ -4923,7 +6281,11 @@
@@ -4909,7 +6267,11 @@
wined3d_swapchain_present(dst_swapchain, NULL, NULL, dst_swapchain->win_handle, NULL, 0);
dst_swapchain->desc.swap_effect = swap_effect;
@ -7405,7 +7405,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
if (fbo_blit_supported(&device->adapter->gl_info, blit_op,
@@ -4939,10 +6301,17 @@
@@ -4925,10 +6287,17 @@
dst_surface, dst_surface->container->resource.draw_binding, dst_rect);
context_release(context);
@ -7423,7 +7423,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
blitter = wined3d_select_blitter(&device->adapter->gl_info, &device->adapter->d3d_info, blit_op,
@@ -4952,6 +6321,7 @@
@@ -4938,6 +6307,7 @@
{
blitter->blit_surface(device, blit_op, filter, src_surface,
src_rect, dst_surface, dst_rect, color_key);
@ -7431,7 +7431,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
return;
}
}
@@ -5117,6 +6487,21 @@
@@ -5103,6 +6473,21 @@
wined3d_surface_location_invalidated,
wined3d_surface_load_location,
};
@ -7453,7 +7453,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_texture *container,
const struct wined3d_resource_desc *desc, GLenum target, unsigned int level, unsigned int layer, DWORD flags)
@@ -5178,7 +6563,11 @@
@@ -5164,7 +6549,11 @@
}
surface->container = container;
@ -7465,7 +7465,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
list_init(&surface->renderbuffers);
list_init(&surface->overlays);
@@ -5210,9 +6599,14 @@
@@ -5196,9 +6585,14 @@
if (surface->resource.map_binding == WINED3D_LOCATION_DIB)
{
wined3d_resource_free_sysmem(&surface->resource);
@ -7480,7 +7480,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
return hr;
@@ -5239,7 +6633,11 @@
@@ -5225,7 +6619,11 @@
if (FAILED(hr = surface_init(object, container, desc, target, level, layer, flags)))
{
WARN("Failed to initialize surface, returning %#x.\n", hr);