mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
Rebase against upstream changes.
This commit is contained in:
parent
44c159ca06
commit
ea8db60185
@ -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
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From cc8b1bb0366f3fe8fb103eb2a50e5238ec1d30b9 Mon Sep 17 00:00:00 2001
|
||||
From 9d762900cb2a33e8dc4ee3c174533bfaa7687a47 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Sun, 17 Nov 2013 19:34:26 +0100
|
||||
Subject: wined3d: Pass a context to surface_load_drawable and
|
||||
@ -9,10 +9,10 @@ Subject: wined3d: Pass a context to surface_load_drawable and
|
||||
1 file changed, 34 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 17ce8ef..8a569a5 100644
|
||||
index ac7df27..e05a402 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -3604,19 +3604,35 @@ void surface_translate_drawable_coords(const struct wined3d_surface *surface, HW
|
||||
@@ -3533,19 +3533,35 @@ void surface_translate_drawable_coords(const struct wined3d_surface *surface, HW
|
||||
rect->bottom = drawable_height - rect->bottom;
|
||||
}
|
||||
|
||||
@ -49,7 +49,7 @@ index 17ce8ef..8a569a5 100644
|
||||
gl_info = context->gl_info;
|
||||
|
||||
/* Make sure the surface is up-to-date. This should probably use
|
||||
@@ -3669,7 +3685,12 @@ static void surface_blt_to_drawable(const struct wined3d_device *device,
|
||||
@@ -3598,7 +3614,12 @@ static void surface_blt_to_drawable(const struct wined3d_device *device,
|
||||
&& dst_surface->container->swapchain->front_buffer == dst_surface->container))
|
||||
gl_info->gl_ops.gl.p_glFlush(); /* Flush to ensure ordering across contexts. */
|
||||
|
||||
@ -63,15 +63,15 @@ index 17ce8ef..8a569a5 100644
|
||||
}
|
||||
|
||||
HRESULT surface_color_fill(struct wined3d_surface *s, const RECT *rect, const struct wined3d_color *color)
|
||||
@@ -3820,6 +3841,7 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE
|
||||
@@ -3750,6 +3771,7 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE
|
||||
/* Blit from offscreen surface to render target */
|
||||
struct wined3d_color_key old_blt_key = src_surface->container->src_blt_color_key;
|
||||
DWORD old_color_key_flags = src_surface->container->color_key_flags;
|
||||
struct wined3d_color_key old_blt_key = src_surface->container->async.src_blt_color_key;
|
||||
DWORD old_color_key_flags = src_surface->container->async.color_key_flags;
|
||||
+ struct wined3d_context *context;
|
||||
|
||||
TRACE("Blt from surface %p to rendertarget %p\n", src_surface, dst_surface);
|
||||
|
||||
@@ -3853,9 +3875,11 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE
|
||||
@@ -3783,9 +3805,11 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE
|
||||
wined3d_texture_set_color_key(src_surface->container, WINED3D_CKEY_SRC_BLT, NULL);
|
||||
}
|
||||
|
||||
@ -84,7 +84,7 @@ index 17ce8ef..8a569a5 100644
|
||||
|
||||
/* Restore the color key parameters */
|
||||
wined3d_texture_set_color_key(src_surface->container, WINED3D_CKEY_SRC_BLT,
|
||||
@@ -4218,8 +4242,9 @@ static void surface_load_sysmem(struct wined3d_surface *surface,
|
||||
@@ -4148,8 +4172,9 @@ static void surface_load_sysmem(struct wined3d_surface *surface,
|
||||
surface, wined3d_debug_location(surface->locations));
|
||||
}
|
||||
|
||||
@ -95,7 +95,7 @@ index 17ce8ef..8a569a5 100644
|
||||
{
|
||||
RECT r;
|
||||
|
||||
@@ -4232,7 +4257,7 @@ static HRESULT surface_load_drawable(struct wined3d_surface *surface,
|
||||
@@ -4162,7 +4187,7 @@ static HRESULT surface_load_drawable(struct wined3d_surface *surface,
|
||||
|
||||
surface_get_rect(surface, NULL, &r);
|
||||
surface_load_location(surface, WINED3D_LOCATION_TEXTURE_RGB);
|
||||
@ -104,7 +104,7 @@ index 17ce8ef..8a569a5 100644
|
||||
WINED3D_TEXF_POINT, FALSE, surface, &r, surface, &r);
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -4498,7 +4523,10 @@ HRESULT surface_load_location(struct wined3d_surface *surface, DWORD location)
|
||||
@@ -4420,7 +4445,10 @@ HRESULT surface_load_location(struct wined3d_surface *surface, DWORD location)
|
||||
break;
|
||||
|
||||
case WINED3D_LOCATION_DRAWABLE:
|
||||
@ -117,5 +117,5 @@ index 17ce8ef..8a569a5 100644
|
||||
break;
|
||||
|
||||
--
|
||||
2.2.1
|
||||
2.3.5
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 6e6c9bc0fb30c4d0856b6c877a7f1c909e3301a9 Mon Sep 17 00:00:00 2001
|
||||
From 543d8046143866823083e3b466d8ba04fb3c45c1 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Tue, 21 Jan 2014 12:22:30 +0100
|
||||
Subject: wined3d: Move surface locations into the resource.
|
||||
@ -13,10 +13,10 @@ Subject: wined3d: Move surface locations into the resource.
|
||||
6 files changed, 56 insertions(+), 56 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
|
||||
index 688bdb7..2188d2d 100644
|
||||
index fca2d32..4b24e3d 100644
|
||||
--- a/dlls/wined3d/arb_program_shader.c
|
||||
+++ b/dlls/wined3d/arb_program_shader.c
|
||||
@@ -7651,7 +7651,7 @@ HRESULT arbfp_blit_surface(struct wined3d_device *device, DWORD filter,
|
||||
@@ -7807,7 +7807,7 @@ HRESULT arbfp_blit_surface(struct wined3d_device *device, DWORD filter,
|
||||
|
||||
/* Now load the surface */
|
||||
if (wined3d_settings.offscreen_rendering_mode != ORM_FBO
|
||||
@ -26,7 +26,7 @@ index 688bdb7..2188d2d 100644
|
||||
&& !wined3d_resource_is_offscreen(&src_surface->container->resource))
|
||||
{
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index c6c43bc..7b66fcf 100644
|
||||
index 68864ba..db6eb59 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -236,7 +236,7 @@ static void prepare_ds_clear(struct wined3d_surface *ds, struct wined3d_context
|
||||
@ -48,10 +48,10 @@ index c6c43bc..7b66fcf 100644
|
||||
ds->ds_current_size.cx,
|
||||
ds->ds_current_size.cy);
|
||||
diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c
|
||||
index f7fd9a4..9ccc1b4 100644
|
||||
index 913ada5..567550e 100644
|
||||
--- a/dlls/wined3d/drawprim.c
|
||||
+++ b/dlls/wined3d/drawprim.c
|
||||
@@ -648,7 +648,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
|
||||
@@ -651,7 +651,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
|
||||
if (!context->render_offscreen && ds != device->onscreen_depth_stencil)
|
||||
device_switch_onscreen_ds(device, context, ds);
|
||||
|
||||
@ -61,7 +61,7 @@ index f7fd9a4..9ccc1b4 100644
|
||||
else
|
||||
SetRectEmpty(¤t_rect);
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index c611261..09c446c 100644
|
||||
index 16bbb06..de3347d 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -555,7 +555,7 @@ static void surface_prepare_system_memory(struct wined3d_surface *surface)
|
||||
@ -91,7 +91,7 @@ index c611261..09c446c 100644
|
||||
{
|
||||
TRACE("Not dirtified, nothing to do.\n");
|
||||
return;
|
||||
@@ -1725,7 +1725,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
|
||||
@@ -1669,7 +1669,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
|
||||
surface_load_location(dst_surface, context, WINED3D_LOCATION_TEXTURE_RGB);
|
||||
wined3d_texture_bind(dst_surface->container, context, FALSE);
|
||||
|
||||
@ -100,7 +100,7 @@ index c611261..09c446c 100644
|
||||
wined3d_resource_get_pitch(&src_surface->resource, &src_row_pitch, &src_slice_pitch);
|
||||
|
||||
wined3d_surface_upload_data(dst_surface, gl_info, src_format, src_rect,
|
||||
@@ -1850,7 +1850,7 @@ void surface_load(struct wined3d_surface *surface, struct wined3d_context *conte
|
||||
@@ -1794,7 +1794,7 @@ void surface_load(struct wined3d_surface *surface, struct wined3d_context *conte
|
||||
if (surface->resource.pool == WINED3D_POOL_SCRATCH)
|
||||
ERR("Not supported on scratch surfaces.\n");
|
||||
|
||||
@ -109,7 +109,7 @@ index c611261..09c446c 100644
|
||||
{
|
||||
TRACE("surface is already in texture\n");
|
||||
return;
|
||||
@@ -2161,7 +2161,7 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
|
||||
@@ -2105,7 +2105,7 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
|
||||
create_dib = TRUE;
|
||||
}
|
||||
|
||||
@ -118,7 +118,7 @@ index c611261..09c446c 100644
|
||||
wined3d_resource_free_sysmem(&surface->resource);
|
||||
|
||||
width = texture_resource->width;
|
||||
@@ -3218,9 +3218,9 @@ void flip_surface(struct wined3d_surface *front, struct wined3d_surface *back)
|
||||
@@ -3170,9 +3170,9 @@ void flip_surface(struct wined3d_surface *front, struct wined3d_surface *back)
|
||||
back->flags = front->flags;
|
||||
front->flags = tmp_flags;
|
||||
|
||||
@ -131,7 +131,7 @@ index c611261..09c446c 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3399,7 +3399,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
|
||||
@@ -3351,7 +3351,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
|
||||
checkGLcall("glEnable(texture_target)");
|
||||
|
||||
/* For now invalidate the texture copy of the back buffer. Drawable and sysmem copy are untouched */
|
||||
@ -140,7 +140,7 @@ index c611261..09c446c 100644
|
||||
}
|
||||
|
||||
/* Make sure that the top pixel is always above the bottom pixel, and keep a separate upside down flag
|
||||
@@ -3992,13 +3992,14 @@ void surface_modify_ds_location(struct wined3d_surface *surface,
|
||||
@@ -3945,13 +3945,14 @@ void surface_modify_ds_location(struct wined3d_surface *surface,
|
||||
{
|
||||
TRACE("surface %p, new location %#x, w %u, h %u.\n", surface, location, w, h);
|
||||
|
||||
@ -158,7 +158,7 @@ index c611261..09c446c 100644
|
||||
}
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
@@ -4013,7 +4014,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
@@ -3966,7 +3967,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
/* TODO: Make this work for modes other than FBO */
|
||||
if (wined3d_settings.offscreen_rendering_mode != ORM_FBO) return;
|
||||
|
||||
@ -167,7 +167,7 @@ index c611261..09c446c 100644
|
||||
{
|
||||
w = surface->ds_current_size.cx;
|
||||
h = surface->ds_current_size.cy;
|
||||
@@ -4039,7 +4040,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
@@ -3992,7 +3993,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
return;
|
||||
}
|
||||
|
||||
@ -176,7 +176,7 @@ index c611261..09c446c 100644
|
||||
{
|
||||
TRACE("Surface was discarded, no need copy data.\n");
|
||||
switch (location)
|
||||
@@ -4056,17 +4057,17 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
@@ -4009,17 +4010,17 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
default:
|
||||
FIXME("Unhandled location %#x\n", location);
|
||||
}
|
||||
@ -198,7 +198,7 @@ index c611261..09c446c 100644
|
||||
surface->ds_current_size.cx = surface->resource.width;
|
||||
surface->ds_current_size.cy = surface->resource.height;
|
||||
return;
|
||||
@@ -4155,7 +4156,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
@@ -4108,7 +4109,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
ERR("Invalid location (%#x) specified.\n", location);
|
||||
}
|
||||
|
||||
@ -207,7 +207,7 @@ index c611261..09c446c 100644
|
||||
surface->ds_current_size.cx = surface->resource.width;
|
||||
surface->ds_current_size.cy = surface->resource.height;
|
||||
}
|
||||
@@ -4164,7 +4165,7 @@ void surface_validate_location(struct wined3d_surface *surface, DWORD location)
|
||||
@@ -4117,7 +4118,7 @@ void surface_validate_location(struct wined3d_surface *surface, DWORD location)
|
||||
{
|
||||
TRACE("surface %p, location %s.\n", surface, wined3d_debug_location(location));
|
||||
|
||||
@ -216,7 +216,7 @@ index c611261..09c446c 100644
|
||||
}
|
||||
|
||||
void surface_invalidate_location(struct wined3d_surface *surface, DWORD location)
|
||||
@@ -4173,9 +4174,9 @@ void surface_invalidate_location(struct wined3d_surface *surface, DWORD location
|
||||
@@ -4126,9 +4127,9 @@ void surface_invalidate_location(struct wined3d_surface *surface, DWORD location
|
||||
|
||||
if (location & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB))
|
||||
wined3d_texture_set_dirty(surface->container);
|
||||
@ -228,7 +228,7 @@ index c611261..09c446c 100644
|
||||
ERR("Surface %p does not have any up to date location.\n", surface);
|
||||
}
|
||||
|
||||
@@ -4211,7 +4212,7 @@ static void surface_copy_simple_location(struct wined3d_surface *surface, DWORD
|
||||
@@ -4164,7 +4165,7 @@ static void surface_copy_simple_location(struct wined3d_surface *surface, DWORD
|
||||
UINT size = surface->resource.size;
|
||||
|
||||
surface_get_memory(surface, &dst, location);
|
||||
@ -237,7 +237,7 @@ index c611261..09c446c 100644
|
||||
|
||||
if (dst.buffer_object)
|
||||
{
|
||||
@@ -4244,33 +4245,33 @@ static void surface_load_sysmem(struct wined3d_surface *surface,
|
||||
@@ -4197,33 +4198,33 @@ static void surface_load_sysmem(struct wined3d_surface *surface,
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
|
||||
@ -277,7 +277,7 @@ index c611261..09c446c 100644
|
||||
}
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
@@ -4310,14 +4311,14 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4263,14 +4264,14 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
|
||||
if (wined3d_settings.offscreen_rendering_mode != ORM_FBO
|
||||
&& wined3d_resource_is_offscreen(&texture->resource)
|
||||
@ -294,7 +294,7 @@ index c611261..09c446c 100644
|
||||
&& (surface->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,
|
||||
@@ -4333,13 +4334,13 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4286,13 +4287,13 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
@ -310,7 +310,7 @@ index c611261..09c446c 100644
|
||||
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};
|
||||
@@ -4354,7 +4355,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4307,7 +4308,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
|
||||
if (srgb)
|
||||
{
|
||||
@ -319,7 +319,7 @@ index c611261..09c446c 100644
|
||||
== WINED3D_LOCATION_TEXTURE_RGB)
|
||||
{
|
||||
/* Performance warning... */
|
||||
@@ -4365,7 +4366,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4318,7 +4319,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -328,7 +328,7 @@ index c611261..09c446c 100644
|
||||
== WINED3D_LOCATION_TEXTURE_SRGB)
|
||||
{
|
||||
/* Performance warning... */
|
||||
@@ -4375,7 +4376,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4328,7 +4329,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
}
|
||||
}
|
||||
|
||||
@ -337,7 +337,7 @@ index c611261..09c446c 100644
|
||||
{
|
||||
WARN("Trying to load a texture from sysmem, but no simple location is valid.\n");
|
||||
/* Lets hope we get it from somewhere... */
|
||||
@@ -4410,7 +4411,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4363,7 +4364,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
surface_remove_pbo(surface, gl_info);
|
||||
}
|
||||
|
||||
@ -346,7 +346,7 @@ index c611261..09c446c 100644
|
||||
if (format.convert)
|
||||
{
|
||||
/* This code is entered for texture formats which need a fixup. */
|
||||
@@ -4467,7 +4468,7 @@ static void surface_multisample_resolve(struct wined3d_surface *surface, struct
|
||||
@@ -4419,7 +4420,7 @@ static void surface_multisample_resolve(struct wined3d_surface *surface, struct
|
||||
{
|
||||
RECT rect = {0, 0, surface->resource.width, surface->resource.height};
|
||||
|
||||
@ -355,7 +355,7 @@ index c611261..09c446c 100644
|
||||
ERR("Trying to resolve multisampled surface %p, but location WINED3D_LOCATION_RB_MULTISAMPLE not current.\n",
|
||||
surface);
|
||||
|
||||
@@ -4485,12 +4486,12 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
@@ -4437,12 +4438,12 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
if (surface->resource.usage & WINED3DUSAGE_DEPTHSTENCIL)
|
||||
{
|
||||
if (location == WINED3D_LOCATION_TEXTURE_RGB
|
||||
@ -370,7 +370,7 @@ index c611261..09c446c 100644
|
||||
&& surface->container->resource.draw_binding != WINED3D_LOCATION_DRAWABLE)
|
||||
{
|
||||
/* Already up to date, nothing to do. */
|
||||
@@ -4499,12 +4500,12 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
@@ -4451,12 +4452,12 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
else
|
||||
{
|
||||
FIXME("Unimplemented copy from %s to %s for depth/stencil buffers.\n",
|
||||
@ -385,7 +385,7 @@ index c611261..09c446c 100644
|
||||
{
|
||||
TRACE("Location already up to date.\n");
|
||||
return;
|
||||
@@ -4518,7 +4519,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
@@ -4470,7 +4471,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
required_access, surface->resource.access_flags);
|
||||
}
|
||||
|
||||
@ -394,7 +394,7 @@ index c611261..09c446c 100644
|
||||
{
|
||||
ERR("Surface %p does not have any up to date location.\n", surface);
|
||||
surface->flags |= SFLAG_LOST;
|
||||
@@ -4557,7 +4558,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
@@ -4509,7 +4510,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
|
||||
surface_validate_location(surface, location);
|
||||
|
||||
@ -403,7 +403,7 @@ index c611261..09c446c 100644
|
||||
surface_evict_sysmem(surface);
|
||||
|
||||
return;
|
||||
@@ -5562,8 +5563,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
@@ -5505,8 +5506,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
{
|
||||
/* In principle this would apply to depth blits as well, but we don't
|
||||
* implement those in the CPU blitter at the moment. */
|
||||
@ -414,19 +414,19 @@ index c611261..09c446c 100644
|
||||
{
|
||||
if (scale)
|
||||
TRACE("Not doing sysmem blit because of scaling.\n");
|
||||
@@ -5590,8 +5591,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
TRACE("Color blit.\n");
|
||||
|
||||
/* Upload */
|
||||
- if ((src_surface->locations & WINED3D_LOCATION_SYSMEM)
|
||||
@@ -5546,8 +5547,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
color_key = &src_surface->container->async.src_blt_color_key;
|
||||
blit_op = WINED3D_BLIT_OP_COLOR_BLIT_CKEY;
|
||||
}
|
||||
- else if ((src_surface->locations & WINED3D_LOCATION_SYSMEM)
|
||||
- && !(dst_surface->locations & WINED3D_LOCATION_SYSMEM))
|
||||
+ if ((src_surface->resource.locations & WINED3D_LOCATION_SYSMEM)
|
||||
+ else if ((src_surface->resource.locations & WINED3D_LOCATION_SYSMEM)
|
||||
+ && !(dst_surface->resource.locations & WINED3D_LOCATION_SYSMEM))
|
||||
{
|
||||
/* Upload */
|
||||
if (scale)
|
||||
TRACE("Not doing upload because of scaling.\n");
|
||||
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
index d742b11..601d3ad 100644
|
||||
index 4f4d4df..e702d61 100644
|
||||
--- a/dlls/wined3d/swapchain.c
|
||||
+++ b/dlls/wined3d/swapchain.c
|
||||
@@ -555,8 +555,8 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
|
||||
@ -441,10 +441,10 @@ index d742b11..601d3ad 100644
|
||||
/* Both memory copies of the surfaces are ok, flip them around too instead of dirtifying
|
||||
* Doesn't work with render_to_fbo because we're not flipping
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index d9a4cdb..86f3c58 100644
|
||||
index 3cb69ff..3cebde7 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2317,7 +2317,6 @@ struct wined3d_surface
|
||||
@@ -2339,7 +2339,6 @@ struct wined3d_surface
|
||||
const struct wined3d_surface_ops *surface_ops;
|
||||
struct wined3d_texture *container;
|
||||
void *user_memory;
|
||||
@ -453,5 +453,5 @@ index d9a4cdb..86f3c58 100644
|
||||
DWORD flags;
|
||||
|
||||
--
|
||||
2.3.0
|
||||
2.3.5
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 819f7f67ac69f32981342604f7aa0b011377a891 Mon Sep 17 00:00:00 2001
|
||||
From 4fb4e37de61914de25e8e9e367824506ef85f0e2 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Thu, 20 Dec 2012 13:09:17 +0100
|
||||
Subject: wined3d: Move the framebuffer into wined3d_state
|
||||
@ -20,7 +20,7 @@ Subject: wined3d: Move the framebuffer into wined3d_state
|
||||
13 files changed, 171 insertions(+), 126 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
|
||||
index d745591..f5a7786 100644
|
||||
index b59374d..3e81dc0 100644
|
||||
--- a/dlls/wined3d/arb_program_shader.c
|
||||
+++ b/dlls/wined3d/arb_program_shader.c
|
||||
@@ -706,7 +706,7 @@ static void shader_arb_load_constants_internal(struct shader_arb_priv *priv,
|
||||
@ -129,10 +129,10 @@ index 5644ea0..bfedf0e 100644
|
||||
WORD map;
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 4a04b00..408e9b5 100644
|
||||
index 6bdf969..09bfee0 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -280,7 +280,7 @@ static void wined3d_cs_exec_clear(struct wined3d_cs *cs, const void *data)
|
||||
@@ -290,7 +290,7 @@ static void wined3d_cs_exec_clear(struct wined3d_cs *cs, const void *data)
|
||||
device = cs->device;
|
||||
wined3d_get_draw_rect(&device->state, &draw_rect);
|
||||
device_clear_render_targets(device, device->adapter->gl_info.limits.buffers,
|
||||
@ -141,7 +141,7 @@ index 4a04b00..408e9b5 100644
|
||||
op->color, op->depth, op->stencil);
|
||||
}
|
||||
|
||||
@@ -387,7 +387,7 @@ static void wined3d_cs_exec_set_rendertarget_view(struct wined3d_cs *cs, const v
|
||||
@@ -397,7 +397,7 @@ static void wined3d_cs_exec_set_rendertarget_view(struct wined3d_cs *cs, const v
|
||||
{
|
||||
const struct wined3d_cs_set_rendertarget_view *op = data;
|
||||
|
||||
@ -150,7 +150,7 @@ index 4a04b00..408e9b5 100644
|
||||
device_invalidate_state(cs->device, STATE_FRAMEBUFFER);
|
||||
}
|
||||
|
||||
@@ -410,7 +410,7 @@ static void wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
|
||||
@@ -420,7 +420,7 @@ static void wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
|
||||
struct wined3d_device *device = cs->device;
|
||||
struct wined3d_rendertarget_view *prev;
|
||||
|
||||
@ -159,7 +159,7 @@ index 4a04b00..408e9b5 100644
|
||||
{
|
||||
struct wined3d_surface *prev_surface = wined3d_rendertarget_view_get_surface(prev);
|
||||
|
||||
@@ -426,7 +426,7 @@ static void wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
|
||||
@@ -436,7 +436,7 @@ static void wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
|
||||
}
|
||||
}
|
||||
|
||||
@ -168,7 +168,7 @@ index 4a04b00..408e9b5 100644
|
||||
|
||||
if (!prev != !op->view)
|
||||
{
|
||||
@@ -896,7 +896,7 @@ static void wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data)
|
||||
@@ -982,7 +982,7 @@ static void wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data)
|
||||
|
||||
state_cleanup(&cs->state);
|
||||
memset(&cs->state, 0, sizeof(cs->state));
|
||||
@ -177,7 +177,7 @@ index 4a04b00..408e9b5 100644
|
||||
WINED3D_STATE_NO_REF | WINED3D_STATE_INIT_DEFAULT)))
|
||||
ERR("Failed to initialize CS state, hr %#x.\n", hr);
|
||||
}
|
||||
@@ -978,17 +978,9 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
@@ -1065,17 +1065,9 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
if (!(cs = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*cs))))
|
||||
return NULL;
|
||||
|
||||
@ -196,7 +196,7 @@ index 4a04b00..408e9b5 100644
|
||||
HeapFree(GetProcessHeap(), 0, cs);
|
||||
return NULL;
|
||||
}
|
||||
@@ -1009,7 +1001,6 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
@@ -1096,7 +1088,6 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
void wined3d_cs_destroy(struct wined3d_cs *cs)
|
||||
{
|
||||
state_cleanup(&cs->state);
|
||||
@ -577,10 +577,10 @@ index f2c2f42..c6a72fc 100644
|
||||
|
||||
surface_modify_ds_location(ds, location, ds->ds_current_size.cx, ds->ds_current_size.cy);
|
||||
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
|
||||
index e4ddbe6..9d27b50 100644
|
||||
index 1a1b6b0..22a1ced 100644
|
||||
--- a/dlls/wined3d/glsl_shader.c
|
||||
+++ b/dlls/wined3d/glsl_shader.c
|
||||
@@ -1064,7 +1064,7 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
|
||||
@@ -1088,7 +1088,7 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
|
||||
const struct wined3d_state *state = &shader->device->state;
|
||||
const struct ps_compile_args *ps_args = ctx_priv->cur_ps_args;
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
@ -590,7 +590,7 @@ index e4ddbe6..9d27b50 100644
|
||||
const struct wined3d_shader_lconst *lconst;
|
||||
const char *prefix;
|
||||
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
|
||||
index 31b391b..6dc1abd 100644
|
||||
index 0bedf24..70c4635 100644
|
||||
--- a/dlls/wined3d/shader.c
|
||||
+++ b/dlls/wined3d/shader.c
|
||||
@@ -2344,7 +2344,7 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3
|
||||
@ -603,7 +603,7 @@ index 31b391b..6dc1abd 100644
|
||||
{
|
||||
static unsigned int warned = 0;
|
||||
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
|
||||
index 69623af..90aae0a 100644
|
||||
index b3ac4f1..7beb260 100644
|
||||
--- a/dlls/wined3d/state.c
|
||||
+++ b/dlls/wined3d/state.c
|
||||
@@ -105,7 +105,7 @@ static void state_zenable(struct wined3d_context *context, const struct wined3d_
|
||||
@ -788,22 +788,23 @@ index 62b1841..76a80e2 100644
|
||||
|
||||
if (FAILED(hr = stateblock_allocate_shader_constants(stateblock)))
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 9647c2a..4990848 100644
|
||||
index f993eae..2cff4f6 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -3469,9 +3469,9 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE
|
||||
@@ -3413,10 +3413,10 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE
|
||||
enum wined3d_texture_filter_type filter)
|
||||
{
|
||||
struct wined3d_device *device = dst_surface->resource.device;
|
||||
- const struct wined3d_surface *rt = wined3d_rendertarget_view_get_surface(device->fb.render_targets[0]);
|
||||
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
|
||||
const struct wined3d_d3d_info *d3d_info = &device->adapter->d3d_info;
|
||||
struct wined3d_swapchain *src_swapchain, *dst_swapchain;
|
||||
+ const struct wined3d_surface *rt = wined3d_rendertarget_view_get_surface(device->state.fb.render_targets[0]);
|
||||
|
||||
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),
|
||||
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
index dd7d2c7..ed2964e 100644
|
||||
index 1ac5e7a..454cb21 100644
|
||||
--- a/dlls/wined3d/swapchain.c
|
||||
+++ b/dlls/wined3d/swapchain.c
|
||||
@@ -421,7 +421,7 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
|
||||
@ -816,7 +817,7 @@ index dd7d2c7..ed2964e 100644
|
||||
struct wined3d_context *context;
|
||||
struct wined3d_surface *front;
|
||||
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
|
||||
index 468aea9..948b793 100644
|
||||
index 2f21b29..03eb4d5 100644
|
||||
--- a/dlls/wined3d/utils.c
|
||||
+++ b/dlls/wined3d/utils.c
|
||||
@@ -3190,7 +3190,7 @@ void get_projection_matrix(const struct wined3d_context *context, const struct w
|
||||
@ -828,7 +829,7 @@ index 468aea9..948b793 100644
|
||||
state->render_states[WINED3D_RS_ZENABLE] : WINED3D_ZB_FALSE;
|
||||
float z_scale = zenable ? 2.0f : 0.0f;
|
||||
float z_offset = zenable ? -1.0f : 0.0f;
|
||||
@@ -3620,7 +3620,7 @@ void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d
|
||||
@@ -3684,7 +3684,7 @@ void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d
|
||||
unsigned int i;
|
||||
DWORD ttff;
|
||||
DWORD cop, aop, carg0, carg1, carg2, aarg0, aarg1, aarg2;
|
||||
@ -838,7 +839,7 @@ index 468aea9..948b793 100644
|
||||
const struct wined3d_d3d_info *d3d_info = context->d3d_info;
|
||||
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 03831b8..e922f86 100644
|
||||
index b1391e8..acc20a1 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -1121,6 +1121,36 @@ struct wined3d_timestamp_query
|
||||
@ -899,7 +900,7 @@ index 03831b8..e922f86 100644
|
||||
typedef void (*APPLYSTATEFUNC)(struct wined3d_context *ctx, const struct wined3d_state *state, DWORD state_id);
|
||||
|
||||
struct StateEntry
|
||||
@@ -1918,7 +1943,7 @@ struct wined3d_stream_state
|
||||
@@ -1927,7 +1952,7 @@ struct wined3d_stream_state
|
||||
struct wined3d_state
|
||||
{
|
||||
DWORD flags;
|
||||
@ -908,7 +909,7 @@ index 03831b8..e922f86 100644
|
||||
|
||||
struct wined3d_vertex_declaration *vertex_declaration;
|
||||
struct wined3d_stream_output stream_output[MAX_STREAM_OUT];
|
||||
@@ -2024,7 +2049,6 @@ struct wined3d_device
|
||||
@@ -2033,7 +2058,6 @@ struct wined3d_device
|
||||
struct wine_rb_tree samplers;
|
||||
|
||||
/* Render Target Support */
|
||||
@ -916,7 +917,7 @@ index 03831b8..e922f86 100644
|
||||
struct wined3d_surface *onscreen_depth_stencil;
|
||||
struct wined3d_rendertarget_view *auto_depth_stencil_view;
|
||||
|
||||
@@ -2528,9 +2552,8 @@ struct wined3d_stateblock
|
||||
@@ -2544,9 +2568,8 @@ struct wined3d_stateblock
|
||||
void stateblock_init_contained_states(struct wined3d_stateblock *stateblock) DECLSPEC_HIDDEN;
|
||||
|
||||
void state_cleanup(struct wined3d_state *state) DECLSPEC_HIDDEN;
|
||||
@ -928,7 +929,7 @@ index 03831b8..e922f86 100644
|
||||
void state_unbind_resources(struct wined3d_state *state) DECLSPEC_HIDDEN;
|
||||
|
||||
struct wined3d_cs_ops
|
||||
@@ -2543,7 +2566,6 @@ struct wined3d_cs
|
||||
@@ -2559,7 +2582,6 @@ struct wined3d_cs
|
||||
{
|
||||
const struct wined3d_cs_ops *ops;
|
||||
struct wined3d_device *device;
|
||||
@ -937,5 +938,5 @@ index 03831b8..e922f86 100644
|
||||
|
||||
size_t data_size;
|
||||
--
|
||||
2.3.3
|
||||
2.3.5
|
||||
|
||||
|
@ -1,16 +1,16 @@
|
||||
From 28c64ddb55487597d6542e81e47d27b08cb8351c Mon Sep 17 00:00:00 2001
|
||||
From b95d18600a2936f01d9a0f12782f81463dde3e6d Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Tue, 1 Oct 2013 14:31:56 +0200
|
||||
Subject: wined3d: Hackily introduce a multithreaded command stream
|
||||
|
||||
---
|
||||
dlls/wined3d/cs.c | 376 ++++++++++++++++++++++++++++++++++++-----
|
||||
dlls/wined3d/cs.c | 380 ++++++++++++++++++++++++++++++++++++-----
|
||||
dlls/wined3d/wined3d_main.c | 9 +
|
||||
dlls/wined3d/wined3d_private.h | 18 ++
|
||||
3 files changed, 365 insertions(+), 38 deletions(-)
|
||||
3 files changed, 368 insertions(+), 39 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 408e9b5..625012f 100644
|
||||
index 09bfee0..d40f307 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -24,8 +24,19 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d);
|
||||
@ -33,8 +33,8 @@ index 408e9b5..625012f 100644
|
||||
WINED3D_CS_OP_PRESENT,
|
||||
WINED3D_CS_OP_CLEAR,
|
||||
WINED3D_CS_OP_DRAW,
|
||||
@@ -51,6 +62,18 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_SET_CLIP_PLANE,
|
||||
@@ -52,6 +63,18 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_SET_COLOR_KEY,
|
||||
WINED3D_CS_OP_SET_MATERIAL,
|
||||
WINED3D_CS_OP_RESET_STATE,
|
||||
+ WINED3D_CS_OP_STOP,
|
||||
@ -52,7 +52,7 @@ index 408e9b5..625012f 100644
|
||||
};
|
||||
|
||||
struct wined3d_cs_present
|
||||
@@ -101,7 +124,7 @@ struct wined3d_cs_set_viewport
|
||||
@@ -102,7 +125,7 @@ struct wined3d_cs_set_viewport
|
||||
struct wined3d_cs_set_scissor_rect
|
||||
{
|
||||
enum wined3d_cs_op opcode;
|
||||
@ -61,7 +61,7 @@ index 408e9b5..625012f 100644
|
||||
};
|
||||
|
||||
struct wined3d_cs_set_rendertarget_view
|
||||
@@ -220,20 +243,20 @@ struct wined3d_cs_set_transform
|
||||
@@ -230,20 +253,20 @@ struct wined3d_cs_set_transform
|
||||
{
|
||||
enum wined3d_cs_op opcode;
|
||||
enum wined3d_transform_state state;
|
||||
@ -85,7 +85,7 @@ index 408e9b5..625012f 100644
|
||||
};
|
||||
|
||||
struct wined3d_cs_reset_state
|
||||
@@ -241,7 +264,134 @@ struct wined3d_cs_reset_state
|
||||
@@ -251,7 +274,134 @@ struct wined3d_cs_reset_state
|
||||
enum wined3d_cs_op opcode;
|
||||
};
|
||||
|
||||
@ -221,7 +221,7 @@ index 408e9b5..625012f 100644
|
||||
{
|
||||
const struct wined3d_cs_present *op = data;
|
||||
struct wined3d_swapchain *swapchain;
|
||||
@@ -251,6 +401,8 @@ static void wined3d_cs_exec_present(struct wined3d_cs *cs, const void *data)
|
||||
@@ -261,6 +411,8 @@ static void wined3d_cs_exec_present(struct wined3d_cs *cs, const void *data)
|
||||
|
||||
swapchain->swapchain_ops->swapchain_present(swapchain,
|
||||
op->src_rect, op->dst_rect, op->dirty_region, op->flags);
|
||||
@ -230,7 +230,7 @@ index 408e9b5..625012f 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *swapchain,
|
||||
@@ -271,7 +423,7 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
|
||||
@@ -281,7 +433,7 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -239,7 +239,7 @@ index 408e9b5..625012f 100644
|
||||
{
|
||||
const struct wined3d_cs_clear *op = data;
|
||||
struct wined3d_device *device;
|
||||
@@ -282,6 +434,8 @@ static void wined3d_cs_exec_clear(struct wined3d_cs *cs, const void *data)
|
||||
@@ -292,6 +444,8 @@ static void wined3d_cs_exec_clear(struct wined3d_cs *cs, const void *data)
|
||||
device_clear_render_targets(device, device->adapter->gl_info.limits.buffers,
|
||||
&cs->state.fb, op->rect_count, op->rects, &draw_rect, op->flags,
|
||||
op->color, op->depth, op->stencil);
|
||||
@ -248,7 +248,7 @@ index 408e9b5..625012f 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *rects,
|
||||
@@ -301,12 +455,14 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
@@ -311,12 +465,14 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -264,7 +264,7 @@ index 408e9b5..625012f 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_draw(struct wined3d_cs *cs, UINT start_idx, UINT index_count,
|
||||
@@ -325,12 +481,14 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, UINT start_idx, UINT index_coun
|
||||
@@ -335,12 +491,14 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, UINT start_idx, UINT index_coun
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -280,7 +280,7 @@ index 408e9b5..625012f 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query *predicate, BOOL value)
|
||||
@@ -345,12 +503,14 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query
|
||||
@@ -355,12 +513,14 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -296,7 +296,7 @@ index 408e9b5..625012f 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_viewport *viewport)
|
||||
@@ -364,12 +524,14 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
|
||||
@@ -374,12 +534,14 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -313,7 +313,7 @@ index 408e9b5..625012f 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
|
||||
@@ -378,17 +540,19 @@ void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
|
||||
@@ -388,17 +550,19 @@ void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
|
||||
|
||||
op = cs->ops->require_space(cs, sizeof(*op));
|
||||
op->opcode = WINED3D_CS_OP_SET_SCISSOR_RECT;
|
||||
@ -335,7 +335,7 @@ index 408e9b5..625012f 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int view_idx,
|
||||
@@ -404,7 +568,7 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
|
||||
@@ -414,7 +578,7 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -344,7 +344,7 @@ index 408e9b5..625012f 100644
|
||||
{
|
||||
const struct wined3d_cs_set_depth_stencil_view *op = data;
|
||||
struct wined3d_device *device = cs->device;
|
||||
@@ -442,6 +606,8 @@ static void wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
|
||||
@@ -452,6 +616,8 @@ static void wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
|
||||
}
|
||||
|
||||
device_invalidate_state(device, STATE_FRAMEBUFFER);
|
||||
@ -353,7 +353,7 @@ index 408e9b5..625012f 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3d_rendertarget_view *view)
|
||||
@@ -455,12 +621,14 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3
|
||||
@@ -465,12 +631,14 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -369,7 +369,7 @@ index 408e9b5..625012f 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3d_vertex_declaration *declaration)
|
||||
@@ -474,7 +642,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
|
||||
@@ -484,7 +652,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -378,7 +378,7 @@ index 408e9b5..625012f 100644
|
||||
{
|
||||
const struct wined3d_cs_set_stream_source *op = data;
|
||||
struct wined3d_stream_state *stream;
|
||||
@@ -492,6 +660,8 @@ static void wined3d_cs_exec_set_stream_source(struct wined3d_cs *cs, const void
|
||||
@@ -502,6 +670,8 @@ static void wined3d_cs_exec_set_stream_source(struct wined3d_cs *cs, const void
|
||||
InterlockedDecrement(&prev->resource.bind_count);
|
||||
|
||||
device_invalidate_state(cs->device, STATE_STREAMSRC);
|
||||
@ -387,7 +387,7 @@ index 408e9b5..625012f 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -509,7 +679,7 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -519,7 +689,7 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -396,7 +396,7 @@ index 408e9b5..625012f 100644
|
||||
{
|
||||
const struct wined3d_cs_set_stream_source_freq *op = data;
|
||||
struct wined3d_stream_state *stream;
|
||||
@@ -519,6 +689,8 @@ static void wined3d_cs_exec_set_stream_source_freq(struct wined3d_cs *cs, const
|
||||
@@ -529,6 +699,8 @@ static void wined3d_cs_exec_set_stream_source_freq(struct wined3d_cs *cs, const
|
||||
stream->flags = op->flags;
|
||||
|
||||
device_invalidate_state(cs->device, STATE_STREAMSRC);
|
||||
@ -405,7 +405,7 @@ index 408e9b5..625012f 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_idx, UINT frequency, UINT flags)
|
||||
@@ -534,7 +706,7 @@ void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_i
|
||||
@@ -544,7 +716,7 @@ void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_i
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -414,7 +414,7 @@ index 408e9b5..625012f 100644
|
||||
{
|
||||
const struct wined3d_cs_set_stream_output *op = data;
|
||||
struct wined3d_stream_output *stream;
|
||||
@@ -549,6 +721,8 @@ static void wined3d_cs_exec_set_stream_output(struct wined3d_cs *cs, const void
|
||||
@@ -559,6 +731,8 @@ static void wined3d_cs_exec_set_stream_output(struct wined3d_cs *cs, const void
|
||||
InterlockedIncrement(&op->buffer->resource.bind_count);
|
||||
if (prev)
|
||||
InterlockedDecrement(&prev->resource.bind_count);
|
||||
@ -423,7 +423,7 @@ index 408e9b5..625012f 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -565,7 +739,7 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -575,7 +749,7 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -432,7 +432,7 @@ index 408e9b5..625012f 100644
|
||||
{
|
||||
const struct wined3d_cs_set_index_buffer *op = data;
|
||||
struct wined3d_buffer *prev;
|
||||
@@ -580,6 +754,8 @@ static void wined3d_cs_exec_set_index_buffer(struct wined3d_cs *cs, const void *
|
||||
@@ -590,6 +764,8 @@ static void wined3d_cs_exec_set_index_buffer(struct wined3d_cs *cs, const void *
|
||||
InterlockedDecrement(&prev->resource.bind_count);
|
||||
|
||||
device_invalidate_state(cs->device, STATE_INDEXBUFFER);
|
||||
@ -441,7 +441,7 @@ index 408e9b5..625012f 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buffer *buffer,
|
||||
@@ -595,7 +771,7 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
|
||||
@@ -605,7 +781,7 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -450,7 +450,7 @@ index 408e9b5..625012f 100644
|
||||
{
|
||||
const struct wined3d_cs_set_constant_buffer *op = data;
|
||||
struct wined3d_buffer *prev;
|
||||
@@ -609,6 +785,7 @@ static void wined3d_cs_exec_set_constant_buffer(struct wined3d_cs *cs, const voi
|
||||
@@ -619,6 +795,7 @@ static void wined3d_cs_exec_set_constant_buffer(struct wined3d_cs *cs, const voi
|
||||
InterlockedDecrement(&prev->resource.bind_count);
|
||||
|
||||
device_invalidate_state(cs->device, STATE_CONSTANT_BUFFER(op->type));
|
||||
@ -458,7 +458,7 @@ index 408e9b5..625012f 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_shader_type type,
|
||||
@@ -625,7 +802,7 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
|
||||
@@ -635,7 +812,7 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -467,7 +467,7 @@ index 408e9b5..625012f 100644
|
||||
{
|
||||
const struct wined3d_d3d_info *d3d_info = &cs->device->adapter->d3d_info;
|
||||
const struct wined3d_cs_set_texture *op = data;
|
||||
@@ -685,6 +862,8 @@ static void wined3d_cs_exec_set_texture(struct wined3d_cs *cs, const void *data)
|
||||
@@ -695,6 +872,8 @@ static void wined3d_cs_exec_set_texture(struct wined3d_cs *cs, const void *data)
|
||||
}
|
||||
|
||||
device_invalidate_state(cs->device, STATE_SAMPLER(op->stage));
|
||||
@ -476,7 +476,7 @@ index 408e9b5..625012f 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined3d_texture *texture)
|
||||
@@ -699,12 +878,14 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
|
||||
@@ -709,12 +888,14 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -492,7 +492,7 @@ index 408e9b5..625012f 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3d_shader_type type,
|
||||
@@ -721,12 +902,14 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
|
||||
@@ -731,12 +912,14 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -508,7 +508,7 @@ index 408e9b5..625012f 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type type,
|
||||
@@ -743,13 +926,15 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
@@ -753,13 +936,15 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -525,7 +525,7 @@ index 408e9b5..625012f 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type type, struct wined3d_shader *shader)
|
||||
@@ -764,12 +949,14 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
@@ -774,12 +959,14 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -541,7 +541,7 @@ index 408e9b5..625012f 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render_state state, DWORD value)
|
||||
@@ -784,12 +971,14 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
|
||||
@@ -794,12 +981,14 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -557,7 +557,7 @@ index 408e9b5..625012f 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
|
||||
@@ -806,12 +995,14 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
|
||||
@@ -816,12 +1005,14 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -573,7 +573,7 @@ index 408e9b5..625012f 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
|
||||
@@ -828,13 +1019,15 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
|
||||
@@ -838,13 +1029,15 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -591,7 +591,7 @@ index 408e9b5..625012f 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform_state state,
|
||||
@@ -845,17 +1038,19 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
|
||||
@@ -855,17 +1048,19 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
|
||||
op = cs->ops->require_space(cs, sizeof(*op));
|
||||
op->opcode = WINED3D_CS_OP_SET_TRANSFORM;
|
||||
op->state = state;
|
||||
@ -614,7 +614,7 @@ index 408e9b5..625012f 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const struct wined3d_vec4 *plane)
|
||||
@@ -865,17 +1060,19 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
|
||||
@@ -875,12 +1070,12 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
|
||||
op = cs->ops->require_space(cs, sizeof(*op));
|
||||
op->opcode = WINED3D_CS_OP_SET_CLIP_PLANE;
|
||||
op->plane_idx = plane_idx;
|
||||
@ -624,6 +624,24 @@ index 408e9b5..625012f 100644
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
-static void wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *data)
|
||||
+static UINT wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
const struct wined3d_cs_set_color_key *op = data;
|
||||
struct wined3d_texture *texture = op->texture;
|
||||
@@ -934,6 +1129,8 @@ static void wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *dat
|
||||
|
||||
if (texture->resource.bind_count && op->flags & WINED3D_CKEY_SRC_BLT)
|
||||
device_invalidate_state(cs->device, STATE_RENDER(WINED3D_RS_COLORKEYENABLE));
|
||||
+
|
||||
+ return sizeof(*op);
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture *texture,
|
||||
@@ -956,12 +1153,14 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
-static void wined3d_cs_exec_set_material(struct wined3d_cs *cs, const void *data)
|
||||
+static UINT wined3d_cs_exec_set_material(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
@ -637,7 +655,7 @@ index 408e9b5..625012f 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_material *material)
|
||||
@@ -884,12 +1081,12 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
|
||||
@@ -970,12 +1169,12 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
|
||||
|
||||
op = cs->ops->require_space(cs, sizeof(*op));
|
||||
op->opcode = WINED3D_CS_OP_SET_MATERIAL;
|
||||
@ -652,7 +670,7 @@ index 408e9b5..625012f 100644
|
||||
{
|
||||
struct wined3d_adapter *adapter = cs->device->adapter;
|
||||
HRESULT hr;
|
||||
@@ -899,6 +1096,8 @@ static void wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data)
|
||||
@@ -985,6 +1184,8 @@ static void wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data)
|
||||
if (FAILED(hr = state_init(&cs->state, &adapter->gl_info, &adapter->d3d_info,
|
||||
WINED3D_STATE_NO_REF | WINED3D_STATE_INIT_DEFAULT)))
|
||||
ERR("Failed to initialize CS state, hr %#x.\n", hr);
|
||||
@ -661,7 +679,7 @@ index 408e9b5..625012f 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
@@ -911,8 +1110,9 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
@@ -997,8 +1198,9 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -672,7 +690,7 @@ index 408e9b5..625012f 100644
|
||||
/* WINED3D_CS_OP_PRESENT */ wined3d_cs_exec_present,
|
||||
/* WINED3D_CS_OP_CLEAR */ wined3d_cs_exec_clear,
|
||||
/* WINED3D_CS_OP_DRAW */ wined3d_cs_exec_draw,
|
||||
@@ -970,6 +1170,58 @@ static const struct wined3d_cs_ops wined3d_cs_st_ops =
|
||||
@@ -1057,6 +1259,58 @@ static const struct wined3d_cs_ops wined3d_cs_st_ops =
|
||||
wined3d_cs_st_submit,
|
||||
};
|
||||
|
||||
@ -731,7 +749,7 @@ index 408e9b5..625012f 100644
|
||||
struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
|
||||
@@ -995,12 +1247,60 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
@@ -1082,12 +1336,60 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -820,7 +838,7 @@ index 08021a2..088e59a 100644
|
||||
|
||||
if (appkey) RegCloseKey( appkey );
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 9a9097e..a32634d 100644
|
||||
index 34a3093..c59d523 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -278,6 +278,7 @@ struct wined3d_settings
|
||||
@ -831,7 +849,7 @@ index 9a9097e..a32634d 100644
|
||||
};
|
||||
|
||||
extern struct wined3d_settings wined3d_settings DECLSPEC_HIDDEN;
|
||||
@@ -2547,6 +2548,18 @@ HRESULT state_init(struct wined3d_state *state, const struct wined3d_gl_info *gl
|
||||
@@ -2572,6 +2573,18 @@ HRESULT state_init(struct wined3d_state *state, const struct wined3d_gl_info *gl
|
||||
const struct wined3d_d3d_info *d3d_info, DWORD flags) DECLSPEC_HIDDEN;
|
||||
void state_unbind_resources(struct wined3d_state *state) DECLSPEC_HIDDEN;
|
||||
|
||||
@ -850,7 +868,7 @@ index 9a9097e..a32634d 100644
|
||||
struct wined3d_cs_ops
|
||||
{
|
||||
void *(*require_space)(struct wined3d_cs *cs, size_t size);
|
||||
@@ -2558,9 +2571,14 @@ struct wined3d_cs
|
||||
@@ -2583,9 +2596,14 @@ struct wined3d_cs
|
||||
const struct wined3d_cs_ops *ops;
|
||||
struct wined3d_device *device;
|
||||
struct wined3d_state state;
|
||||
@ -866,5 +884,5 @@ index 9a9097e..a32634d 100644
|
||||
|
||||
struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device) DECLSPEC_HIDDEN;
|
||||
--
|
||||
2.2.1
|
||||
2.3.5
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 0f3dbbb7464b63565408e3d2914fcada665785c9 Mon Sep 17 00:00:00 2001
|
||||
From 35f36ec3b2bf7fa8bdfabd7d698b118ba2030ccf Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Tue, 1 Oct 2013 15:30:26 +0200
|
||||
Subject: wined3d: Give the cs its own state
|
||||
@ -10,18 +10,18 @@ Subject: wined3d: Give the cs its own state
|
||||
3 files changed, 99 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index b68f252..3b83616 100644
|
||||
index a8327d1..1b466c3 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -62,6 +62,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_SET_CLIP_PLANE,
|
||||
@@ -63,6 +63,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_SET_COLOR_KEY,
|
||||
WINED3D_CS_OP_SET_MATERIAL,
|
||||
WINED3D_CS_OP_RESET_STATE,
|
||||
+ WINED3D_CS_OP_STATEBLOCK,
|
||||
WINED3D_CS_OP_STOP,
|
||||
};
|
||||
|
||||
@@ -268,6 +269,13 @@ struct wined3d_cs_reset_state
|
||||
@@ -278,6 +279,13 @@ struct wined3d_cs_reset_state
|
||||
enum wined3d_cs_op opcode;
|
||||
};
|
||||
|
||||
@ -35,7 +35,7 @@ index b68f252..3b83616 100644
|
||||
/* FIXME: The list synchronization probably isn't particularly fast. */
|
||||
static void wined3d_cs_list_enqueue(struct wined3d_cs_list *list, struct wined3d_cs_block *block)
|
||||
{
|
||||
@@ -451,7 +459,7 @@ static UINT wined3d_cs_exec_clear(struct wined3d_cs *cs, const void *data)
|
||||
@@ -461,7 +469,7 @@ static UINT wined3d_cs_exec_clear(struct wined3d_cs *cs, const void *data)
|
||||
unsigned int extra_rects = op->rect_count ? op->rect_count - 1 : 0;
|
||||
|
||||
device = cs->device;
|
||||
@ -44,7 +44,7 @@ index b68f252..3b83616 100644
|
||||
device_clear_render_targets(device, device->adapter->gl_info.limits.buffers,
|
||||
&cs->state.fb, op->rect_count, op->rect_count ? op->rects : NULL, &draw_rect, op->flags,
|
||||
&op->color, op->depth, op->stencil);
|
||||
@@ -482,7 +490,7 @@ static UINT wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
|
||||
@@ -492,7 +500,7 @@ static UINT wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
const struct wined3d_cs_draw *op = data;
|
||||
|
||||
@ -53,7 +53,7 @@ index b68f252..3b83616 100644
|
||||
op->start_instance, op->instance_count, op->indexed);
|
||||
|
||||
return sizeof(*op);
|
||||
@@ -897,6 +905,72 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
|
||||
@@ -907,6 +915,72 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
|
||||
op->opcode = WINED3D_CS_OP_SET_TEXTURE;
|
||||
op->stage = stage;
|
||||
op->texture = texture;
|
||||
@ -126,15 +126,15 @@ index b68f252..3b83616 100644
|
||||
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
@@ -1161,6 +1235,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_SET_CLIP_PLANE */ wined3d_cs_exec_set_clip_plane,
|
||||
@@ -1250,6 +1324,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_SET_COLOR_KEY */ wined3d_cs_exec_set_color_key,
|
||||
/* WINED3D_CS_OP_SET_MATERIAL */ wined3d_cs_exec_set_material,
|
||||
/* WINED3D_CS_OP_RESET_STATE */ wined3d_cs_exec_reset_state,
|
||||
+ /* WINED3D_CS_OP_STATEBLOCK */ wined3d_cs_exec_transfer_stateblock,
|
||||
};
|
||||
|
||||
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
|
||||
@@ -1250,7 +1325,7 @@ done:
|
||||
@@ -1339,7 +1414,7 @@ done:
|
||||
struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
|
||||
@ -143,7 +143,7 @@ index b68f252..3b83616 100644
|
||||
|
||||
if (!(cs = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*cs))))
|
||||
return NULL;
|
||||
@@ -1258,8 +1333,7 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
@@ -1347,8 +1422,7 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
if (FAILED(state_init(&cs->state, gl_info, &device->adapter->d3d_info,
|
||||
WINED3D_STATE_NO_REF | WINED3D_STATE_INIT_DEFAULT)))
|
||||
{
|
||||
@ -153,7 +153,7 @@ index b68f252..3b83616 100644
|
||||
}
|
||||
|
||||
cs->ops = &wined3d_cs_st_ops;
|
||||
@@ -1268,16 +1342,13 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
@@ -1357,16 +1431,13 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
cs->data_size = WINED3D_INITIAL_CS_SIZE;
|
||||
if (!(cs->data = HeapAlloc(GetProcessHeap(), 0, cs->data_size)))
|
||||
{
|
||||
@ -172,7 +172,7 @@ index b68f252..3b83616 100644
|
||||
}
|
||||
|
||||
if (wined3d_settings.cs_multithreaded)
|
||||
@@ -1290,15 +1361,22 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
@@ -1379,15 +1450,22 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
if (!(cs->thread = CreateThread(NULL, 0, wined3d_cs_run, cs, 0, NULL)))
|
||||
{
|
||||
ERR("Failed to create wined3d command stream thread.\n");
|
||||
@ -201,7 +201,7 @@ index b68f252..3b83616 100644
|
||||
|
||||
void wined3d_cs_destroy(struct wined3d_cs *cs)
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 419148e..1c2f9de 100644
|
||||
index 3bd45da..b936039 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -3409,6 +3409,7 @@ HRESULT CDECL wined3d_device_draw_primitive(struct wined3d_device *device, UINT
|
||||
@ -212,7 +212,7 @@ index 419148e..1c2f9de 100644
|
||||
wined3d_cs_emit_draw(device->cs, start_vertex, vertex_count, 0, 0, FALSE);
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -3443,6 +3444,7 @@ HRESULT CDECL wined3d_device_draw_indexed_primitive(struct wined3d_device *devic
|
||||
@@ -3452,6 +3453,7 @@ HRESULT CDECL wined3d_device_draw_indexed_primitive(struct wined3d_device *devic
|
||||
device_invalidate_state(device, STATE_BASEVERTEXINDEX);
|
||||
}
|
||||
|
||||
@ -220,7 +220,7 @@ index 419148e..1c2f9de 100644
|
||||
wined3d_cs_emit_draw(device->cs, start_idx, index_count, 0, 0, TRUE);
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -3454,6 +3456,7 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device
|
||||
@@ -3463,6 +3465,7 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device
|
||||
TRACE("device %p, start_idx %u, index_count %u, start_instance %u, instance_count %u.\n",
|
||||
device, start_idx, index_count, start_instance, instance_count);
|
||||
|
||||
@ -229,10 +229,10 @@ index 419148e..1c2f9de 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index d8c6d63..8fcfa12 100644
|
||||
index 1f95a50..d8b24a5 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2561,7 +2561,7 @@ struct wined3d_cs_block
|
||||
@@ -2584,7 +2584,7 @@ struct wined3d_cs_block
|
||||
{
|
||||
struct list entry;
|
||||
UINT pos;
|
||||
@ -241,8 +241,8 @@ index d8c6d63..8fcfa12 100644
|
||||
};
|
||||
|
||||
struct wined3d_cs_ops
|
||||
@@ -2601,6 +2601,8 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx,
|
||||
const struct wined3d_vec4 *plane) DECLSPEC_HIDDEN;
|
||||
@@ -2626,6 +2626,8 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
|
||||
WORD flags, const struct wined3d_color_key *color_key) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_shader_type type,
|
||||
UINT cb_idx, struct wined3d_buffer *buffer) DECLSPEC_HIDDEN;
|
||||
+void wined3d_cs_emit_transfer_stateblock(struct wined3d_cs *cs,
|
||||
@ -251,5 +251,5 @@ index d8c6d63..8fcfa12 100644
|
||||
struct wined3d_rendertarget_view *view) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buffer *buffer,
|
||||
--
|
||||
2.3.2
|
||||
2.3.5
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 79d2e9e1c883ecb8c755fd1eafec7c1be1f85e71 Mon Sep 17 00:00:00 2001
|
||||
From bb19770fcc41425eb43a0aebe3b9611e7d170b23 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Wed, 10 Apr 2013 17:16:02 +0200
|
||||
Subject: wined3d: Send light updates through the command stream
|
||||
@ -10,18 +10,18 @@ Subject: wined3d: Send light updates through the command stream
|
||||
3 files changed, 174 insertions(+), 65 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 8dc5ce8..1660380 100644
|
||||
index cf5c5b4..7ca37a9 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -62,7 +62,6 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_SET_CLIP_PLANE,
|
||||
@@ -63,7 +63,6 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_SET_COLOR_KEY,
|
||||
WINED3D_CS_OP_SET_MATERIAL,
|
||||
WINED3D_CS_OP_RESET_STATE,
|
||||
- WINED3D_CS_OP_STATEBLOCK,
|
||||
WINED3D_CS_OP_SET_VS_CONSTS_F,
|
||||
WINED3D_CS_OP_SET_VS_CONSTS_B,
|
||||
WINED3D_CS_OP_SET_VS_CONSTS_I,
|
||||
@@ -72,6 +71,8 @@ enum wined3d_cs_op
|
||||
@@ -73,6 +72,8 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_GLFINISH,
|
||||
WINED3D_CS_OP_SET_BASE_VERTEX_INDEX,
|
||||
WINED3D_CS_OP_SET_PRIMITIVE_TYPE,
|
||||
@ -30,7 +30,7 @@ index 8dc5ce8..1660380 100644
|
||||
WINED3D_CS_OP_STOP,
|
||||
};
|
||||
|
||||
@@ -278,12 +279,6 @@ struct wined3d_cs_reset_state
|
||||
@@ -288,12 +289,6 @@ struct wined3d_cs_reset_state
|
||||
enum wined3d_cs_op opcode;
|
||||
};
|
||||
|
||||
@ -43,7 +43,7 @@ index 8dc5ce8..1660380 100644
|
||||
struct wined3d_cs_set_consts_f
|
||||
{
|
||||
enum wined3d_cs_op opcode;
|
||||
@@ -322,6 +317,19 @@ struct wined3d_cs_set_primitive_type
|
||||
@@ -332,6 +327,19 @@ struct wined3d_cs_set_primitive_type
|
||||
GLenum gl_primitive_type;
|
||||
};
|
||||
|
||||
@ -63,7 +63,7 @@ index 8dc5ce8..1660380 100644
|
||||
/* FIXME: The list synchronization probably isn't particularly fast. */
|
||||
static void wined3d_cs_list_enqueue(struct wined3d_cs_list *list, struct wined3d_cs_block *block)
|
||||
{
|
||||
@@ -971,35 +979,6 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
|
||||
@@ -981,35 +989,6 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -99,7 +99,7 @@ index 8dc5ce8..1660380 100644
|
||||
static UINT wined3d_cs_exec_set_shader_resource_view(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
const struct wined3d_cs_set_shader_resource_view *op = data;
|
||||
@@ -1474,6 +1453,152 @@ void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs, GLenum primitive_
|
||||
@@ -1562,6 +1541,152 @@ void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs, GLenum primitive_
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -252,15 +252,15 @@ index 8dc5ce8..1660380 100644
|
||||
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_FENCE */ wined3d_cs_exec_fence,
|
||||
@@ -1502,7 +1627,6 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_SET_CLIP_PLANE */ wined3d_cs_exec_set_clip_plane,
|
||||
@@ -1591,7 +1716,6 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_SET_COLOR_KEY */ wined3d_cs_exec_set_color_key,
|
||||
/* WINED3D_CS_OP_SET_MATERIAL */ wined3d_cs_exec_set_material,
|
||||
/* WINED3D_CS_OP_RESET_STATE */ wined3d_cs_exec_reset_state,
|
||||
- /* WINED3D_CS_OP_STATEBLOCK */ wined3d_cs_exec_transfer_stateblock,
|
||||
/* WINED3D_CS_OP_SET_VS_CONSTS_F */ wined3d_cs_exec_set_vs_consts_f,
|
||||
/* WINED3D_CS_OP_SET_VS_CONSTS_B */ wined3d_cs_exec_set_vs_consts_b,
|
||||
/* WINED3D_CS_OP_SET_VS_CONSTS_I */ wined3d_cs_exec_set_vs_consts_i,
|
||||
@@ -1512,6 +1636,8 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -1601,6 +1725,8 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_GLFINISH */ wined3d_cs_exec_glfinish,
|
||||
/* WINED3D_CS_OP_SET_BASE_VERTEX_INDEX */ wined3d_cs_exec_set_base_vertex_index,
|
||||
/* WINED3D_CS_OP_SET_PRIMITIVE_TYPE */ wined3d_cs_exec_set_primitive_type,
|
||||
@ -270,7 +270,7 @@ index 8dc5ce8..1660380 100644
|
||||
|
||||
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 403a2f4..1629ee2 100644
|
||||
index 6e11cf8..a36d101 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -1466,14 +1466,6 @@ HRESULT CDECL wined3d_device_set_light(struct wined3d_device *device,
|
||||
@ -339,7 +339,7 @@ index 403a2f4..1629ee2 100644
|
||||
wined3d_cs_emit_draw(device->cs, start_vertex, vertex_count, 0, 0, FALSE);
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -3427,8 +3411,6 @@ HRESULT CDECL wined3d_device_draw_indexed_primitive(struct wined3d_device *devic
|
||||
@@ -3436,8 +3420,6 @@ HRESULT CDECL wined3d_device_draw_indexed_primitive(struct wined3d_device *devic
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@ -348,7 +348,7 @@ index 403a2f4..1629ee2 100644
|
||||
wined3d_cs_emit_draw(device->cs, start_idx, index_count, 0, 0, TRUE);
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -3440,7 +3422,6 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device
|
||||
@@ -3449,7 +3431,6 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device
|
||||
TRACE("device %p, start_idx %u, index_count %u, start_instance %u, instance_count %u.\n",
|
||||
device, start_idx, index_count, start_instance, instance_count);
|
||||
|
||||
@ -357,10 +357,10 @@ index 403a2f4..1629ee2 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 1447a60..d30f19f 100644
|
||||
index cc58a84..eedd4ff 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2559,7 +2559,9 @@ struct wined3d_cs_block
|
||||
@@ -2582,7 +2582,9 @@ struct wined3d_cs_block
|
||||
{
|
||||
struct list entry;
|
||||
UINT pos;
|
||||
@ -371,8 +371,8 @@ index 1447a60..d30f19f 100644
|
||||
};
|
||||
|
||||
struct wined3d_cs_ops
|
||||
@@ -2602,8 +2604,6 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx,
|
||||
const struct wined3d_vec4 *plane) DECLSPEC_HIDDEN;
|
||||
@@ -2627,8 +2629,6 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
|
||||
WORD flags, const struct wined3d_color_key *color_key) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_shader_type type,
|
||||
UINT cb_idx, struct wined3d_buffer *buffer) DECLSPEC_HIDDEN;
|
||||
-void wined3d_cs_emit_transfer_stateblock(struct wined3d_cs *cs,
|
||||
@ -380,7 +380,7 @@ index 1447a60..d30f19f 100644
|
||||
void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs,
|
||||
struct wined3d_rendertarget_view *view) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buffer *buffer,
|
||||
@@ -2649,6 +2649,8 @@ void wined3d_cs_emit_set_base_vertex_index(struct wined3d_cs *cs,
|
||||
@@ -2674,6 +2674,8 @@ void wined3d_cs_emit_set_base_vertex_index(struct wined3d_cs *cs,
|
||||
UINT base_vertex_index) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs,
|
||||
GLenum primitive_type) DECLSPEC_HIDDEN;
|
||||
@ -390,5 +390,5 @@ index 1447a60..d30f19f 100644
|
||||
/* Direct3D terminology with little modifications. We do not have an issued state
|
||||
* because only the driver knows about it, but we have a created state because d3d
|
||||
--
|
||||
2.3.2
|
||||
2.3.5
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 012ceb18e78f44c3bb3ba11d65a5163c93713d5d Mon Sep 17 00:00:00 2001
|
||||
From c9b84afff62ee9c34a26124f43f896085fb9f6d2 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Mon, 29 Apr 2013 18:49:53 +0200
|
||||
Subject: wined3d: Send blits through the command stream.
|
||||
@ -7,15 +7,15 @@ This needs more work. This patch breaks error handling, and the split
|
||||
between surface_blt and surface_blt_ugly isn't particularly nice.
|
||||
---
|
||||
dlls/wined3d/cs.c | 50 +++++++
|
||||
dlls/wined3d/surface.c | 307 ++++++++++++++++++++++-------------------
|
||||
dlls/wined3d/surface.c | 309 ++++++++++++++++++++++-------------------
|
||||
dlls/wined3d/wined3d_private.h | 8 ++
|
||||
3 files changed, 226 insertions(+), 139 deletions(-)
|
||||
3 files changed, 227 insertions(+), 140 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 17e6921..86fab74 100644
|
||||
index 150d81f..340cdee 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -73,6 +73,7 @@ enum wined3d_cs_op
|
||||
@@ -74,6 +74,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_SET_PRIMITIVE_TYPE,
|
||||
WINED3D_CS_OP_SET_LIGHT,
|
||||
WINED3D_CS_OP_SET_LIGHT_ENABLE,
|
||||
@ -23,7 +23,7 @@ index 17e6921..86fab74 100644
|
||||
WINED3D_CS_OP_STOP,
|
||||
};
|
||||
|
||||
@@ -330,6 +331,18 @@ struct wined3d_cs_set_light_enable
|
||||
@@ -340,6 +341,18 @@ struct wined3d_cs_set_light_enable
|
||||
BOOL enable;
|
||||
};
|
||||
|
||||
@ -42,7 +42,7 @@ index 17e6921..86fab74 100644
|
||||
/* FIXME: The list synchronization probably isn't particularly fast. */
|
||||
static void wined3d_cs_list_enqueue(struct wined3d_cs_list *list, struct wined3d_cs_block *block)
|
||||
{
|
||||
@@ -1396,6 +1409,9 @@ static UINT wined3d_cs_exec_glfinish(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1484,6 +1497,9 @@ static UINT wined3d_cs_exec_glfinish(struct wined3d_cs *cs, const void *data)
|
||||
struct wined3d_device *device = cs->device;
|
||||
struct wined3d_context *context;
|
||||
|
||||
@ -52,7 +52,7 @@ index 17e6921..86fab74 100644
|
||||
context = context_acquire(device, NULL);
|
||||
context->gl_info->gl_ops.gl.p_glFinish();
|
||||
context_release(context);
|
||||
@@ -1607,6 +1623,38 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, UINT idx, BOOL enab
|
||||
@@ -1695,6 +1711,38 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, UINT idx, BOOL enab
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -91,7 +91,7 @@ index 17e6921..86fab74 100644
|
||||
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_FENCE */ wined3d_cs_exec_fence,
|
||||
@@ -1646,6 +1694,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -1735,6 +1783,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_SET_PRIMITIVE_TYPE */ wined3d_cs_exec_set_primitive_type,
|
||||
/* WINED3D_CS_OP_SET_LIGHT */ wined3d_cs_exec_set_light,
|
||||
/* WINED3D_CS_OP_SET_LIGHT_ENABLE */ wined3d_cs_exec_set_light_enable,
|
||||
@ -99,7 +99,7 @@ index 17e6921..86fab74 100644
|
||||
};
|
||||
|
||||
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
|
||||
@@ -1720,6 +1769,7 @@ static DWORD WINAPI wined3d_cs_run(void *thread_param)
|
||||
@@ -1809,6 +1858,7 @@ static DWORD WINAPI wined3d_cs_run(void *thread_param)
|
||||
|
||||
TRACE("Started.\n");
|
||||
|
||||
@ -108,10 +108,10 @@ index 17e6921..86fab74 100644
|
||||
{
|
||||
struct wined3d_cs_block *block;
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 3cd4ab1..594562a 100644
|
||||
index 3905965..9b163b5 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -4990,14 +4990,13 @@ const struct blit_shader cpu_blit = {
|
||||
@@ -5001,14 +5001,13 @@ const struct blit_shader cpu_blit = {
|
||||
cpu_blit_depth_fill,
|
||||
};
|
||||
|
||||
@ -128,7 +128,7 @@ index 3cd4ab1..594562a 100644
|
||||
BOOL scale, convert;
|
||||
|
||||
static const DWORD simple_blit = WINEDDBLT_ASYNC
|
||||
@@ -5006,111 +5005,6 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
@@ -5019,111 +5018,6 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
| WINEDDBLT_DEPTHFILL
|
||||
| WINEDDBLT_DONOTWAIT;
|
||||
|
||||
@ -240,7 +240,7 @@ index 3cd4ab1..594562a 100644
|
||||
if (!device->d3d_initialized)
|
||||
{
|
||||
WARN("D3D not initialized, using fallback.\n");
|
||||
@@ -5153,8 +5047,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
@@ -5166,8 +5060,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
}
|
||||
|
||||
scale = src_surface
|
||||
@ -251,7 +251,7 @@ index 3cd4ab1..594562a 100644
|
||||
convert = src_surface && src_surface->resource.format->id != dst_surface->resource.format->id;
|
||||
|
||||
dst_ds_flags = dst_surface->resource.format->flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL);
|
||||
@@ -5172,22 +5066,16 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
@@ -5185,22 +5079,16 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
TRACE("Depth fill.\n");
|
||||
|
||||
if (!surface_convert_depth_to_float(dst_surface, fx->u5.dwFillDepth, &depth))
|
||||
@ -279,7 +279,7 @@ index 3cd4ab1..594562a 100644
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -5216,8 +5104,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
@@ -5229,8 +5117,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
palette, fx->u5.dwFillColor, &color))
|
||||
goto fallback;
|
||||
|
||||
@ -290,7 +290,7 @@ index 3cd4ab1..594562a 100644
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -5233,9 +5121,9 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
@@ -5258,9 +5146,9 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
TRACE("Not doing upload because of format conversion.\n");
|
||||
else
|
||||
{
|
||||
@ -302,7 +302,7 @@ index 3cd4ab1..594562a 100644
|
||||
{
|
||||
if (!wined3d_resource_is_offscreen(&dst_surface->container->resource))
|
||||
{
|
||||
@@ -5244,7 +5132,7 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
@@ -5269,7 +5157,7 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
dst_surface->container->resource.draw_binding);
|
||||
context_release(context);
|
||||
}
|
||||
@ -311,7 +311,7 @@ index 3cd4ab1..594562a 100644
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5269,51 +5157,192 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
@@ -5293,52 +5181,193 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
wined3d_swapchain_present(dst_swapchain, NULL, NULL, dst_swapchain->win_handle, NULL, 0);
|
||||
dst_swapchain->desc.swap_effect = swap_effect;
|
||||
|
||||
@ -319,7 +319,7 @@ index 3cd4ab1..594562a 100644
|
||||
+ return;
|
||||
}
|
||||
|
||||
if (fbo_blit_supported(&device->adapter->gl_info, WINED3D_BLIT_OP_COLOR_BLIT,
|
||||
if (fbo_blit_supported(&device->adapter->gl_info, blit_op,
|
||||
- &src_rect, src_surface->resource.usage, src_surface->resource.pool, src_surface->resource.format,
|
||||
- &dst_rect, dst_surface->resource.usage, dst_surface->resource.pool, dst_surface->resource.format))
|
||||
+ src_rect, src_surface->resource.usage, src_surface->resource.pool, src_surface->resource.format,
|
||||
@ -343,7 +343,7 @@ index 3cd4ab1..594562a 100644
|
||||
+ return;
|
||||
}
|
||||
|
||||
if (arbfp_blit.blit_supported(&device->adapter->gl_info, WINED3D_BLIT_OP_COLOR_BLIT,
|
||||
if (arbfp_blit.blit_supported(&device->adapter->gl_info, &device->adapter->d3d_info, blit_op,
|
||||
- &src_rect, src_surface->resource.usage, src_surface->resource.pool, src_surface->resource.format,
|
||||
- &dst_rect, dst_surface->resource.usage, dst_surface->resource.pool, dst_surface->resource.format))
|
||||
+ src_rect, src_surface->resource.usage, src_surface->resource.pool, src_surface->resource.format,
|
||||
@ -351,9 +351,11 @@ index 3cd4ab1..594562a 100644
|
||||
{
|
||||
TRACE("Using arbfp blit.\n");
|
||||
|
||||
- if (SUCCEEDED(arbfp_blit_surface(device, filter, src_surface, &src_rect, dst_surface, &dst_rect)))
|
||||
- if (SUCCEEDED(arbfp_blit_surface(device, filter, src_surface, &src_rect,
|
||||
- dst_surface, &dst_rect, color_key)))
|
||||
- return WINED3D_OK;
|
||||
+ if (SUCCEEDED(arbfp_blit_surface(device, filter, src_surface, src_rect, dst_surface, dst_rect)))
|
||||
+ if (SUCCEEDED(arbfp_blit_surface(device, filter, src_surface, src_rect,
|
||||
+ dst_surface, dst_rect, color_key)))
|
||||
+ return;
|
||||
}
|
||||
}
|
||||
@ -518,10 +520,10 @@ index 3cd4ab1..594562a 100644
|
||||
|
||||
static const struct wined3d_resource_ops surface_resource_ops =
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index ebbc6e8..584fcf3 100644
|
||||
index 6870e07..d4dd160 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2434,6 +2434,9 @@ void wined3d_surface_destroy(struct wined3d_surface *surface) DECLSPEC_HIDDEN;
|
||||
@@ -2451,6 +2451,9 @@ void wined3d_surface_destroy(struct wined3d_surface *surface) DECLSPEC_HIDDEN;
|
||||
void wined3d_surface_upload_data(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info,
|
||||
const struct wined3d_format *format, const RECT *src_rect, UINT src_pitch, const POINT *dst_point,
|
||||
BOOL srgb, const struct wined3d_const_bo_address *data) DECLSPEC_HIDDEN;
|
||||
@ -531,7 +533,7 @@ index ebbc6e8..584fcf3 100644
|
||||
|
||||
void draw_textured_quad(const struct wined3d_surface *src_surface, struct wined3d_context *context,
|
||||
const RECT *src_rect, const RECT *dst_rect, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
|
||||
@@ -2583,6 +2586,7 @@ struct wined3d_cs
|
||||
@@ -2600,6 +2603,7 @@ struct wined3d_cs
|
||||
struct wined3d_device *device;
|
||||
struct wined3d_state state;
|
||||
HANDLE thread;
|
||||
@ -539,7 +541,7 @@ index ebbc6e8..584fcf3 100644
|
||||
DWORD tls_idx;
|
||||
struct wined3d_surface *onscreen_depth_stencil;
|
||||
|
||||
@@ -2659,6 +2663,10 @@ void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs,
|
||||
@@ -2678,6 +2682,10 @@ void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs,
|
||||
GLenum primitive_type) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light_info *light) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, UINT idx, BOOL enable) DECLSPEC_HIDDEN;
|
||||
|
@ -1,29 +1,31 @@
|
||||
From c83ce498b74f5b547be9e158619a20079ea77681 Mon Sep 17 00:00:00 2001
|
||||
From b41844b91cb9817f378c3c666b3129c3c870d014 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Thu, 4 Jul 2013 20:40:39 +0200
|
||||
Subject: wined3d: Add cs waiting debug code
|
||||
|
||||
---
|
||||
dlls/wined3d/texture.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
dlls/wined3d/texture.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index 084b4db..ac41088 100644
|
||||
index eb4996b..240e8fa 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -576,6 +576,12 @@ HRESULT CDECL wined3d_texture_set_color_key(struct wined3d_texture *texture,
|
||||
@@ -610,6 +610,14 @@ HRESULT CDECL wined3d_texture_set_color_key(struct wined3d_texture *texture,
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
+ /*
|
||||
+ if (wined3d_settings.cs_multithreaded)
|
||||
+ {
|
||||
+ FIXME("waiting for cs\n");
|
||||
+ texture->resource.device->cs->ops->finish(texture->resource.device->cs);
|
||||
+ }
|
||||
+ */
|
||||
+
|
||||
if (color_key)
|
||||
{
|
||||
switch (flags & ~WINED3D_CKEY_COLORSPACE)
|
||||
wined3d_cs_emit_set_color_key(device->cs, texture, flags, color_key);
|
||||
|
||||
return WINED3D_OK;
|
||||
--
|
||||
2.2.1
|
||||
2.3.5
|
||||
|
||||
|
@ -1,15 +1,15 @@
|
||||
From 68ab1f57ab88ea0592fcaa9c2c73a283fdb8dd3c Mon Sep 17 00:00:00 2001
|
||||
From c115a25b8aba4ade5fa04cfb469b030eb29b941a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Thu, 4 Jul 2013 23:33:14 +0200
|
||||
Subject: wined3d: Replace the linked lists with a ringbuffer
|
||||
|
||||
---
|
||||
dlls/wined3d/cs.c | 360 ++++++++++++++++++-----------------------
|
||||
dlls/wined3d/cs.c | 362 ++++++++++++++++++-----------------------
|
||||
dlls/wined3d/wined3d_private.h | 20 +--
|
||||
2 files changed, 161 insertions(+), 219 deletions(-)
|
||||
2 files changed, 162 insertions(+), 220 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index b691924..d35f114 100644
|
||||
index 6204e57..66c784b 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -22,20 +22,10 @@
|
||||
@ -35,7 +35,7 @@ index b691924..d35f114 100644
|
||||
WINED3D_CS_OP_FENCE,
|
||||
WINED3D_CS_OP_PRESENT,
|
||||
WINED3D_CS_OP_CLEAR,
|
||||
@@ -368,99 +358,30 @@ struct wined3d_cs_resource_unmap
|
||||
@@ -378,99 +368,30 @@ struct wined3d_cs_resource_unmap
|
||||
struct wined3d_resource *resource;
|
||||
};
|
||||
|
||||
@ -149,7 +149,7 @@ index b691924..d35f114 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_fence(struct wined3d_cs *cs, const void *data)
|
||||
@@ -481,14 +402,14 @@ static void wined3d_cs_emit_fence(struct wined3d_cs *cs, BOOL *signalled)
|
||||
@@ -491,14 +412,14 @@ static void wined3d_cs_emit_fence(struct wined3d_cs *cs, BOOL *signalled)
|
||||
op = cs->ops->require_space(cs, sizeof(*op));
|
||||
op->opcode = WINED3D_CS_OP_FENCE;
|
||||
op->signalled = signalled;
|
||||
@ -166,7 +166,7 @@ index b691924..d35f114 100644
|
||||
|
||||
/* A busy wait should be fine, we're not supposed to have to wait very
|
||||
* long. */
|
||||
@@ -546,7 +467,7 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
|
||||
@@ -556,7 +477,7 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
|
||||
|
||||
pending = InterlockedIncrement(&cs->pending_presents);
|
||||
|
||||
@ -175,7 +175,7 @@ index b691924..d35f114 100644
|
||||
|
||||
while (pending > 1)
|
||||
pending = InterlockedCompareExchange(&cs->pending_presents, 0, 0);
|
||||
@@ -573,8 +494,9 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
@@ -583,8 +504,9 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
{
|
||||
struct wined3d_cs_clear *op;
|
||||
unsigned int extra_rects = rect_count ? rect_count - 1 : 0;
|
||||
@ -186,7 +186,7 @@ index b691924..d35f114 100644
|
||||
op->opcode = WINED3D_CS_OP_CLEAR;
|
||||
op->rect_count = rect_count;
|
||||
if (rect_count)
|
||||
@@ -584,7 +506,7 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
@@ -594,7 +516,7 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
op->depth = depth;
|
||||
op->stencil = stencil;
|
||||
|
||||
@ -195,7 +195,7 @@ index b691924..d35f114 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
|
||||
@@ -625,7 +547,7 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, UINT start_idx, UINT index_coun
|
||||
@@ -635,7 +557,7 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, UINT start_idx, UINT index_coun
|
||||
op->instance_count = instance_count;
|
||||
op->indexed = indexed;
|
||||
|
||||
@ -204,7 +204,7 @@ index b691924..d35f114 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_predication(struct wined3d_cs *cs, const void *data)
|
||||
@@ -647,7 +569,7 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query
|
||||
@@ -657,7 +579,7 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query
|
||||
op->predicate = predicate;
|
||||
op->value = value;
|
||||
|
||||
@ -213,7 +213,7 @@ index b691924..d35f114 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_viewport(struct wined3d_cs *cs, const void *data)
|
||||
@@ -669,7 +591,7 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
|
||||
@@ -679,7 +601,7 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
|
||||
op->opcode = WINED3D_CS_OP_SET_VIEWPORT;
|
||||
op->viewport = *viewport;
|
||||
|
||||
@ -222,7 +222,7 @@ index b691924..d35f114 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_scissor_rect(struct wined3d_cs *cs, const void *data)
|
||||
@@ -690,7 +612,7 @@ void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
|
||||
@@ -700,7 +622,7 @@ void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
|
||||
op->opcode = WINED3D_CS_OP_SET_SCISSOR_RECT;
|
||||
op->rect = *rect;
|
||||
|
||||
@ -231,7 +231,7 @@ index b691924..d35f114 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_rendertarget_view(struct wined3d_cs *cs, const void *data)
|
||||
@@ -713,7 +635,7 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
|
||||
@@ -723,7 +645,7 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
|
||||
op->view_idx = view_idx;
|
||||
op->view = view;
|
||||
|
||||
@ -240,7 +240,7 @@ index b691924..d35f114 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const void *data)
|
||||
@@ -766,7 +688,7 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3
|
||||
@@ -776,7 +698,7 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3
|
||||
op->opcode = WINED3D_CS_OP_SET_DEPTH_STENCIL_VIEW;
|
||||
op->view = view;
|
||||
|
||||
@ -249,7 +249,7 @@ index b691924..d35f114 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_vertex_declaration(struct wined3d_cs *cs, const void *data)
|
||||
@@ -787,7 +709,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
|
||||
@@ -797,7 +719,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
|
||||
op->opcode = WINED3D_CS_OP_SET_VERTEX_DECLARATION;
|
||||
op->declaration = declaration;
|
||||
|
||||
@ -258,7 +258,7 @@ index b691924..d35f114 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_stream_source(struct wined3d_cs *cs, const void *data)
|
||||
@@ -824,7 +746,7 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -834,7 +756,7 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
|
||||
op->offset = offset;
|
||||
op->stride = stride;
|
||||
|
||||
@ -267,7 +267,7 @@ index b691924..d35f114 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_stream_source_freq(struct wined3d_cs *cs, const void *data)
|
||||
@@ -851,7 +773,7 @@ void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_i
|
||||
@@ -861,7 +783,7 @@ void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_i
|
||||
op->frequency = frequency;
|
||||
op->flags = flags;
|
||||
|
||||
@ -276,7 +276,7 @@ index b691924..d35f114 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_stream_output(struct wined3d_cs *cs, const void *data)
|
||||
@@ -884,7 +806,7 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -894,7 +816,7 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
|
||||
op->buffer = buffer;
|
||||
op->offset = offset;
|
||||
|
||||
@ -285,7 +285,7 @@ index b691924..d35f114 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_index_buffer(struct wined3d_cs *cs, const void *data)
|
||||
@@ -916,7 +838,7 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
|
||||
@@ -926,7 +848,7 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
|
||||
op->buffer = buffer;
|
||||
op->format_id = format_id;
|
||||
|
||||
@ -294,7 +294,7 @@ index b691924..d35f114 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_constant_buffer(struct wined3d_cs *cs, const void *data)
|
||||
@@ -947,7 +869,7 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
|
||||
@@ -957,7 +879,7 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
|
||||
op->cb_idx = cb_idx;
|
||||
op->buffer = buffer;
|
||||
|
||||
@ -303,7 +303,7 @@ index b691924..d35f114 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_texture(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1022,7 +944,7 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
|
||||
@@ -1032,7 +954,7 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
|
||||
op->opcode = WINED3D_CS_OP_SET_TEXTURE;
|
||||
op->stage = stage;
|
||||
op->texture = texture;
|
||||
@ -312,7 +312,7 @@ index b691924..d35f114 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_shader_resource_view(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1045,7 +967,7 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
|
||||
@@ -1056,7 +978,7 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
|
||||
op->view_idx = view_idx;
|
||||
op->view = view;
|
||||
|
||||
@ -321,7 +321,7 @@ index b691924..d35f114 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_sampler(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1068,7 +990,7 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
@@ -1080,7 +1002,7 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
op->sampler_idx = sampler_idx;
|
||||
op->sampler = sampler;
|
||||
|
||||
@ -330,7 +330,7 @@ index b691924..d35f114 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_shader(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1089,6 +1011,8 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
@@ -1102,6 +1024,8 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
op->opcode = WINED3D_CS_OP_SET_SHADER;
|
||||
op->type = type;
|
||||
op->shader = shader;
|
||||
@ -339,7 +339,7 @@ index b691924..d35f114 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_vs_consts_f(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1124,8 +1048,9 @@ void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, UINT start_register,
|
||||
@@ -1137,8 +1061,9 @@ void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, UINT start_register,
|
||||
{
|
||||
struct wined3d_cs_set_consts_f *op;
|
||||
UINT extra_space = vector4f_count - 1;
|
||||
@ -350,7 +350,7 @@ index b691924..d35f114 100644
|
||||
switch (type)
|
||||
{
|
||||
case WINED3D_SHADER_TYPE_PIXEL:
|
||||
@@ -1147,7 +1072,7 @@ void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, UINT start_register,
|
||||
@@ -1160,7 +1085,7 @@ void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, UINT start_register,
|
||||
op->vector4f_count = vector4f_count;
|
||||
memcpy(op->constants, constants, sizeof(*constants) * 4 * vector4f_count);
|
||||
|
||||
@ -359,7 +359,7 @@ index b691924..d35f114 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_render_state(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1169,8 +1094,8 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
|
||||
@@ -1182,8 +1107,8 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
|
||||
op->state = state;
|
||||
op->value = value;
|
||||
|
||||
@ -370,7 +370,7 @@ index b691924..d35f114 100644
|
||||
|
||||
static UINT wined3d_cs_exec_set_vs_consts_b(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
@@ -1203,8 +1128,9 @@ void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, UINT start_register,
|
||||
@@ -1216,8 +1141,9 @@ void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, UINT start_register,
|
||||
{
|
||||
struct wined3d_cs_set_consts_b *op;
|
||||
UINT extra_space = bool_count - 1;
|
||||
@ -381,7 +381,7 @@ index b691924..d35f114 100644
|
||||
switch (type)
|
||||
{
|
||||
case WINED3D_SHADER_TYPE_PIXEL:
|
||||
@@ -1226,7 +1152,7 @@ void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, UINT start_register,
|
||||
@@ -1239,7 +1165,7 @@ void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, UINT start_register,
|
||||
op->bool_count = bool_count;
|
||||
memcpy(op->constants, constants, sizeof(op->constants) * bool_count);
|
||||
|
||||
@ -390,7 +390,7 @@ index b691924..d35f114 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_vs_consts_i(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1260,8 +1186,9 @@ void wined3d_cs_emit_set_consts_i(struct wined3d_cs *cs, UINT start_register,
|
||||
@@ -1273,8 +1199,9 @@ void wined3d_cs_emit_set_consts_i(struct wined3d_cs *cs, UINT start_register,
|
||||
{
|
||||
struct wined3d_cs_set_consts_i *op;
|
||||
UINT extra_space = vector4i_count - 1;
|
||||
@ -401,7 +401,7 @@ index b691924..d35f114 100644
|
||||
switch (type)
|
||||
{
|
||||
case WINED3D_SHADER_TYPE_PIXEL:
|
||||
@@ -1283,7 +1210,7 @@ void wined3d_cs_emit_set_consts_i(struct wined3d_cs *cs, UINT start_register,
|
||||
@@ -1296,7 +1223,7 @@ void wined3d_cs_emit_set_consts_i(struct wined3d_cs *cs, UINT start_register,
|
||||
op->vector4i_count = vector4i_count;
|
||||
memcpy(op->constants, constants, sizeof(op->constants) * vector4i_count);
|
||||
|
||||
@ -410,7 +410,7 @@ index b691924..d35f114 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_texture_state(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1307,7 +1234,7 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
|
||||
@@ -1320,7 +1247,7 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
|
||||
op->state = state;
|
||||
op->value = value;
|
||||
|
||||
@ -419,7 +419,7 @@ index b691924..d35f114 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_sampler_state(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1331,7 +1258,7 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
|
||||
@@ -1344,7 +1271,7 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
|
||||
op->state = state;
|
||||
op->value = value;
|
||||
|
||||
@ -428,7 +428,7 @@ index b691924..d35f114 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_transform(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1355,7 +1282,7 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
|
||||
@@ -1368,7 +1295,7 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
|
||||
op->state = state;
|
||||
op->matrix = *matrix;
|
||||
|
||||
@ -437,16 +437,25 @@ index b691924..d35f114 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_clip_plane(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1377,7 +1304,7 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
|
||||
@@ -1390,7 +1317,7 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
|
||||
op->plane_idx = plane_idx;
|
||||
op->plane = *plane;
|
||||
|
||||
- cs->ops->submit(cs);
|
||||
+ cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1468,7 +1395,7 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
|
||||
else
|
||||
op->set = 0;
|
||||
|
||||
- cs->ops->submit(cs);
|
||||
+ cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_material(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1398,7 +1325,7 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
|
||||
@@ -1489,7 +1416,7 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
|
||||
op->opcode = WINED3D_CS_OP_SET_MATERIAL;
|
||||
op->material = *material;
|
||||
|
||||
@ -455,7 +464,7 @@ index b691924..d35f114 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1422,7 +1349,7 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
@@ -1513,7 +1440,7 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
op = cs->ops->require_space(cs, sizeof(*op));
|
||||
op->opcode = WINED3D_CS_OP_RESET_STATE;
|
||||
|
||||
@ -464,7 +473,7 @@ index b691924..d35f114 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_glfinish(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1448,7 +1375,7 @@ void wined3d_cs_emit_glfinish(struct wined3d_cs *cs)
|
||||
@@ -1539,7 +1466,7 @@ void wined3d_cs_emit_glfinish(struct wined3d_cs *cs)
|
||||
op = cs->ops->require_space(cs, sizeof(*op));
|
||||
op->opcode = WINED3D_CS_OP_GLFINISH;
|
||||
|
||||
@ -473,7 +482,7 @@ index b691924..d35f114 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_base_vertex_index(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1470,7 +1397,7 @@ void wined3d_cs_emit_set_base_vertex_index(struct wined3d_cs *cs,
|
||||
@@ -1561,7 +1488,7 @@ void wined3d_cs_emit_set_base_vertex_index(struct wined3d_cs *cs,
|
||||
op->opcode = WINED3D_CS_OP_SET_BASE_VERTEX_INDEX;
|
||||
op->base_vertex_index = base_vertex_index;
|
||||
|
||||
@ -482,7 +491,7 @@ index b691924..d35f114 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_primitive_type(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1496,7 +1423,7 @@ void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs, GLenum primitive_
|
||||
@@ -1587,7 +1514,7 @@ void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs, GLenum primitive_
|
||||
op->opcode = WINED3D_CS_OP_SET_PRIMITIVE_TYPE;
|
||||
op->gl_primitive_type = primitive_type;
|
||||
|
||||
@ -491,7 +500,7 @@ index b691924..d35f114 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_light(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1553,7 +1480,7 @@ void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light
|
||||
@@ -1644,7 +1571,7 @@ void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light
|
||||
op->opcode = WINED3D_CS_OP_SET_LIGHT;
|
||||
op->light = *light;
|
||||
|
||||
@ -500,7 +509,7 @@ index b691924..d35f114 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_light_enable(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1642,7 +1569,7 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, UINT idx, BOOL enab
|
||||
@@ -1733,7 +1660,7 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, UINT idx, BOOL enab
|
||||
op->idx = idx;
|
||||
op->enable = enable;
|
||||
|
||||
@ -509,7 +518,7 @@ index b691924..d35f114 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_blt(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1674,7 +1601,7 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
|
||||
@@ -1765,7 +1692,7 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
|
||||
if (fx)
|
||||
op->fx = *fx;
|
||||
|
||||
@ -518,7 +527,7 @@ index b691924..d35f114 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_clear_rtv(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1700,7 +1627,7 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
|
||||
@@ -1791,7 +1718,7 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
|
||||
op->rect = *rect;
|
||||
op->color = *color;
|
||||
|
||||
@ -527,7 +536,7 @@ index b691924..d35f114 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_resource_map(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1724,12 +1651,14 @@ void *wined3d_cs_emit_resource_map(struct wined3d_cs *cs, struct wined3d_resourc
|
||||
@@ -1815,12 +1742,14 @@ void *wined3d_cs_emit_resource_map(struct wined3d_cs *cs, struct wined3d_resourc
|
||||
op->flags = flags;
|
||||
op->mem = &ret;
|
||||
|
||||
@ -543,7 +552,7 @@ index b691924..d35f114 100644
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -1751,11 +1680,13 @@ void wined3d_cs_emit_resource_unmap(struct wined3d_cs *cs, struct wined3d_resour
|
||||
@@ -1842,11 +1771,13 @@ void wined3d_cs_emit_resource_unmap(struct wined3d_cs *cs, struct wined3d_resour
|
||||
op->opcode = WINED3D_CS_OP_RESOURCE_UNMAP;
|
||||
op->resource = resource;
|
||||
|
||||
@ -558,7 +567,7 @@ index b691924..d35f114 100644
|
||||
/* WINED3D_CS_OP_FENCE */ wined3d_cs_exec_fence,
|
||||
/* WINED3D_CS_OP_PRESENT */ wined3d_cs_exec_present,
|
||||
/* WINED3D_CS_OP_CLEAR */ wined3d_cs_exec_clear,
|
||||
@@ -1799,42 +1730,59 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -1891,42 +1822,59 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_RESOURCE_UNMAP */ wined3d_cs_exec_resource_unmap,
|
||||
};
|
||||
|
||||
@ -641,7 +650,7 @@ index b691924..d35f114 100644
|
||||
};
|
||||
|
||||
/* FIXME: wined3d_device_uninit_3d() should either flush and wait, or be an
|
||||
@@ -1846,9 +1794,38 @@ static void wined3d_cs_emit_stop(struct wined3d_cs *cs)
|
||||
@@ -1938,9 +1886,38 @@ static void wined3d_cs_emit_stop(struct wined3d_cs *cs)
|
||||
op = wined3d_cs_mt_require_space(cs, sizeof(*op));
|
||||
op->opcode = WINED3D_CS_OP_STOP;
|
||||
|
||||
@ -681,7 +690,7 @@ index b691924..d35f114 100644
|
||||
void wined3d_cs_switch_onscreen_ds(struct wined3d_cs *cs,
|
||||
struct wined3d_context *context, struct wined3d_surface *depth_stencil)
|
||||
{
|
||||
@@ -1868,31 +1845,32 @@ void wined3d_cs_switch_onscreen_ds(struct wined3d_cs *cs,
|
||||
@@ -1960,31 +1937,32 @@ void wined3d_cs_switch_onscreen_ds(struct wined3d_cs *cs,
|
||||
static DWORD WINAPI wined3d_cs_run(void *thread_param)
|
||||
{
|
||||
struct wined3d_cs *cs = thread_param;
|
||||
@ -728,7 +737,7 @@ index b691924..d35f114 100644
|
||||
}
|
||||
|
||||
done:
|
||||
@@ -1917,25 +1895,10 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
@@ -2009,25 +1987,10 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
cs->ops = &wined3d_cs_st_ops;
|
||||
cs->device = device;
|
||||
|
||||
@ -754,7 +763,7 @@ index b691924..d35f114 100644
|
||||
if (!(cs->thread = CreateThread(NULL, 0, wined3d_cs_run, cs, 0, NULL)))
|
||||
{
|
||||
ERR("Failed to create wined3d command stream thread.\n");
|
||||
@@ -1947,12 +1910,7 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
@@ -2039,12 +2002,7 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
|
||||
err:
|
||||
if (cs)
|
||||
@ -767,7 +776,7 @@ index b691924..d35f114 100644
|
||||
HeapFree(GetProcessHeap(), 0, cs);
|
||||
return NULL;
|
||||
}
|
||||
@@ -1971,17 +1929,7 @@ void wined3d_cs_destroy(struct wined3d_cs *cs)
|
||||
@@ -2063,17 +2021,7 @@ void wined3d_cs_destroy(struct wined3d_cs *cs)
|
||||
CloseHandle(cs->thread);
|
||||
if (ret != WAIT_OBJECT_0)
|
||||
ERR("Wait failed (%#x).\n", ret);
|
||||
@ -786,7 +795,7 @@ index b691924..d35f114 100644
|
||||
HeapFree(GetProcessHeap(), 0, cs);
|
||||
}
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 6ee0c24..59d9753 100644
|
||||
index ed4d94b..35384e1 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -31,6 +31,7 @@
|
||||
@ -797,7 +806,7 @@ index 6ee0c24..59d9753 100644
|
||||
#include <stdarg.h>
|
||||
#include <math.h>
|
||||
#include <limits.h>
|
||||
@@ -2537,19 +2538,17 @@ struct wined3d_cs_list
|
||||
@@ -2584,19 +2585,17 @@ struct wined3d_cs_list
|
||||
struct list blocks;
|
||||
};
|
||||
|
||||
@ -822,7 +831,7 @@ index 6ee0c24..59d9753 100644
|
||||
void (*finish)(struct wined3d_cs *cs);
|
||||
};
|
||||
|
||||
@@ -2560,14 +2559,9 @@ struct wined3d_cs
|
||||
@@ -2607,14 +2606,9 @@ struct wined3d_cs
|
||||
struct wined3d_state state;
|
||||
HANDLE thread;
|
||||
DWORD thread_id;
|
||||
@ -839,5 +848,5 @@ index 6ee0c24..59d9753 100644
|
||||
LONG pending_presents;
|
||||
};
|
||||
--
|
||||
2.1.3
|
||||
2.3.5
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user