Synchronize CSMT patchset with https://github.com/stefand/wine.

This commit is contained in:
Sebastian Lackner
2015-01-14 01:39:10 +01:00
parent b7ec4c3294
commit 322a32547f
20 changed files with 459 additions and 512 deletions

View File

@@ -1,4 +1,4 @@
From 366b6fe7fb45ebe1010417aedfa3dfab9cd6360b Mon Sep 17 00:00:00 2001
From baf99f4a2a809d820805212096d4fc9deb30fe68 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.
@@ -10,9 +10,9 @@ Subject: wined3d: Merge get_pitch functions.
dlls/wined3d/texture.c | 2 +-
dlls/wined3d/volume.c | 28 ++---------------
dlls/wined3d/wined3d.spec | 2 +-
dlls/wined3d/wined3d_private.h | 2 +-
dlls/wined3d/wined3d_private.h | 3 +-
include/wine/wined3d.h | 3 +-
8 files changed, 75 insertions(+), 75 deletions(-)
8 files changed, 75 insertions(+), 76 deletions(-)
diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
index a387d12..9a8d94f 100644
@@ -97,7 +97,7 @@ index 0ab55dc..8032a4c 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 fb27c8a..3ffec05 100644
index d7d2b8d..d48a2df 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)
@@ -221,7 +221,7 @@ index fb27c8a..3ffec05 100644
else
surface->resource.size = wined3d_format_calculate_size(texture_resource->format,
texture_resource->device->surface_alignment, width, height, 1);
@@ -2681,7 +2665,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
@@ -2834,7 +2818,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
@@ -230,7 +230,7 @@ index fb27c8a..3ffec05 100644
map_desc->slice_pitch = 0;
if (!rect)
@@ -2861,7 +2845,9 @@ static void read_from_framebuffer(struct wined3d_surface *surface, DWORD dst_loc
@@ -3014,7 +2998,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. */
@@ -241,7 +241,7 @@ index fb27c8a..3ffec05 100644
if (!(row = HeapAlloc(GetProcessHeap(), 0, pitch)))
goto error;
@@ -4093,7 +4079,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4246,7 +4232,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;
@@ -250,7 +250,7 @@ index fb27c8a..3ffec05 100644
struct wined3d_bo_address data;
struct wined3d_format format;
POINT dst_point = {0, 0};
@@ -4188,7 +4174,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4341,7 +4327,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
else surface->flags &= ~SFLAG_GLCKEY;
width = surface->resource.width;
@@ -259,7 +259,7 @@ index fb27c8a..3ffec05 100644
format = *texture->resource.format;
if ((conversion = wined3d_format_get_color_key_conversion(texture, TRUE)))
@@ -4227,9 +4213,9 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4380,9 +4366,9 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
context_release(context);
return E_OUTOFMEMORY;
}
@@ -271,7 +271,7 @@ index fb27c8a..3ffec05 100644
data.addr = mem;
}
else if (conversion)
@@ -4249,14 +4235,14 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4402,14 +4388,14 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
}
if (texture->swapchain && texture->swapchain->palette)
palette = texture->swapchain->palette;
@@ -290,7 +290,7 @@ index fb27c8a..3ffec05 100644
context_release(context);
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index d33bad1..0a8a550 100644
index d33bad1..1f06f39 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -1340,7 +1340,7 @@ static void texture3d_sub_resource_upload_data(struct wined3d_resource *sub_reso
@@ -298,7 +298,7 @@ index d33bad1..0a8a550 100644
unsigned int row_pitch, slice_pitch;
- wined3d_volume_get_pitch(volume, &row_pitch, &slice_pitch);
+ wined3d_resource_get_pitch(&volume->resource, &row_pitch, &slice_pitch);
+ wined3d_resource_get_pitch(sub_resource, &row_pitch, &slice_pitch);
if (row_pitch != data->row_pitch || slice_pitch != data->slice_pitch)
FIXME("Ignoring row/slice pitch (%u/%u).\n", data->row_pitch, data->slice_pitch);
@@ -356,7 +356,7 @@ index b5ab862..87b6ab6 100644
if (!box)
diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec
index 7a77003..95885c7 100644
index 9ce4981..c2dda2c 100644
--- a/dlls/wined3d/wined3d.spec
+++ b/dlls/wined3d/wined3d.spec
@@ -181,6 +181,7 @@
@@ -376,7 +376,7 @@ index 7a77003..95885c7 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 047946b..d3af1c0 100644
index 6ebb210..bfb7bcb 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2091,6 +2091,7 @@ struct wined3d_resource
@@ -387,7 +387,15 @@ index 047946b..d3af1c0 100644
struct list resource_list_entry;
void *parent;
@@ -2314,7 +2315,6 @@ struct wined3d_surface
@@ -2264,7 +2265,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;
-void wined3d_volume_get_pitch(const struct wined3d_volume *volume, UINT *row_pitch, UINT *slice_pitch) DECLSPEC_HIDDEN;
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;
@@ -2314,7 +2314,6 @@ struct wined3d_surface
DWORD flags;
@@ -396,7 +404,7 @@ index 047946b..d3af1c0 100644
UINT pow2Height;
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index 6e06388..cd8fd28 100644
index 92e8169..49b8d25 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -2418,6 +2418,8 @@ static inline HRESULT wined3d_private_store_set_private_data(struct wined3d_priv
@@ -417,5 +425,5 @@ index 6e06388..cd8fd28 100644
struct wined3d_surface *render_target);
struct wined3d_resource * __cdecl wined3d_surface_get_resource(struct wined3d_surface *surface);
--
1.9.1
2.2.1