wined3d-CSMT_Main: Update patchset for CSMT (commandstream multithreading), to keep in sync with upstream repository.

This commit is contained in:
Sebastian Lackner
2015-09-04 21:39:34 +02:00
parent a4e76e0849
commit 12beeb3ac9
185 changed files with 1525 additions and 994 deletions

View File

@@ -1,18 +1,18 @@
From 0bff3caeafd1080f6fd6244abdf8a87ddff6c3d2 Mon Sep 17 00:00:00 2001
From b8718b23cf22dcdb8cfde0bb64101c7243ae44b5 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.
---
dlls/wined3d/resource.c | 31 +++++++++++++++++
dlls/wined3d/surface.c | 78 ++++++++++++++++++++----------------------
dlls/wined3d/surface.c | 75 +++++++++++++++++++-----------------------
dlls/wined3d/texture.c | 2 +-
dlls/wined3d/volume.c | 28 ++-------------
dlls/wined3d/volume.c | 28 ++--------------
dlls/wined3d/wined3d_private.h | 5 +--
5 files changed, 74 insertions(+), 70 deletions(-)
5 files changed, 70 insertions(+), 71 deletions(-)
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
index 1891165..0968cd2 100644
index 1891165..86441d1 100644
--- a/dlls/wined3d/resource.c
+++ b/dlls/wined3d/resource.c
@@ -414,3 +414,34 @@ void wined3d_resource_update_draw_binding(struct wined3d_resource *resource)
@@ -20,7 +20,7 @@ index 1891165..0968cd2 100644
resource->draw_binding = WINED3D_LOCATION_TEXTURE_RGB;
}
+
+void wined3d_resource_get_pitch(const struct wined3d_resource *resource, UINT *row_pitch,
+void CDECL wined3d_resource_get_pitch(const struct wined3d_resource *resource, UINT *row_pitch,
+ UINT *slice_pitch)
+{
+ unsigned int alignment;
@@ -51,7 +51,7 @@ index 1891165..0968cd2 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 2b5e734..c96c44c 100644
index e9e0620..f6be430 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)
@@ -158,7 +158,7 @@ index 2b5e734..c96c44c 100644
}
HRESULT CDECL wined3d_surface_set_overlay_position(struct wined3d_surface *surface, LONG x, LONG y)
@@ -2109,20 +2100,22 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
@@ -2109,20 +2100,21 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
surface->resource.map_binding = WINED3D_LOCATION_USER_MEMORY;
valid_location = WINED3D_LOCATION_USER_MEMORY;
}
@@ -181,11 +181,10 @@ index 2b5e734..c96c44c 100644
1, width, height, 1);
- surface->pitch = wined3d_format_calculate_pitch(texture_resource->format, width);
+ surface->resource.custom_row_pitch = wined3d_format_calculate_pitch(texture_resource->format, width);
+ surface->resource.custom_slice_pitch = surface->resource.custom_row_pitch * surface->resource.height; /* FIXME */
}
/* The format might be changed to a format that needs conversion.
@@ -2589,7 +2582,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
@@ -2742,7 +2734,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
if (fmt_flags & WINED3DFMT_FLAG_BROKEN_PITCH)
map_desc->row_pitch = surface->resource.width * format->byte_count;
else
@@ -194,7 +193,7 @@ index 2b5e734..c96c44c 100644
map_desc->slice_pitch = 0;
if (!rect)
@@ -2716,6 +2709,7 @@ static void read_from_framebuffer(struct wined3d_surface *surface, DWORD dst_loc
@@ -2869,6 +2861,7 @@ static void read_from_framebuffer(struct wined3d_surface *surface, DWORD dst_loc
int i;
BOOL srcIsUpsideDown;
struct wined3d_bo_address data;
@@ -202,7 +201,7 @@ index 2b5e734..c96c44c 100644
surface_get_memory(surface, &data, dst_location);
@@ -2752,8 +2746,8 @@ static void read_from_framebuffer(struct wined3d_surface *surface, DWORD dst_loc
@@ -2905,8 +2898,8 @@ static void read_from_framebuffer(struct wined3d_surface *surface, DWORD dst_loc
}
/* Setup pixel store pack state -- to glReadPixels into the correct place */
@@ -213,18 +212,16 @@ index 2b5e734..c96c44c 100644
checkGLcall("glPixelStorei");
gl_info->gl_ops.gl.p_glReadPixels(0, 0,
@@ -2770,7 +2764,9 @@ static void read_from_framebuffer(struct wined3d_surface *surface, DWORD dst_loc
@@ -2923,8 +2916,6 @@ 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. */
- UINT pitch = wined3d_surface_get_pitch(surface);
+ UINT pitch, slice_pitch;
+
+ wined3d_resource_get_pitch(&surface->resource, &pitch, &slice_pitch);
-
if (!(row = HeapAlloc(GetProcessHeap(), 0, pitch)))
goto error;
@@ -3967,7 +3963,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4120,7 +4111,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;
@@ -233,7 +230,7 @@ index 2b5e734..c96c44c 100644
struct wined3d_bo_address data;
struct wined3d_format format;
POINT dst_point = {0, 0};
@@ -4055,7 +4051,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4208,7 +4199,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
wined3d_texture_bind_and_dirtify(texture, context, srgb);
width = surface->resource.width;
@@ -242,7 +239,7 @@ index 2b5e734..c96c44c 100644
format = *texture->resource.format;
if ((conversion = wined3d_format_get_color_key_conversion(texture, TRUE)))
@@ -4093,9 +4089,9 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4246,9 +4237,9 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
context_release(context);
return E_OUTOFMEMORY;
}
@@ -254,7 +251,7 @@ index 2b5e734..c96c44c 100644
data.addr = mem;
}
else if (conversion)
@@ -4115,14 +4111,14 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4268,14 +4259,14 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
}
if (texture->swapchain && texture->swapchain->palette)
palette = texture->swapchain->palette;
@@ -286,7 +283,7 @@ index b369809..3485ac2 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 4e1c415..eec1492 100644
index 424938a..b672d4a 100644
--- a/dlls/wined3d/volume.c
+++ b/dlls/wined3d/volume.c
@@ -40,30 +40,6 @@ BOOL volume_prepare_system_memory(struct wined3d_volume *volume)
@@ -339,7 +336,7 @@ index 4e1c415..eec1492 100644
if (!box)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index d1ba5e4..77463aa 100644
index 919e818..7c26e44 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2164,6 +2164,7 @@ struct wined3d_resource

View File

@@ -1,38 +0,0 @@
From 8dc59ef56211678a681315041c0fd23bd490ad25 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Wed, 29 Jul 2015 06:35:07 +0200
Subject: wined3d: Properly initialize format_flags for surfaces and volumes.
---
dlls/wined3d/surface.c | 2 ++
dlls/wined3d/volume.c | 1 +
2 files changed, 3 insertions(+)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 3b033db..38a233d 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -5603,6 +5603,8 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
}
surface->container = container;
+ surface->resource.format_flags = container->resource.format_flags;
+
surface_validate_location(surface, WINED3D_LOCATION_SYSMEM);
list_init(&surface->renderbuffers);
list_init(&surface->overlays);
diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
index 424938a..4e1c415 100644
--- a/dlls/wined3d/volume.c
+++ b/dlls/wined3d/volume.c
@@ -779,6 +779,7 @@ static HRESULT volume_init(struct wined3d_volume *volume, struct wined3d_texture
}
volume->container = container;
+ volume->resource.format_flags = container->resource.format_flags;
return WINED3D_OK;
}
--
2.4.5

View File

@@ -1,4 +1,4 @@
From 09cdb67f93b21136003250e7cb60ec1a55877e26 Mon Sep 17 00:00:00 2001
From 013c83727f4fbbf15bbbe7ccb12d42d58d17e18d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Sat, 4 Jan 2014 00:53:47 +0100
Subject: wined3d: Remove surface_validate_location.
@@ -48,7 +48,7 @@ index 1ef681a..2683140 100644
}
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index b669ca3..4b4769f 100644
index 1dd4b69..4f646e4 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -1170,7 +1170,7 @@ static void surface_unload(struct wined3d_resource *resource)
@@ -69,7 +69,7 @@ index b669ca3..4b4769f 100644
surface_invalidate_location(dst_surface, ~WINED3D_LOCATION_TEXTURE_RGB);
return WINED3D_OK;
@@ -2170,7 +2170,7 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
@@ -2169,7 +2169,7 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
valid_location = WINED3D_LOCATION_SYSMEM;
}
@@ -78,7 +78,7 @@ index b669ca3..4b4769f 100644
return WINED3D_OK;
}
@@ -2716,7 +2716,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
@@ -2715,7 +2715,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
{
TRACE("WINED3D_MAP_DISCARD flag passed, marking %s as up to date.\n",
wined3d_debug_location(surface->resource.map_binding));
@@ -87,7 +87,7 @@ index b669ca3..4b4769f 100644
}
else
{
@@ -3288,7 +3288,7 @@ static void fb_copy_to_texture_direct(struct wined3d_surface *dst_surface, struc
@@ -3283,7 +3283,7 @@ static void fb_copy_to_texture_direct(struct wined3d_surface *dst_surface, struc
/* The texture is now most up to date - If the surface is a render target
* and has a drawable, this path is never entered. */
@@ -96,7 +96,7 @@ index b669ca3..4b4769f 100644
surface_invalidate_location(dst_surface, ~WINED3D_LOCATION_TEXTURE_RGB);
}
@@ -3561,7 +3561,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
@@ -3556,7 +3556,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
/* The texture is now most up to date - If the surface is a render target
* and has a drawable, this path is never entered. */
@@ -105,7 +105,7 @@ index b669ca3..4b4769f 100644
surface_invalidate_location(dst_surface, ~WINED3D_LOCATION_TEXTURE_RGB);
}
@@ -4067,13 +4067,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
@@ -4062,13 +4062,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
surface->ds_current_size.cy = surface->resource.height;
}
@@ -119,7 +119,7 @@ index b669ca3..4b4769f 100644
void surface_invalidate_location(struct wined3d_surface *surface, DWORD location)
{
TRACE("surface %p, location %s.\n", surface, wined3d_debug_location(location));
@@ -4461,7 +4454,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
@@ -4456,7 +4449,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
break;
}
@@ -128,7 +128,7 @@ index b669ca3..4b4769f 100644
if (location != WINED3D_LOCATION_SYSMEM && (surface->resource.locations & WINED3D_LOCATION_SYSMEM))
surface_evict_sysmem(surface);
@@ -4635,7 +4628,7 @@ static void ffp_blit_blit_surface(struct wined3d_device *device, DWORD filter,
@@ -4630,7 +4623,7 @@ static void ffp_blit_blit_surface(struct wined3d_device *device, DWORD filter,
wined3d_texture_set_color_key(src_surface->container, WINED3D_CKEY_SRC_BLT,
(old_color_key_flags & WINED3D_CKEY_SRC_BLT) ? &old_blt_key : NULL);
@@ -137,7 +137,7 @@ index b669ca3..4b4769f 100644
surface_invalidate_location(dst_surface, ~dst_surface->container->resource.draw_binding);
}
@@ -5615,7 +5608,7 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
@@ -5610,7 +5603,7 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
dst_surface, dst_surface->container->resource.draw_binding, &dst_rect);
context_release(context);
@@ -146,16 +146,16 @@ index b669ca3..4b4769f 100644
surface_invalidate_location(dst_surface, ~dst_surface->container->resource.draw_binding);
return WINED3D_OK;
@@ -5707,7 +5700,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
surface->container = container;
surface->resource.format_flags = container->resource.format_flags;
@@ -5700,7 +5693,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
}
surface->container = container;
- surface_validate_location(surface, WINED3D_LOCATION_SYSMEM);
+ wined3d_resource_validate_location(&surface->resource, WINED3D_LOCATION_SYSMEM);
list_init(&surface->renderbuffers);
list_init(&surface->overlays);
@@ -5739,7 +5732,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
@@ -5732,7 +5725,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
if (surface->resource.map_binding == WINED3D_LOCATION_DIB)
{
wined3d_resource_free_sysmem(&surface->resource);

Some files were not shown because too many files have changed in this diff Show More