Rebase against upstream changes.

This commit is contained in:
Sebastian Lackner
2015-04-16 19:29:50 +02:00
parent 3a65a99375
commit 572c6fe243
11 changed files with 390 additions and 382 deletions

View File

@@ -1,4 +1,4 @@
From e54e307937b44f9be63d54abfca483070004b924 Mon Sep 17 00:00:00 2001
From be8e04d375183cbd4dbca29f4ffe6473ef32a7ff 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.
@@ -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 a83d46f..00427f9 100644
index a49f521..5a8b250 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)
@@ -166,7 +166,7 @@ index a83d46f..00427f9 100644
TRACE("dst_surface %p, dst_point %s, src_surface %p, src_rect %s.\n",
@@ -1641,10 +1643,10 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
wined3d_texture_bind(dst_surface->container, context, FALSE);
wined3d_texture_bind_and_dirtify(dst_surface->container, context, FALSE);
surface_get_memory(src_surface, &data, src_surface->locations);
- src_pitch = wined3d_surface_get_pitch(src_surface);
@@ -176,9 +176,9 @@ index a83d46f..00427f9 100644
- src_pitch, dst_point, FALSE, wined3d_const_bo_address(&data));
+ src_row_pitch, dst_point, FALSE, wined3d_const_bo_address(&data));
context_invalidate_active_texture(context);
context_release(context);
@@ -1927,25 +1929,6 @@ HRESULT CDECL wined3d_surface_restore(struct wined3d_surface *surface)
@@ -1925,25 +1927,6 @@ HRESULT CDECL wined3d_surface_restore(struct wined3d_surface *surface)
return WINED3D_OK;
}
@@ -204,7 +204,7 @@ index a83d46f..00427f9 100644
HRESULT CDECL wined3d_surface_set_overlay_position(struct wined3d_surface *surface, LONG x, LONG y)
{
LONG w, h;
@@ -2126,20 +2109,21 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
@@ -2124,20 +2107,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 a83d46f..00427f9 100644
}
/* The format might be changed to a format that needs conversion.
@@ -2758,7 +2742,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
@@ -2756,7 +2740,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 a83d46f..00427f9 100644
map_desc->slice_pitch = 0;
if (!rect)
@@ -2885,6 +2869,7 @@ static void read_from_framebuffer(struct wined3d_surface *surface, DWORD dst_loc
@@ -2883,6 +2867,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 a83d46f..00427f9 100644
surface_get_memory(surface, &data, dst_location);
@@ -2921,8 +2906,8 @@ static void read_from_framebuffer(struct wined3d_surface *surface, DWORD dst_loc
@@ -2919,8 +2904,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 a83d46f..00427f9 100644
checkGLcall("glPixelStorei");
gl_info->gl_ops.gl.p_glReadPixels(0, 0,
@@ -2939,7 +2924,9 @@ static void read_from_framebuffer(struct wined3d_surface *surface, DWORD dst_loc
@@ -2937,7 +2922,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 a83d46f..00427f9 100644
if (!(row = HeapAlloc(GetProcessHeap(), 0, pitch)))
goto error;
@@ -4173,7 +4160,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4118,7 +4105,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 a83d46f..00427f9 100644
struct wined3d_bo_address data;
struct wined3d_format format;
POINT dst_point = {0, 0};
@@ -4261,7 +4248,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4206,7 +4193,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 a83d46f..00427f9 100644
format = *texture->resource.format;
if ((conversion = wined3d_format_get_color_key_conversion(texture, TRUE)))
@@ -4299,9 +4286,9 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4244,9 +4231,9 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
context_release(context);
return E_OUTOFMEMORY;
}
@@ -301,7 +301,7 @@ index a83d46f..00427f9 100644
data.addr = mem;
}
else if (conversion)
@@ -4321,14 +4308,14 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4266,14 +4253,14 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
}
if (texture->swapchain && texture->swapchain->palette)
palette = texture->swapchain->palette;
@@ -320,7 +320,7 @@ index a83d46f..00427f9 100644
context_release(context);
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index 34c69d1..be7f0d3 100644
index 78d1266..5e68257 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -1258,7 +1258,7 @@ static void texture3d_sub_resource_upload_data(struct wined3d_resource *sub_reso
@@ -333,7 +333,7 @@ index 34c69d1..be7f0d3 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 91325dc..4fbb6b0 100644
index 357608f..1a5e629 100644
--- a/dlls/wined3d/volume.c
+++ b/dlls/wined3d/volume.c
@@ -40,30 +40,6 @@ BOOL volume_prepare_system_memory(struct wined3d_volume *volume)
@@ -364,10 +364,10 @@ index 91325dc..4fbb6b0 100644
- TRACE("Returning row pitch %u, slice pitch %u.\n", *row_pitch, *slice_pitch);
-}
-
/* This call just uploads data, the caller is responsible for binding the
* correct texture. */
/* Context activation is done by the caller. */
void wined3d_volume_upload_data(struct wined3d_volume *volume, const struct wined3d_context *context,
const struct wined3d_const_bo_address *data)
@@ -93,7 +69,7 @@ void wined3d_volume_upload_data(struct wined3d_volume *volume, const struct wine
@@ -95,7 +71,7 @@ void wined3d_volume_upload_data(struct wined3d_volume *volume, const struct wine
dst_row_pitch = width * format->conv_byte_count;
dst_slice_pitch = dst_row_pitch * height;
@@ -376,7 +376,7 @@ index 91325dc..4fbb6b0 100644
converted_mem = HeapAlloc(GetProcessHeap(), 0, dst_slice_pitch * depth);
format->convert(data->addr, converted_mem, src_row_pitch, src_slice_pitch,
@@ -636,7 +612,7 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume,
@@ -642,7 +618,7 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume,
}
else
{
@@ -406,10 +406,10 @@ index bc1129f..fcabd53 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 cdaab07..844c2af 100644
index 8e58e4b..2656399 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2127,6 +2127,7 @@ struct wined3d_resource
@@ -2121,6 +2121,7 @@ struct wined3d_resource
UINT size;
DWORD priority;
void *heap_memory;
@@ -417,7 +417,7 @@ index cdaab07..844c2af 100644
struct list resource_list_entry;
void *parent;
@@ -2291,7 +2292,6 @@ BOOL volume_prepare_system_memory(struct wined3d_volume *volume) DECLSPEC_HIDDEN
@@ -2285,7 +2286,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 cdaab07..844c2af 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;
@@ -2341,7 +2341,6 @@ struct wined3d_surface
@@ -2335,7 +2335,6 @@ struct wined3d_surface
DWORD flags;