mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
Rebase against ea85a1ca598228eeacc370b0d827ca9e11387dfe.
This commit is contained in:
parent
d35ab071b5
commit
0e424c26ad
@ -1,4 +1,4 @@
|
||||
From 863dce444080b590bef8a9f31e38fc69aa18b29a Mon Sep 17 00:00:00 2001
|
||||
From cb7b1ca0fccd0078815b117deed0380b68e6daaa 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 082a693..91fcf0f 100644
|
||||
index 4ec8336..a58f4e4 100644
|
||||
--- a/dlls/wined3d/wined3d.spec
|
||||
+++ b/dlls/wined3d/wined3d.spec
|
||||
@@ -222,6 +222,8 @@
|
||||
@ -20,7 +20,7 @@ index 082a693..91fcf0f 100644
|
||||
+
|
||||
@ cdecl wined3d_surface_get_parent(ptr)
|
||||
@ cdecl wined3d_surface_get_pitch(ptr)
|
||||
@ cdecl wined3d_surface_set_overlay_position(ptr long long)
|
||||
@ cdecl wined3d_surface_update_overlay(ptr ptr ptr 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
|
||||
|
@ -1,4 +1,4 @@
|
||||
From d87fa0b16491e8ec3b38fbe9b43c6f91adceee02 Mon Sep 17 00:00:00 2001
|
||||
From 6d4b1e67c342ec2e570f0c90774edb7c55e3649a Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sun, 7 Feb 2016 18:52:16 +0100
|
||||
Subject: Revert "ddraw: Use wined3d_texture_get_sub_resource() in
|
||||
@ -13,7 +13,7 @@ This reverts commit b1709522307a160a7c151f5293095a3c26ab998f.
|
||||
4 files changed, 12 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
|
||||
index d6358f8..f9862df 100644
|
||||
index e918f25..4888d1d 100644
|
||||
--- a/dlls/ddraw/surface.c
|
||||
+++ b/dlls/ddraw/surface.c
|
||||
@@ -1268,7 +1268,7 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_Flip(IDirectDrawSurface7
|
||||
@ -44,7 +44,7 @@ index d6358f8..f9862df 100644
|
||||
wined3d_resource_set_parent(wined3d_texture_get_resource(texture), ddraw_texture);
|
||||
src_impl->wined3d_texture = texture;
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 57925a6..90c8847 100644
|
||||
index e36e353..bdf40ce 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -1890,6 +1890,13 @@ void * CDECL wined3d_surface_get_parent(const struct wined3d_surface *surface)
|
||||
@ -62,7 +62,7 @@ index 57925a6..90c8847 100644
|
||||
{
|
||||
unsigned int alignment;
|
||||
diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec
|
||||
index 082a693..5eb4e89 100644
|
||||
index 4ec8336..f60db7c 100644
|
||||
--- a/dlls/wined3d/wined3d.spec
|
||||
+++ b/dlls/wined3d/wined3d.spec
|
||||
@@ -224,6 +224,7 @@
|
||||
@ -70,11 +70,11 @@ index 082a693..5eb4e89 100644
|
||||
@ cdecl wined3d_surface_get_parent(ptr)
|
||||
@ cdecl wined3d_surface_get_pitch(ptr)
|
||||
+@ cdecl wined3d_surface_get_resource(ptr)
|
||||
@ cdecl wined3d_surface_set_overlay_position(ptr long long)
|
||||
@ cdecl wined3d_surface_update_overlay(ptr ptr ptr ptr long ptr)
|
||||
@ cdecl wined3d_surface_update_overlay_z_order(ptr long ptr)
|
||||
|
||||
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
|
||||
index 36e34ea..d740737 100644
|
||||
index b43b31d..9f41718 100644
|
||||
--- a/include/wine/wined3d.h
|
||||
+++ b/include/wine/wined3d.h
|
||||
@@ -2476,6 +2476,7 @@ ULONG __cdecl wined3d_stateblock_incref(struct wined3d_stateblock *stateblock);
|
||||
@ -82,9 +82,9 @@ index 36e34ea..d740737 100644
|
||||
void * __cdecl wined3d_surface_get_parent(const struct wined3d_surface *surface);
|
||||
DWORD __cdecl wined3d_surface_get_pitch(const struct wined3d_surface *surface);
|
||||
+struct wined3d_resource * __cdecl wined3d_surface_get_resource(struct wined3d_surface *surface);
|
||||
HRESULT __cdecl wined3d_surface_set_overlay_position(struct wined3d_surface *surface, LONG x, LONG y);
|
||||
HRESULT __cdecl wined3d_surface_update_overlay(struct wined3d_surface *surface, const RECT *src_rect,
|
||||
struct wined3d_surface *dst_surface, const RECT *dst_rect, DWORD flags, const WINEDDOVERLAYFX *fx);
|
||||
HRESULT __cdecl wined3d_surface_update_overlay_z_order(struct wined3d_surface *surface,
|
||||
--
|
||||
2.7.0
|
||||
|
||||
|
@ -51,7 +51,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "6e30b042e17b4a62f48ca29f26cf9e62c7fd077a"
|
||||
echo "ea85a1ca598228eeacc370b0d827ca9e11387dfe"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 429d2f5f7f32f0703b910f27a534cb06d9b6f722 Mon Sep 17 00:00:00 2001
|
||||
From 9ac5eaa0e224fa33ef7afc9520d54262de9e506d 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.
|
||||
@ -12,10 +12,10 @@ Subject: wined3d: Merge get_pitch functions.
|
||||
5 files changed, 70 insertions(+), 71 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
|
||||
index 74be48d..7922433 100644
|
||||
index 44cdb43..ed598cc 100644
|
||||
--- a/dlls/wined3d/resource.c
|
||||
+++ b/dlls/wined3d/resource.c
|
||||
@@ -430,3 +430,34 @@ void wined3d_resource_update_draw_binding(struct wined3d_resource *resource)
|
||||
@@ -440,3 +440,34 @@ void wined3d_resource_update_draw_binding(struct wined3d_resource *resource)
|
||||
else
|
||||
resource->draw_binding = WINED3D_LOCATION_TEXTURE_RGB;
|
||||
}
|
||||
@ -51,10 +51,10 @@ index 74be48d..7922433 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 39a2c3b..2e7f0f8 100644
|
||||
index b14d0a3..df9b855 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -364,6 +364,7 @@ static HRESULT surface_create_dib_section(struct wined3d_surface *surface)
|
||||
@@ -364,6 +364,7 @@ HRESULT surface_create_dib_section(struct wined3d_surface *surface)
|
||||
BITMAPINFO *b_info;
|
||||
int extraline = 0;
|
||||
DWORD *masks;
|
||||
@ -62,7 +62,7 @@ index 39a2c3b..2e7f0f8 100644
|
||||
|
||||
TRACE("surface %p.\n", surface);
|
||||
|
||||
@@ -409,10 +410,11 @@ static HRESULT surface_create_dib_section(struct wined3d_surface *surface)
|
||||
@@ -409,10 +410,11 @@ HRESULT surface_create_dib_section(struct wined3d_surface *surface)
|
||||
|
||||
b_info->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
|
||||
/* TODO: Is there a nicer way to force a specific alignment? (8 byte for ddraw) */
|
||||
@ -76,7 +76,7 @@ index 39a2c3b..2e7f0f8 100644
|
||||
b_info->bmiHeader.biPlanes = 1;
|
||||
b_info->bmiHeader.biBitCount = format->byte_count * 8;
|
||||
|
||||
@@ -1330,14 +1332,14 @@ static void surface_download_data(struct wined3d_surface *surface, const struct
|
||||
@@ -1332,14 +1334,14 @@ static void surface_download_data(struct wined3d_surface *surface, const struct
|
||||
void *mem;
|
||||
GLenum gl_format = format->glFormat;
|
||||
GLenum gl_type = format->glType;
|
||||
@ -94,7 +94,7 @@ index 39a2c3b..2e7f0f8 100644
|
||||
src_pitch = (src_pitch + alignment - 1) & ~(alignment - 1);
|
||||
mem = HeapAlloc(GetProcessHeap(), 0, src_pitch * surface->pow2Height);
|
||||
}
|
||||
@@ -1424,12 +1426,12 @@ static void surface_download_data(struct wined3d_surface *surface, const struct
|
||||
@@ -1426,12 +1428,12 @@ static void surface_download_data(struct wined3d_surface *surface, const struct
|
||||
* won't be released, and doesn't have to be re-read. */
|
||||
src_data = mem;
|
||||
dst_data = data.addr;
|
||||
@ -110,7 +110,7 @@ index 39a2c3b..2e7f0f8 100644
|
||||
}
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, mem);
|
||||
@@ -1591,7 +1593,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
|
||||
@@ -1599,7 +1601,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
|
||||
UINT update_w, update_h;
|
||||
UINT dst_w, dst_h;
|
||||
RECT r, dst_rect;
|
||||
@ -119,7 +119,7 @@ index 39a2c3b..2e7f0f8 100644
|
||||
POINT p;
|
||||
|
||||
TRACE("dst_surface %p, dst_point %s, src_surface %p, src_rect %s.\n",
|
||||
@@ -1679,10 +1681,10 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
|
||||
@@ -1687,10 +1689,10 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
|
||||
wined3d_texture_bind_and_dirtify(dst_surface->container, context, FALSE);
|
||||
|
||||
surface_get_memory(src_surface, &data, src_surface->locations);
|
||||
@ -132,7 +132,7 @@ index 39a2c3b..2e7f0f8 100644
|
||||
|
||||
context_release(context);
|
||||
|
||||
@@ -1934,21 +1936,10 @@ HRESULT CDECL wined3d_surface_restore(struct wined3d_surface *surface)
|
||||
@@ -1892,21 +1894,10 @@ void * CDECL wined3d_surface_get_parent(const struct wined3d_surface *surface)
|
||||
|
||||
DWORD CDECL wined3d_surface_get_pitch(const struct wined3d_surface *surface)
|
||||
{
|
||||
@ -157,8 +157,8 @@ index 39a2c3b..2e7f0f8 100644
|
||||
+ return row_pitch;
|
||||
}
|
||||
|
||||
HRESULT CDECL wined3d_surface_set_overlay_position(struct wined3d_surface *surface, LONG x, LONG y)
|
||||
@@ -2110,20 +2101,21 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
|
||||
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,
|
||||
surface->resource.map_binding = WINED3D_LOCATION_USER_MEMORY;
|
||||
valid_location = WINED3D_LOCATION_USER_MEMORY;
|
||||
}
|
||||
@ -184,7 +184,7 @@ index 39a2c3b..2e7f0f8 100644
|
||||
}
|
||||
|
||||
/* The format might be changed to a format that needs conversion.
|
||||
@@ -2749,7 +2741,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
|
||||
@@ -2655,7 +2647,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 39a2c3b..2e7f0f8 100644
|
||||
map_desc->slice_pitch = surface->resource.height * map_desc->row_pitch;
|
||||
|
||||
if (!box)
|
||||
@@ -2898,6 +2890,7 @@ static void read_from_framebuffer(struct wined3d_surface *surface,
|
||||
@@ -2706,6 +2698,7 @@ static void read_from_framebuffer(struct wined3d_surface *surface,
|
||||
int i;
|
||||
BOOL srcIsUpsideDown;
|
||||
struct wined3d_bo_address data;
|
||||
@ -201,7 +201,7 @@ index 39a2c3b..2e7f0f8 100644
|
||||
|
||||
surface_get_memory(surface, &data, dst_location);
|
||||
|
||||
@@ -2939,8 +2932,8 @@ static void read_from_framebuffer(struct wined3d_surface *surface,
|
||||
@@ -2747,8 +2740,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 39a2c3b..2e7f0f8 100644
|
||||
checkGLcall("glPixelStorei");
|
||||
|
||||
gl_info->gl_ops.gl.p_glReadPixels(0, 0,
|
||||
@@ -2957,8 +2950,6 @@ static void read_from_framebuffer(struct wined3d_surface *surface,
|
||||
@@ -2765,8 +2758,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 39a2c3b..2e7f0f8 100644
|
||||
if (!(row = HeapAlloc(GetProcessHeap(), 0, pitch)))
|
||||
goto error;
|
||||
|
||||
@@ -4077,7 +4068,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -3920,7 +3911,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 39a2c3b..2e7f0f8 100644
|
||||
struct wined3d_bo_address data;
|
||||
struct wined3d_format format;
|
||||
POINT dst_point = {0, 0};
|
||||
@@ -4162,7 +4153,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4005,7 +3996,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 39a2c3b..2e7f0f8 100644
|
||||
|
||||
format = *texture->resource.format;
|
||||
if ((conversion = wined3d_format_get_color_key_conversion(texture, TRUE)))
|
||||
@@ -4200,9 +4191,9 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4043,9 +4034,9 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
context_release(context);
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
@ -251,7 +251,7 @@ index 39a2c3b..2e7f0f8 100644
|
||||
data.addr = mem;
|
||||
}
|
||||
else if (conversion)
|
||||
@@ -4222,14 +4213,14 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4065,14 +4056,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 39a2c3b..2e7f0f8 100644
|
||||
HeapFree(GetProcessHeap(), 0, mem);
|
||||
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index 4380e5f..6511d2e 100644
|
||||
index 297ab27..6daf572 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -1269,7 +1269,7 @@ static void texture3d_sub_resource_upload_data(struct wined3d_resource *sub_reso
|
||||
@@ -1142,7 +1142,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;
|
||||
|
||||
@ -283,7 +283,7 @@ index 4380e5f..6511d2e 100644
|
||||
FIXME("Ignoring row/slice pitch (%u/%u).\n", data->row_pitch, data->slice_pitch);
|
||||
|
||||
diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
|
||||
index 0231c23..7be9ff5 100644
|
||||
index 3ac7f98..9235f3f 100644
|
||||
--- a/dlls/wined3d/volume.c
|
||||
+++ b/dlls/wined3d/volume.c
|
||||
@@ -40,30 +40,6 @@ BOOL volume_prepare_system_memory(struct wined3d_volume *volume)
|
||||
@ -326,7 +326,7 @@ index 0231c23..7be9ff5 100644
|
||||
|
||||
converted_mem = HeapAlloc(GetProcessHeap(), 0, dst_slice_pitch * depth);
|
||||
format->convert(data->addr, converted_mem, src_row_pitch, src_slice_pitch,
|
||||
@@ -610,7 +586,7 @@ HRESULT wined3d_volume_map(struct wined3d_volume *volume,
|
||||
@@ -607,7 +583,7 @@ HRESULT wined3d_volume_map(struct wined3d_volume *volume,
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -336,10 +336,10 @@ index 0231c23..7be9ff5 100644
|
||||
|
||||
if (!box)
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 4c4a58a..17ccabd 100644
|
||||
index 1f29257..865f476 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2184,6 +2184,7 @@ struct wined3d_resource
|
||||
@@ -2275,6 +2275,7 @@ struct wined3d_resource
|
||||
UINT size;
|
||||
DWORD priority;
|
||||
void *heap_memory;
|
||||
@ -347,7 +347,7 @@ index 4c4a58a..17ccabd 100644
|
||||
struct list resource_list_entry;
|
||||
|
||||
void *parent;
|
||||
@@ -2211,6 +2212,8 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
|
||||
@@ -2302,6 +2303,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 4c4a58a..17ccabd 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;
|
||||
@@ -2348,7 +2351,6 @@ BOOL volume_prepare_system_memory(struct wined3d_volume *volume) DECLSPEC_HIDDEN
|
||||
@@ -2437,7 +2440,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 4c4a58a..17ccabd 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;
|
||||
@@ -2401,7 +2403,6 @@ struct wined3d_surface
|
||||
@@ -2490,7 +2492,6 @@ struct wined3d_surface
|
||||
|
||||
DWORD flags;
|
||||
|
||||
@ -373,5 +373,5 @@ index 4c4a58a..17ccabd 100644
|
||||
UINT pow2Height;
|
||||
|
||||
--
|
||||
2.6.2
|
||||
2.7.0
|
||||
|
||||
|
@ -5750,8 +5750,8 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
+#endif /* STAGING_CSMT */
|
||||
}
|
||||
|
||||
HRESULT CDECL wined3d_surface_set_overlay_position(struct wined3d_surface *surface, LONG x, LONG y)
|
||||
@@ -1825,6 +2271,7 @@
|
||||
HRESULT CDECL wined3d_surface_update_overlay_z_order(struct wined3d_surface *surface,
|
||||
@@ -1803,6 +2249,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;
|
||||
@@ -1833,6 +2280,15 @@
|
||||
@@ -1811,6 +2258,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;
|
||||
@@ -1858,6 +2314,7 @@
|
||||
@@ -1836,6 +2292,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;
|
||||
@@ -1878,6 +2335,27 @@
|
||||
@@ -1856,6 +2313,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.
|
||||
@@ -1900,11 +2378,19 @@
|
||||
@@ -1878,11 +2356,19 @@
|
||||
|
||||
if (!valid_location)
|
||||
{
|
||||
@ -5831,7 +5831,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
|
||||
return WINED3D_OK;
|
||||
}
|
||||
@@ -2263,6 +2749,7 @@
|
||||
@@ -2241,6 +2727,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;
|
||||
@@ -2271,6 +2758,13 @@
|
||||
@@ -2249,6 +2736,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)
|
||||
@@ -2295,6 +2789,7 @@
|
||||
@@ -2273,6 +2767,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);
|
||||
|
||||
@@ -2335,6 +2830,32 @@
|
||||
@@ -2313,6 +2808,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,
|
||||
@@ -2397,6 +2918,7 @@
|
||||
@@ -2375,6 +2896,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);
|
||||
|
||||
@@ -2407,6 +2929,20 @@
|
||||
@@ -2385,6 +2907,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,
|
||||
@@ -2414,6 +2950,21 @@
|
||||
@@ -2392,6 +2928,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))
|
||||
@@ -2425,6 +2976,13 @@
|
||||
@@ -2403,6 +2954,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
|
||||
@@ -2440,6 +2998,7 @@
|
||||
@@ -2418,6 +2976,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@ -5967,7 +5967,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
if (box)
|
||||
{
|
||||
surface->lockedRect.left = box->left;
|
||||
@@ -2529,6 +3088,119 @@
|
||||
@@ -2507,6 +3066,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)
|
||||
{
|
||||
@@ -2568,8 +3240,13 @@
|
||||
@@ -2546,8 +3218,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,
|
||||
@@ -2586,6 +3263,10 @@
|
||||
@@ -2564,6 +3241,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;
|
||||
|
||||
@@ -2830,8 +3511,13 @@
|
||||
@@ -2808,8 +3489,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 */
|
||||
@@ -2899,7 +3585,11 @@
|
||||
@@ -2877,7 +3563,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
|
||||
@@ -3096,6 +3786,7 @@
|
||||
@@ -3074,6 +3764,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)
|
||||
@@ -3107,6 +3798,17 @@
|
||||
@@ -3085,6 +3776,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
|
||||
@@ -3161,9 +3863,15 @@
|
||||
@@ -3139,9 +3841,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 */
|
||||
@@ -3206,9 +3914,13 @@
|
||||
@@ -3184,9 +3892,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. */
|
||||
@@ -3221,8 +3933,13 @@
|
||||
@@ -3199,8 +3911,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;
|
||||
|
||||
@@ -3233,6 +3950,7 @@
|
||||
@@ -3211,6 +3928,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
|
||||
@@ -3249,6 +3967,21 @@
|
||||
@@ -3227,6 +3945,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;
|
||||
}
|
||||
@@ -3258,8 +3991,13 @@
|
||||
@@ -3236,8 +3969,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),
|
||||
@@ -3450,6 +4188,7 @@
|
||||
@@ -3428,6 +4166,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)))
|
||||
@@ -3458,6 +4197,15 @@
|
||||
@@ -3436,6 +4175,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. */
|
||||
@@ -3472,7 +4220,11 @@
|
||||
@@ -3450,7 +4198,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;
|
||||
@@ -3499,6 +4251,7 @@
|
||||
@@ -3477,6 +4229,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");
|
||||
@@ -3513,6 +4266,22 @@
|
||||
@@ -3491,6 +4244,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;
|
||||
@@ -3576,9 +4345,13 @@
|
||||
@@ -3554,9 +4323,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)
|
||||
@@ -3594,9 +4367,13 @@
|
||||
@@ -3572,9 +4345,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
|
||||
@@ -3604,6 +4381,7 @@
|
||||
@@ -3582,6 +4359,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;
|
||||
@@ -3636,6 +4414,124 @@
|
||||
@@ -3614,6 +4392,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. */
|
||||
@@ -3644,12 +4540,14 @@
|
||||
@@ -3622,12 +4518,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))
|
||||
{
|
||||
@@ -3658,7 +4556,11 @@
|
||||
@@ -3636,7 +4534,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);
|
||||
|
||||
@@ -3673,6 +4575,7 @@
|
||||
@@ -3651,6 +4553,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;
|
||||
@@ -3699,6 +4602,24 @@
|
||||
@@ -3677,6 +4580,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,
|
||||
@@ -3714,6 +4635,7 @@
|
||||
@@ -3692,6 +4613,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,
|
||||
@@ -3721,6 +4643,15 @@
|
||||
@@ -3699,6 +4621,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};
|
||||
@@ -3735,6 +4666,7 @@
|
||||
@@ -3713,6 +4644,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)
|
||||
{
|
||||
@@ -3769,6 +4701,42 @@
|
||||
@@ -3747,6 +4679,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)))
|
||||
@@ -3777,7 +4745,11 @@
|
||||
@@ -3755,7 +4723,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);
|
||||
|
||||
@@ -3786,6 +4758,7 @@
|
||||
@@ -3764,6 +4736,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);
|
||||
@@ -3793,6 +4766,14 @@
|
||||
@@ -3771,6 +4744,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. */
|
||||
@@ -3807,9 +4788,15 @@
|
||||
@@ -3785,9 +4766,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)
|
||||
@@ -3829,6 +4816,7 @@
|
||||
@@ -3807,6 +4794,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;
|
||||
@@ -3837,6 +4825,16 @@
|
||||
@@ -3815,6 +4803,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);
|
||||
|
||||
@@ -3850,11 +4848,19 @@
|
||||
@@ -3828,11 +4826,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;
|
||||
@@ -3863,11 +4869,17 @@
|
||||
@@ -3841,11 +4847,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));
|
||||
@@ -3875,6 +4887,7 @@
|
||||
@@ -3853,6 +4865,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);
|
||||
@@ -3898,6 +4911,45 @@
|
||||
@@ -3876,6 +4889,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)
|
||||
@@ -3911,7 +4963,11 @@
|
||||
@@ -3889,7 +4941,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:
|
||||
@@ -3923,7 +4979,11 @@
|
||||
@@ -3901,7 +4957,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:
|
||||
@@ -3931,12 +4991,21 @@
|
||||
@@ -3909,12 +4969,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; }
|
||||
@@ -4045,7 +5114,11 @@
|
||||
@@ -4023,7 +5092,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);
|
||||
|
||||
@@ -4095,8 +5168,13 @@
|
||||
@@ -4073,8 +5146,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 = {
|
||||
@@ -4252,6 +5330,7 @@
|
||||
@@ -4230,6 +5308,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;
|
||||
@@ -4286,6 +5365,28 @@
|
||||
@@ -4264,6 +5343,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;
|
||||
@@ -4297,12 +5398,14 @@
|
||||
@@ -4275,12 +5376,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)))
|
||||
@@ -4313,9 +5416,13 @@
|
||||
@@ -4291,9 +5394,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;
|
||||
}
|
||||
@@ -4325,8 +5432,12 @@
|
||||
@@ -4303,8 +5410,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;
|
||||
@@ -4337,12 +5448,24 @@
|
||||
@@ -4315,12 +5426,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)
|
||||
{
|
||||
@@ -4377,7 +5500,11 @@
|
||||
@@ -4355,7 +5478,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;
|
||||
}
|
||||
@@ -4385,7 +5512,11 @@
|
||||
@@ -4363,7 +5490,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;
|
||||
}
|
||||
|
||||
@@ -4435,6 +5566,7 @@
|
||||
@@ -4413,6 +5544,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;
|
||||
}
|
||||
@@ -4448,6 +5580,21 @@
|
||||
@@ -4426,6 +5558,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);
|
||||
}
|
||||
}
|
||||
@@ -4457,8 +5604,13 @@
|
||||
@@ -4435,8 +5582,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
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4467,9 +5619,15 @@
|
||||
@@ -4445,9 +5597,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
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4479,6 +5637,7 @@
|
||||
@@ -4457,6 +5615,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))
|
||||
@@ -4486,6 +5645,15 @@
|
||||
@@ -4464,6 +5623,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
|
||||
{
|
||||
@@ -4532,6 +5700,7 @@
|
||||
@@ -4510,6 +5678,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;
|
||||
}
|
||||
@@ -4540,6 +5709,16 @@
|
||||
@@ -4518,6 +5687,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))
|
||||
@@ -4589,7 +5768,11 @@
|
||||
@@ -4567,7 +5746,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)
|
||||
@@ -4666,6 +5849,7 @@
|
||||
@@ -4644,6 +5827,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; \
|
||||
@@ -4687,6 +5871,29 @@
|
||||
@@ -4665,6 +5849,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)
|
||||
{
|
||||
@@ -4705,7 +5912,11 @@
|
||||
@@ -4683,7 +5890,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)
|
||||
{
|
||||
@@ -4736,10 +5947,12 @@
|
||||
@@ -4714,10 +5925,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
@ -7167,7 +7167,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
error:
|
||||
if (flags && FIXME_ON(d3d_surface))
|
||||
{
|
||||
@@ -4747,6 +5960,7 @@
|
||||
@@ -4725,6 +5938,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);
|
||||
@@ -4765,6 +5979,14 @@
|
||||
@@ -4743,6 +5957,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;
|
||||
}
|
||||
@@ -4810,7 +6032,11 @@
|
||||
@@ -4788,7 +6010,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)
|
||||
{
|
||||
@@ -4828,6 +6054,98 @@
|
||||
@@ -4806,6 +6032,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");
|
||||
@@ -4891,6 +6209,7 @@
|
||||
@@ -4869,6 +6187,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)))
|
||||
@@ -4901,6 +6220,24 @@
|
||||
@@ -4879,6 +6198,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
|
||||
@@ -4909,8 +6246,13 @@
|
||||
@@ -4887,8 +6224,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");
|
||||
@@ -4932,7 +6274,11 @@
|
||||
@@ -4910,7 +6252,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
|
||||
{
|
||||
@@ -4954,8 +6300,13 @@
|
||||
@@ -4932,8 +6278,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)
|
||||
@@ -4971,11 +6322,18 @@
|
||||
@@ -4949,11 +6300,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
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4999,7 +6357,11 @@
|
||||
@@ -4977,7 +6335,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,
|
||||
@@ -5015,10 +6377,17 @@
|
||||
@@ -4993,10 +6355,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,
|
||||
@@ -5028,6 +6397,7 @@
|
||||
@@ -5006,6 +6375,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;
|
||||
}
|
||||
}
|
||||
@@ -5193,6 +6563,21 @@
|
||||
@@ -5171,6 +6541,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)
|
||||
@@ -5254,7 +6639,11 @@
|
||||
@@ -5232,7 +6617,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);
|
||||
|
||||
@@ -5286,9 +6675,14 @@
|
||||
@@ -5264,9 +6653,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;
|
||||
@@ -5315,7 +6709,11 @@
|
||||
@@ -5293,7 +6687,11 @@
|
||||
if (FAILED(hr = surface_init(object, container, desc, target, level, layer, flags)))
|
||||
{
|
||||
WARN("Failed to initialize surface, returning %#x.\n", hr);
|
||||
@ -8126,7 +8126,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
return hr;
|
||||
}
|
||||
|
||||
@@ -1470,6 +1583,9 @@
|
||||
@@ -1497,6 +1610,9 @@
|
||||
if (FAILED(hr))
|
||||
{
|
||||
WARN("Failed to initialize texture, returning %#x.\n", hr);
|
||||
@ -8136,7 +8136,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
return hr;
|
||||
}
|
||||
|
||||
@@ -1491,8 +1607,15 @@
|
||||
@@ -1518,8 +1634,15 @@
|
||||
HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned int sub_resource_idx, HDC *dc)
|
||||
{
|
||||
struct wined3d_device *device = texture->resource.device;
|
||||
@ -8152,7 +8152,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
|
||||
TRACE("texture %p, sub_resource_idx %u, dc %p.\n", texture, sub_resource_idx, dc);
|
||||
|
||||
@@ -1507,12 +1630,14 @@
|
||||
@@ -1534,12 +1657,14 @@
|
||||
|
||||
surface = surface_from_resource(sub_resource);
|
||||
|
||||
@ -8167,7 +8167,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
/* Give more detailed info for ddraw. */
|
||||
if (surface->flags & SFLAG_DCINUSE)
|
||||
return WINEDDERR_DCALREADYCREATED;
|
||||
@@ -1521,6 +1646,7 @@
|
||||
@@ -1548,6 +1673,7 @@
|
||||
if (surface->resource.map_count)
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
|
||||
@ -8175,7 +8175,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
surface->flags |= SFLAG_DCINUSE;
|
||||
surface->resource.map_count++;
|
||||
wined3d_cs_emit_getdc(device->cs, surface);
|
||||
@@ -1533,6 +1659,45 @@
|
||||
@@ -1560,6 +1686,45 @@
|
||||
HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsigned int sub_resource_idx, HDC dc)
|
||||
{
|
||||
struct wined3d_device *device = texture->resource.device;
|
||||
@ -8221,7 +8221,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
struct wined3d_resource *sub_resource;
|
||||
struct wined3d_surface *surface;
|
||||
|
||||
@@ -1562,7 +1727,30 @@
|
||||
@@ -1589,7 +1754,30 @@
|
||||
surface->resource.map_count--;
|
||||
surface->flags &= ~SFLAG_DCINUSE;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user