You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Rebase against upstream changes.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From 795be1ce7b544a08dcdf72a128a3e3d98998ba02 Mon Sep 17 00:00:00 2001
|
||||
From e54e307937b44f9be63d54abfca483070004b924 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.
|
||||
@@ -15,10 +15,10 @@ Subject: wined3d: Merge get_pitch functions.
|
||||
8 files changed, 81 insertions(+), 81 deletions(-)
|
||||
|
||||
diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
|
||||
index a387d12..9a8d94f 100644
|
||||
index 0d2d731..27acbed 100644
|
||||
--- a/dlls/ddraw/surface.c
|
||||
+++ b/dlls/ddraw/surface.c
|
||||
@@ -6158,6 +6158,10 @@ void ddraw_surface_init(struct ddraw_surface *surface, struct ddraw *ddraw, stru
|
||||
@@ -6209,6 +6209,10 @@ void ddraw_surface_init(struct ddraw_surface *surface, struct ddraw *ddraw, stru
|
||||
DDSURFACEDESC2 *desc = &surface->surface_desc;
|
||||
struct wined3d_resource_desc wined3d_desc;
|
||||
unsigned int version = texture->version;
|
||||
@@ -29,7 +29,7 @@ index a387d12..9a8d94f 100644
|
||||
|
||||
surface->IDirectDrawSurface7_iface.lpVtbl = &ddraw_surface7_vtbl;
|
||||
surface->IDirectDrawSurface4_iface.lpVtbl = &ddraw_surface4_vtbl;
|
||||
@@ -6188,7 +6192,7 @@ void ddraw_surface_init(struct ddraw_surface *surface, struct ddraw *ddraw, stru
|
||||
@@ -6239,7 +6243,7 @@ void ddraw_surface_init(struct ddraw_surface *surface, struct ddraw *ddraw, stru
|
||||
}
|
||||
|
||||
*desc = texture->surface_desc;
|
||||
@@ -38,7 +38,7 @@ index a387d12..9a8d94f 100644
|
||||
desc->dwWidth = wined3d_desc.width;
|
||||
desc->dwHeight = wined3d_desc.height;
|
||||
surface->first_attached = surface;
|
||||
@@ -6198,14 +6202,16 @@ void ddraw_surface_init(struct ddraw_surface *surface, struct ddraw *ddraw, stru
|
||||
@@ -6249,14 +6253,16 @@ void ddraw_surface_init(struct ddraw_surface *surface, struct ddraw *ddraw, stru
|
||||
if (desc->dwFlags & DDSD_LPSURFACE)
|
||||
desc->u1.dwLinearSize = ~0u;
|
||||
else
|
||||
@@ -97,7 +97,7 @@ index 205f074..3375c0f 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 3e3cf67..c185a93 100644
|
||||
index a83d46f..00427f9 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -363,6 +363,7 @@ static HRESULT surface_create_dib_section(struct wined3d_surface *surface)
|
||||
@@ -122,7 +122,7 @@ index 3e3cf67..c185a93 100644
|
||||
b_info->bmiHeader.biPlanes = 1;
|
||||
b_info->bmiHeader.biBitCount = format->byte_count * 8;
|
||||
|
||||
@@ -1358,14 +1360,14 @@ static void surface_download_data(struct wined3d_surface *surface, const struct
|
||||
@@ -1302,14 +1304,14 @@ static void surface_download_data(struct wined3d_surface *surface, const struct
|
||||
void *mem;
|
||||
GLenum gl_format = format->glFormat;
|
||||
GLenum gl_type = format->glType;
|
||||
@@ -140,7 +140,7 @@ index 3e3cf67..c185a93 100644
|
||||
src_pitch = (src_pitch + alignment - 1) & ~(alignment - 1);
|
||||
mem = HeapAlloc(GetProcessHeap(), 0, src_pitch * surface->pow2Height);
|
||||
}
|
||||
@@ -1452,12 +1454,12 @@ static void surface_download_data(struct wined3d_surface *surface, const struct
|
||||
@@ -1396,12 +1398,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;
|
||||
@@ -156,7 +156,7 @@ index 3e3cf67..c185a93 100644
|
||||
}
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, mem);
|
||||
@@ -1611,7 +1613,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
|
||||
@@ -1555,7 +1557,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;
|
||||
@@ -165,7 +165,7 @@ index 3e3cf67..c185a93 100644
|
||||
POINT p;
|
||||
|
||||
TRACE("dst_surface %p, dst_point %s, src_surface %p, src_rect %s.\n",
|
||||
@@ -1697,10 +1699,10 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
|
||||
@@ -1641,10 +1643,10 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
|
||||
wined3d_texture_bind(dst_surface->container, context, FALSE);
|
||||
|
||||
surface_get_memory(src_surface, &data, src_surface->locations);
|
||||
@@ -178,7 +178,7 @@ index 3e3cf67..c185a93 100644
|
||||
|
||||
context_invalidate_active_texture(context);
|
||||
|
||||
@@ -1983,25 +1985,6 @@ HRESULT CDECL wined3d_surface_restore(struct wined3d_surface *surface)
|
||||
@@ -1927,25 +1929,6 @@ HRESULT CDECL wined3d_surface_restore(struct wined3d_surface *surface)
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
@@ -204,7 +204,7 @@ index 3e3cf67..c185a93 100644
|
||||
HRESULT CDECL wined3d_surface_set_overlay_position(struct wined3d_surface *surface, LONG x, LONG y)
|
||||
{
|
||||
LONG w, h;
|
||||
@@ -2182,20 +2165,21 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
|
||||
@@ -2126,20 +2109,21 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
|
||||
surface->resource.map_binding = WINED3D_LOCATION_USER_MEMORY;
|
||||
valid_location = WINED3D_LOCATION_USER_MEMORY;
|
||||
}
|
||||
@@ -232,7 +232,7 @@ index 3e3cf67..c185a93 100644
|
||||
}
|
||||
|
||||
/* The format might be changed to a format that needs conversion.
|
||||
@@ -2814,7 +2798,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
|
||||
@@ -2758,7 +2742,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
|
||||
if (format->flags & WINED3DFMT_FLAG_BROKEN_PITCH)
|
||||
map_desc->row_pitch = surface->resource.width * format->byte_count;
|
||||
else
|
||||
@@ -241,7 +241,7 @@ index 3e3cf67..c185a93 100644
|
||||
map_desc->slice_pitch = 0;
|
||||
|
||||
if (!rect)
|
||||
@@ -2941,6 +2925,7 @@ static void read_from_framebuffer(struct wined3d_surface *surface, DWORD dst_loc
|
||||
@@ -2885,6 +2869,7 @@ static void read_from_framebuffer(struct wined3d_surface *surface, DWORD dst_loc
|
||||
int i;
|
||||
BOOL srcIsUpsideDown;
|
||||
struct wined3d_bo_address data;
|
||||
@@ -249,7 +249,7 @@ index 3e3cf67..c185a93 100644
|
||||
|
||||
surface_get_memory(surface, &data, dst_location);
|
||||
|
||||
@@ -2977,8 +2962,8 @@ static void read_from_framebuffer(struct wined3d_surface *surface, DWORD dst_loc
|
||||
@@ -2921,8 +2906,8 @@ static void read_from_framebuffer(struct wined3d_surface *surface, DWORD dst_loc
|
||||
}
|
||||
|
||||
/* Setup pixel store pack state -- to glReadPixels into the correct place */
|
||||
@@ -260,7 +260,7 @@ index 3e3cf67..c185a93 100644
|
||||
checkGLcall("glPixelStorei");
|
||||
|
||||
gl_info->gl_ops.gl.p_glReadPixels(0, 0,
|
||||
@@ -2995,7 +2980,9 @@ static void read_from_framebuffer(struct wined3d_surface *surface, DWORD dst_loc
|
||||
@@ -2939,7 +2924,9 @@ static void read_from_framebuffer(struct wined3d_surface *surface, DWORD dst_loc
|
||||
{
|
||||
/* glReadPixels returns the image upside down, and there is no way to prevent this.
|
||||
* Flip the lines in software. */
|
||||
@@ -271,7 +271,7 @@ index 3e3cf67..c185a93 100644
|
||||
|
||||
if (!(row = HeapAlloc(GetProcessHeap(), 0, pitch)))
|
||||
goto error;
|
||||
@@ -4226,7 +4213,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4173,7 +4160,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
const struct wined3d_color_key_conversion *conversion;
|
||||
struct wined3d_texture *texture = surface->container;
|
||||
struct wined3d_context *context;
|
||||
@@ -280,7 +280,7 @@ index 3e3cf67..c185a93 100644
|
||||
struct wined3d_bo_address data;
|
||||
struct wined3d_format format;
|
||||
POINT dst_point = {0, 0};
|
||||
@@ -4314,7 +4301,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4261,7 +4248,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
wined3d_texture_bind_and_dirtify(texture, context, srgb);
|
||||
|
||||
width = surface->resource.width;
|
||||
@@ -289,7 +289,7 @@ index 3e3cf67..c185a93 100644
|
||||
|
||||
format = *texture->resource.format;
|
||||
if ((conversion = wined3d_format_get_color_key_conversion(texture, TRUE)))
|
||||
@@ -4352,9 +4339,9 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4299,9 +4286,9 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
context_release(context);
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
@@ -301,13 +301,13 @@ index 3e3cf67..c185a93 100644
|
||||
data.addr = mem;
|
||||
}
|
||||
else if (conversion)
|
||||
@@ -4374,14 +4361,14 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4321,14 +4308,14 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
}
|
||||
if (texture->swapchain && texture->swapchain->palette)
|
||||
palette = texture->swapchain->palette;
|
||||
- conversion->convert(data.addr, src_pitch, mem, dst_pitch,
|
||||
+ conversion->convert(data.addr, src_row_pitch, mem, dst_pitch,
|
||||
width, height, palette, &texture->gl_color_key);
|
||||
width, height, palette, &texture->async.gl_color_key);
|
||||
- src_pitch = dst_pitch;
|
||||
+ src_row_pitch = dst_pitch;
|
||||
data.addr = mem;
|
||||
@@ -320,10 +320,10 @@ index 3e3cf67..c185a93 100644
|
||||
context_release(context);
|
||||
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index 6b2e266..de433f6 100644
|
||||
index 34c69d1..be7f0d3 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -1279,7 +1279,7 @@ static void texture3d_sub_resource_upload_data(struct wined3d_resource *sub_reso
|
||||
@@ -1258,7 +1258,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;
|
||||
|
||||
@@ -386,10 +386,10 @@ index 91325dc..4fbb6b0 100644
|
||||
|
||||
if (!box)
|
||||
diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec
|
||||
index fb55abc..2d120f4 100644
|
||||
index bc1129f..fcabd53 100644
|
||||
--- a/dlls/wined3d/wined3d.spec
|
||||
+++ b/dlls/wined3d/wined3d.spec
|
||||
@@ -181,6 +181,7 @@
|
||||
@@ -182,6 +182,7 @@
|
||||
|
||||
@ cdecl wined3d_resource_get_desc(ptr ptr)
|
||||
@ cdecl wined3d_resource_get_parent(ptr)
|
||||
@@ -397,7 +397,7 @@ index fb55abc..2d120f4 100644
|
||||
@ cdecl wined3d_resource_get_priority(ptr)
|
||||
@ cdecl wined3d_resource_set_parent(ptr ptr)
|
||||
@ cdecl wined3d_resource_set_priority(ptr long)
|
||||
@@ -226,7 +227,6 @@
|
||||
@@ -227,7 +228,6 @@
|
||||
@ cdecl wined3d_surface_get_flip_status(ptr long)
|
||||
@ cdecl wined3d_surface_get_overlay_position(ptr ptr ptr)
|
||||
@ cdecl wined3d_surface_get_parent(ptr)
|
||||
@@ -406,10 +406,10 @@ index fb55abc..2d120f4 100644
|
||||
@ cdecl wined3d_surface_get_resource(ptr)
|
||||
@ cdecl wined3d_surface_getdc(ptr ptr)
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 01c0fc2..9c5134c 100644
|
||||
index cdaab07..844c2af 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2112,6 +2112,7 @@ struct wined3d_resource
|
||||
@@ -2127,6 +2127,7 @@ struct wined3d_resource
|
||||
UINT size;
|
||||
DWORD priority;
|
||||
void *heap_memory;
|
||||
@@ -417,7 +417,7 @@ index 01c0fc2..9c5134c 100644
|
||||
struct list resource_list_entry;
|
||||
|
||||
void *parent;
|
||||
@@ -2269,7 +2270,6 @@ BOOL volume_prepare_system_memory(struct wined3d_volume *volume) DECLSPEC_HIDDEN
|
||||
@@ -2291,7 +2292,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;
|
||||
@@ -425,7 +425,7 @@ index 01c0fc2..9c5134c 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;
|
||||
@@ -2319,7 +2319,6 @@ struct wined3d_surface
|
||||
@@ -2341,7 +2341,6 @@ struct wined3d_surface
|
||||
|
||||
DWORD flags;
|
||||
|
||||
@@ -434,10 +434,10 @@ index 01c0fc2..9c5134c 100644
|
||||
UINT pow2Height;
|
||||
|
||||
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
|
||||
index bf4efe8..9707748 100644
|
||||
index 3276799..a999afe 100644
|
||||
--- a/include/wine/wined3d.h
|
||||
+++ b/include/wine/wined3d.h
|
||||
@@ -2416,6 +2416,8 @@ static inline HRESULT wined3d_private_store_set_private_data(struct wined3d_priv
|
||||
@@ -2426,6 +2426,8 @@ static inline HRESULT wined3d_private_store_set_private_data(struct wined3d_priv
|
||||
void __cdecl wined3d_resource_get_desc(const struct wined3d_resource *resource,
|
||||
struct wined3d_resource_desc *desc);
|
||||
void * __cdecl wined3d_resource_get_parent(const struct wined3d_resource *resource);
|
||||
@@ -446,7 +446,7 @@ index bf4efe8..9707748 100644
|
||||
DWORD __cdecl wined3d_resource_get_priority(const struct wined3d_resource *resource);
|
||||
void __cdecl wined3d_resource_set_parent(struct wined3d_resource *resource, void *parent);
|
||||
DWORD __cdecl wined3d_resource_set_priority(struct wined3d_resource *resource, DWORD priority);
|
||||
@@ -2474,7 +2476,6 @@ HRESULT __cdecl wined3d_surface_get_blt_status(const struct wined3d_surface *sur
|
||||
@@ -2484,7 +2486,6 @@ HRESULT __cdecl wined3d_surface_get_blt_status(const struct wined3d_surface *sur
|
||||
HRESULT __cdecl wined3d_surface_get_flip_status(const struct wined3d_surface *surface, DWORD flags);
|
||||
HRESULT __cdecl wined3d_surface_get_overlay_position(const struct wined3d_surface *surface, LONG *x, LONG *y);
|
||||
void * __cdecl wined3d_surface_get_parent(const struct wined3d_surface *surface);
|
||||
@@ -455,5 +455,5 @@ index bf4efe8..9707748 100644
|
||||
struct wined3d_surface *render_target);
|
||||
struct wined3d_resource * __cdecl wined3d_surface_get_resource(struct wined3d_surface *surface);
|
||||
--
|
||||
2.3.0
|
||||
2.3.5
|
||||
|
||||
|
Reference in New Issue
Block a user