You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Rebase against 1ddf2b4db8c42da36bdccd43dc336eee6ba03cce.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From ec1172f3bd0ba8c66347ed17edf086c850665f24 Mon Sep 17 00:00:00 2001
|
||||
From 9e6e4d61e56980850bbbc340d510e9a57f9d5627 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Mon, 6 Feb 2017 05:50:11 +0100
|
||||
Subject: wined3d: Send push_constants through the CS.
|
||||
@@ -10,18 +10,18 @@ Subject: wined3d: Send push_constants through the CS.
|
||||
3 files changed, 77 insertions(+), 58 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 543528ae570..72c0ace384c 100644
|
||||
index 8c0abf449f2..0d74ea806a9 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -66,6 +66,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_MAP,
|
||||
@@ -67,6 +67,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_UNMAP,
|
||||
WINED3D_CS_OP_BLT_SUB_RESOURCE,
|
||||
WINED3D_CS_OP_UPDATE_SUB_RESOURCE,
|
||||
+ WINED3D_CS_OP_PUSH_CONSTANTS,
|
||||
};
|
||||
|
||||
struct wined3d_cs_sync
|
||||
@@ -366,6 +367,15 @@ struct wined3d_cs_update_sub_resource
|
||||
@@ -381,6 +382,15 @@ struct wined3d_cs_update_sub_resource
|
||||
struct wined3d_sub_resource_data data;
|
||||
};
|
||||
|
||||
@@ -37,7 +37,7 @@ index 543528ae570..72c0ace384c 100644
|
||||
static void wined3d_cs_exec_sync(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
}
|
||||
@@ -1773,6 +1783,64 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
|
||||
@@ -1856,6 +1866,64 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
|
||||
cs->ops->submit_and_wait(cs);
|
||||
}
|
||||
|
||||
@@ -102,15 +102,15 @@ index 543528ae570..72c0ace384c 100644
|
||||
static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_SYNC */ wined3d_cs_exec_sync,
|
||||
@@ -1815,6 +1883,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_MAP */ wined3d_cs_exec_map,
|
||||
@@ -1899,6 +1967,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_UNMAP */ wined3d_cs_exec_unmap,
|
||||
/* WINED3D_CS_OP_BLT_SUB_RESOURCE */ wined3d_cs_exec_blt_sub_resource,
|
||||
/* WINED3D_CS_OP_UPDATE_SUB_RESOURCE */ wined3d_cs_exec_update_sub_resource,
|
||||
+ /* WINED3D_CS_OP_PUSH_CONSTANTS */ wined3d_cs_exec_push_constants,
|
||||
};
|
||||
|
||||
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
|
||||
@@ -1861,55 +1930,11 @@ static void wined3d_cs_st_submit(struct wined3d_cs *cs)
|
||||
@@ -1945,55 +2014,11 @@ static void wined3d_cs_st_submit(struct wined3d_cs *cs)
|
||||
HeapFree(GetProcessHeap(), 0, data);
|
||||
}
|
||||
|
||||
@@ -167,10 +167,10 @@ index 543528ae570..72c0ace384c 100644
|
||||
|
||||
struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index ea27553e8c8..a06cae6412e 100644
|
||||
index e328f32403f..c3a10a2d13a 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -2337,7 +2337,7 @@ HRESULT CDECL wined3d_device_set_vs_consts_b(struct wined3d_device *device,
|
||||
@@ -2376,7 +2376,7 @@ HRESULT CDECL wined3d_device_set_vs_consts_b(struct wined3d_device *device,
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -179,7 +179,7 @@ index ea27553e8c8..a06cae6412e 100644
|
||||
}
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -2386,7 +2386,7 @@ HRESULT CDECL wined3d_device_set_vs_consts_i(struct wined3d_device *device,
|
||||
@@ -2425,7 +2425,7 @@ HRESULT CDECL wined3d_device_set_vs_consts_i(struct wined3d_device *device,
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -188,7 +188,7 @@ index ea27553e8c8..a06cae6412e 100644
|
||||
}
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -2431,7 +2431,7 @@ HRESULT CDECL wined3d_device_set_vs_consts_f(struct wined3d_device *device,
|
||||
@@ -2470,7 +2470,7 @@ HRESULT CDECL wined3d_device_set_vs_consts_f(struct wined3d_device *device,
|
||||
memset(&device->recording->changed.vs_consts_f[start_idx], 1,
|
||||
count * sizeof(*device->recording->changed.vs_consts_f));
|
||||
else
|
||||
@@ -197,7 +197,7 @@ index ea27553e8c8..a06cae6412e 100644
|
||||
|
||||
return WINED3D_OK;
|
||||
}
|
||||
@@ -2570,7 +2570,7 @@ HRESULT CDECL wined3d_device_set_ps_consts_b(struct wined3d_device *device,
|
||||
@@ -2591,7 +2591,7 @@ HRESULT CDECL wined3d_device_set_ps_consts_b(struct wined3d_device *device,
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -206,7 +206,7 @@ index ea27553e8c8..a06cae6412e 100644
|
||||
}
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -2619,7 +2619,7 @@ HRESULT CDECL wined3d_device_set_ps_consts_i(struct wined3d_device *device,
|
||||
@@ -2640,7 +2640,7 @@ HRESULT CDECL wined3d_device_set_ps_consts_i(struct wined3d_device *device,
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -215,7 +215,7 @@ index ea27553e8c8..a06cae6412e 100644
|
||||
}
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -2665,7 +2665,7 @@ HRESULT CDECL wined3d_device_set_ps_consts_f(struct wined3d_device *device,
|
||||
@@ -2686,7 +2686,7 @@ HRESULT CDECL wined3d_device_set_ps_consts_f(struct wined3d_device *device,
|
||||
memset(&device->recording->changed.ps_consts_f[start_idx], 1,
|
||||
count * sizeof(*device->recording->changed.ps_consts_f));
|
||||
else
|
||||
@@ -225,10 +225,10 @@ index ea27553e8c8..a06cae6412e 100644
|
||||
return WINED3D_OK;
|
||||
}
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index d2e0052067f..2a8f075667a 100644
|
||||
index 2922caaa412..9c68628ed6c 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -3199,8 +3199,6 @@ struct wined3d_cs_ops
|
||||
@@ -3200,8 +3200,6 @@ struct wined3d_cs_ops
|
||||
void *(*require_space)(struct wined3d_cs *cs, size_t size);
|
||||
void (*submit)(struct wined3d_cs *cs);
|
||||
void (*submit_and_wait)(struct wined3d_cs *cs);
|
||||
@@ -237,7 +237,7 @@ index d2e0052067f..2a8f075667a 100644
|
||||
};
|
||||
|
||||
struct wined3d_cs
|
||||
@@ -3229,6 +3227,8 @@ void wined3d_cs_emit_glfinish(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
|
||||
@@ -3234,6 +3232,8 @@ void wined3d_cs_emit_glfinish(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *swapchain,
|
||||
const RECT *src_rect, const RECT *dst_rect, HWND dst_window_override, DWORD flags) DECLSPEC_HIDDEN;
|
||||
@@ -246,7 +246,7 @@ index d2e0052067f..2a8f075667a 100644
|
||||
void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *query, DWORD flags) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_reset_state(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx,
|
||||
@@ -3289,12 +3289,6 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||
@@ -3294,12 +3294,6 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||
HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||
unsigned int sub_resource_idx) DECLSPEC_HIDDEN;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 5ee5e16ac78dcad58eaa40fe41ee7c771b8721cf Mon Sep 17 00:00:00 2001
|
||||
From 706645d08ae7ebd9175f91532077694b988aef7d 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.
|
||||
@@ -6,335 +6,45 @@ Subject: wined3d: Send blits through the command stream.
|
||||
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 | 52 +++++++++++++++
|
||||
dlls/wined3d/surface.c | 140 ++++++++++++++++++++++++-----------------
|
||||
dlls/wined3d/texture.c | 9 ++-
|
||||
dlls/wined3d/wined3d_private.h | 7 +++
|
||||
4 files changed, 148 insertions(+), 60 deletions(-)
|
||||
dlls/wined3d/device.c | 18 +++++++++---------
|
||||
dlls/wined3d/texture.c | 9 +++++++--
|
||||
2 files changed, 16 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 1366973c1e6..f2eb87e35b8 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -67,6 +67,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_UNMAP,
|
||||
WINED3D_CS_OP_UPDATE_SUB_RESOURCE,
|
||||
WINED3D_CS_OP_PUSH_CONSTANTS,
|
||||
+ WINED3D_CS_OP_BLT,
|
||||
};
|
||||
|
||||
struct wined3d_cs_sync
|
||||
@@ -376,6 +377,18 @@ struct wined3d_cs_push_constants
|
||||
BYTE constants[1];
|
||||
};
|
||||
|
||||
+struct wined3d_cs_blt
|
||||
+{
|
||||
+ enum wined3d_cs_op opcode;
|
||||
+ struct wined3d_surface *dst_surface;
|
||||
+ RECT dst_rect;
|
||||
+ struct wined3d_surface *src_surface;
|
||||
+ RECT src_rect;
|
||||
+ DWORD flags;
|
||||
+ struct wined3d_blt_fx fx;
|
||||
+ enum wined3d_texture_filter_type filter;
|
||||
+};
|
||||
+
|
||||
static void wined3d_cs_exec_sync(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
}
|
||||
@@ -1857,6 +1870,44 @@ void wined3d_cs_emit_push_constants(struct wined3d_cs *cs, enum wined3d_push_con
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
+static void wined3d_cs_exec_blt(struct wined3d_cs *cs, const void *data)
|
||||
+{
|
||||
+ const struct wined3d_cs_blt *op = data;
|
||||
+
|
||||
+ surface_blt_ugly(op->dst_surface, &op->dst_rect,
|
||||
+ op->src_surface, &op->src_rect,
|
||||
+ op->flags, &op->fx, op->filter);
|
||||
+
|
||||
+ wined3d_resource_release(&op->dst_surface->container->resource);
|
||||
+ if (op->src_surface && op->src_surface != op->dst_surface)
|
||||
+ wined3d_resource_release(&op->src_surface->container->resource);
|
||||
+}
|
||||
+
|
||||
+void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surface,
|
||||
+ const RECT *dst_rect, struct wined3d_surface *src_surface,
|
||||
+ const RECT *src_rect, DWORD flags, const struct wined3d_blt_fx *fx,
|
||||
+ enum wined3d_texture_filter_type filter)
|
||||
+{
|
||||
+ struct wined3d_cs_blt *op;
|
||||
+
|
||||
+ op = cs->ops->require_space(cs, sizeof(*op));
|
||||
+ op->opcode = WINED3D_CS_OP_BLT;
|
||||
+ op->dst_surface = dst_surface;
|
||||
+ op->dst_rect = *dst_rect;
|
||||
+ op->src_surface = src_surface;
|
||||
+ op->src_rect = *src_rect;
|
||||
+ op->flags = flags;
|
||||
+ op->filter = filter;
|
||||
+ if (fx)
|
||||
+ op->fx = *fx;
|
||||
+
|
||||
+ wined3d_resource_acquire(&dst_surface->container->resource);
|
||||
+ if (src_surface && src_surface != dst_surface)
|
||||
+ wined3d_resource_acquire(&src_surface->container->resource);
|
||||
+
|
||||
+ cs->ops->submit(cs);
|
||||
+}
|
||||
+
|
||||
static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_SYNC */ wined3d_cs_exec_sync,
|
||||
@@ -1900,6 +1951,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_UNMAP */ wined3d_cs_exec_unmap,
|
||||
/* WINED3D_CS_OP_UPDATE_SUB_RESOURCE */ wined3d_cs_exec_update_sub_resource,
|
||||
/* WINED3D_CS_OP_PUSH_CONSTANTS */ wined3d_cs_exec_push_constants,
|
||||
+ /* WINED3D_CS_OP_BLT */ wined3d_cs_exec_blt,
|
||||
};
|
||||
|
||||
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index cd82d46a001..637d300b2f5 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -3738,7 +3738,7 @@ const struct blit_shader cpu_blit = {
|
||||
cpu_blit_blit_surface,
|
||||
};
|
||||
|
||||
-HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst_rect,
|
||||
+void surface_blt_ugly(struct wined3d_surface *dst_surface, const RECT *dst_rect,
|
||||
struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags,
|
||||
const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter)
|
||||
{
|
||||
@@ -3748,8 +3748,8 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
struct wined3d_texture *dst_texture = dst_surface->container;
|
||||
struct wined3d_device *device = dst_texture->resource.device;
|
||||
struct wined3d_swapchain *src_swapchain, *dst_swapchain;
|
||||
- struct wined3d_texture *src_texture = NULL;
|
||||
- unsigned int src_sub_resource_idx = 0;
|
||||
+ struct wined3d_texture *src_texture;
|
||||
+ unsigned int src_sub_resource_idx;
|
||||
DWORD src_ds_flags, dst_ds_flags;
|
||||
BOOL scale, convert;
|
||||
|
||||
@@ -3762,52 +3762,17 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
| WINED3D_BLT_DO_NOT_WAIT
|
||||
| WINED3D_BLT_ALPHA_TEST;
|
||||
|
||||
- TRACE("dst_surface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#x, fx %p, filter %s.\n",
|
||||
- dst_surface, wine_dbgstr_rect(dst_rect), src_surface, wine_dbgstr_rect(src_rect),
|
||||
- flags, fx, debug_d3dtexturefiltertype(filter));
|
||||
- TRACE("Usage is %s.\n", debug_d3dusage(dst_texture->resource.usage));
|
||||
-
|
||||
- if (fx)
|
||||
- {
|
||||
- TRACE("fx %#x.\n", fx->fx);
|
||||
- TRACE("fill_color 0x%08x.\n", fx->fill_color);
|
||||
- TRACE("dst_color_key {0x%08x, 0x%08x}.\n",
|
||||
- fx->dst_color_key.color_space_low_value,
|
||||
- fx->dst_color_key.color_space_high_value);
|
||||
- TRACE("src_color_key {0x%08x, 0x%08x}.\n",
|
||||
- fx->src_color_key.color_space_low_value,
|
||||
- fx->src_color_key.color_space_high_value);
|
||||
- }
|
||||
-
|
||||
if (src_surface)
|
||||
{
|
||||
src_texture = src_surface->container;
|
||||
src_sub_resource_idx = surface_get_sub_resource_idx(src_surface);
|
||||
+ src_swapchain = src_texture->swapchain;
|
||||
}
|
||||
-
|
||||
- if (!fx || !(fx->fx))
|
||||
- flags &= ~WINED3D_BLT_FX;
|
||||
-
|
||||
- if (flags & WINED3D_BLT_WAIT)
|
||||
- flags &= ~WINED3D_BLT_WAIT;
|
||||
-
|
||||
- if (flags & WINED3D_BLT_ASYNC)
|
||||
- {
|
||||
- static unsigned int once;
|
||||
-
|
||||
- if (!once++)
|
||||
- FIXME("Can't handle WINED3D_BLT_ASYNC flag.\n");
|
||||
- flags &= ~WINED3D_BLT_ASYNC;
|
||||
- }
|
||||
-
|
||||
- /* WINED3D_BLT_DO_NOT_WAIT appeared in DX7. */
|
||||
- if (flags & WINED3D_BLT_DO_NOT_WAIT)
|
||||
+ else
|
||||
{
|
||||
- static unsigned int once;
|
||||
-
|
||||
- if (!once++)
|
||||
- FIXME("Can't handle WINED3D_BLT_DO_NOT_WAIT flag.\n");
|
||||
- flags &= ~WINED3D_BLT_DO_NOT_WAIT;
|
||||
+ src_texture = NULL;
|
||||
+ src_sub_resource_idx = 0;
|
||||
+ src_swapchain = NULL;
|
||||
}
|
||||
|
||||
if (!device->d3d_initialized)
|
||||
@@ -3832,11 +3797,6 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
goto fallback;
|
||||
}
|
||||
|
||||
- if (src_texture)
|
||||
- src_swapchain = src_texture->swapchain;
|
||||
- else
|
||||
- src_swapchain = NULL;
|
||||
-
|
||||
dst_swapchain = dst_texture->swapchain;
|
||||
|
||||
/* This isn't strictly needed. FBO blits for example could deal with
|
||||
@@ -3872,15 +3832,15 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
TRACE("Depth fill.\n");
|
||||
|
||||
if (!wined3d_format_convert_color_to_float(dst_texture->resource.format, NULL, fx->fill_color, &color))
|
||||
- return WINED3DERR_INVALIDCALL;
|
||||
+ return;
|
||||
|
||||
if (SUCCEEDED(wined3d_surface_depth_fill(dst_surface, dst_rect, color.r)))
|
||||
- return WINED3D_OK;
|
||||
+ return;
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index c3a10a2d13a..31453ed0ff8 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -4154,16 +4154,16 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
else if (SUCCEEDED(wined3d_surface_depth_blt(src_surface, src_texture->resource.draw_binding,
|
||||
src_rect, dst_surface, dst_texture->resource.draw_binding, dst_rect)))
|
||||
|
||||
- if (dst_texture->sub_resources[dst_sub_resource_idx].map_count)
|
||||
+ if (dst_texture->sub_resources[dst_sub_resource_idx].map_count ||
|
||||
+ src_texture->sub_resources[src_sub_resource_idx].map_count)
|
||||
{
|
||||
- return WINED3D_OK;
|
||||
+ return;
|
||||
- WARN("Destination sub-resource %u is mapped.\n", dst_sub_resource_idx);
|
||||
- return WINED3DERR_INVALIDCALL;
|
||||
- }
|
||||
-
|
||||
- if (src_texture->sub_resources[src_sub_resource_idx].map_count)
|
||||
- {
|
||||
- WARN("Source sub-resource %u is mapped.\n", src_sub_resource_idx);
|
||||
- return WINED3DERR_INVALIDCALL;
|
||||
+ wined3d_cs_emit_sync(dst_texture->resource.device->cs);
|
||||
+ if (dst_texture->sub_resources[dst_sub_resource_idx].map_count ||
|
||||
+ src_texture->sub_resources[src_sub_resource_idx].map_count)
|
||||
+ {
|
||||
+ WARN("Destination or source sub-resource is mapped.\n");
|
||||
+ return WINEDDERR_SURFACEBUSY;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -3916,7 +3876,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
goto fallback;
|
||||
|
||||
if (SUCCEEDED(surface_color_fill(dst_surface, dst_rect, &color)))
|
||||
- return WINED3D_OK;
|
||||
+ return;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3960,7 +3920,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
context, dst_texture->resource.draw_binding);
|
||||
context_release(context);
|
||||
}
|
||||
- return WINED3D_OK;
|
||||
+ return;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3984,7 +3944,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
wined3d_swapchain_present(dst_swapchain, NULL, NULL, dst_swapchain->win_handle, 0);
|
||||
dst_swapchain->desc.swap_effect = swap_effect;
|
||||
|
||||
- return WINED3D_OK;
|
||||
+ return;
|
||||
}
|
||||
|
||||
if (fbo_blit_supported(&device->adapter->gl_info, blit_op,
|
||||
@@ -4005,7 +3965,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
wined3d_texture_invalidate_location(dst_texture, dst_sub_resource_idx,
|
||||
~dst_texture->resource.draw_binding);
|
||||
|
||||
- return WINED3D_OK;
|
||||
+ return;
|
||||
}
|
||||
|
||||
blitter = wined3d_select_blitter(&device->adapter->gl_info, &device->adapter->d3d_info, blit_op,
|
||||
@@ -4015,7 +3975,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
{
|
||||
blitter->blit_surface(device, blit_op, filter, src_surface,
|
||||
src_rect, dst_surface, dst_rect, color_key);
|
||||
- return WINED3D_OK;
|
||||
+ return;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4023,9 +3983,73 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
fallback:
|
||||
/* Special cases for render targets. */
|
||||
if (SUCCEEDED(surface_blt_special(dst_surface, dst_rect, src_surface, src_rect, flags, fx, filter)))
|
||||
- return WINED3D_OK;
|
||||
+ return;
|
||||
|
||||
cpu:
|
||||
- return surface_cpu_blt(dst_texture, dst_sub_resource_idx, &dst_box,
|
||||
+ surface_cpu_blt(dst_texture, dst_sub_resource_idx, &dst_box,
|
||||
src_texture, src_sub_resource_idx, &src_box, flags, fx, filter);
|
||||
}
|
||||
+
|
||||
+HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst_rect,
|
||||
+ struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags,
|
||||
+ const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter)
|
||||
+{
|
||||
+ struct wined3d_texture *dst_texture = dst_surface->container;
|
||||
+ struct wined3d_device *device = dst_texture->resource.device;
|
||||
+
|
||||
+ TRACE("dst_surface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#x, fx %p, filter %s.\n",
|
||||
+ dst_surface, wine_dbgstr_rect(dst_rect), src_surface, wine_dbgstr_rect(src_rect),
|
||||
+ flags, fx, debug_d3dtexturefiltertype(filter));
|
||||
+ TRACE("Usage is %s.\n", debug_d3dusage(dst_texture->resource.usage));
|
||||
+
|
||||
+ if (fx)
|
||||
+ {
|
||||
+ TRACE("fx %#x.\n", fx->fx);
|
||||
+ TRACE("fill_color 0x%08x.\n", fx->fill_color);
|
||||
+ TRACE("dst_color_key {0x%08x, 0x%08x}.\n",
|
||||
+ fx->dst_color_key.color_space_low_value,
|
||||
+ fx->dst_color_key.color_space_high_value);
|
||||
+ TRACE("src_color_key {0x%08x, 0x%08x}.\n",
|
||||
+ fx->src_color_key.color_space_low_value,
|
||||
+ fx->src_color_key.color_space_high_value);
|
||||
+ }
|
||||
+
|
||||
+ /* FIXME: We should select the blitter in the main thread, that way we can return an error if the blit
|
||||
+ * is unsupported without duplicating all the checks... */
|
||||
+ if (flags & WINED3D_BLT_COLOR_FILL && (dst_surface->container->resource.format_flags & WINED3DFMT_FLAG_BLOCKS))
|
||||
+ {
|
||||
+ WARN("Block color fill, returning WINED3DERR_INVALIDCALL\n");
|
||||
+ return WINED3DERR_INVALIDCALL;
|
||||
+ }
|
||||
+
|
||||
+ if (!fx || !(fx->fx))
|
||||
+ flags &= ~WINED3D_BLT_FX;
|
||||
+
|
||||
+ if (flags & WINED3D_BLT_WAIT)
|
||||
+ flags &= ~WINED3D_BLT_WAIT;
|
||||
+
|
||||
+ if (flags & WINED3D_BLT_ASYNC)
|
||||
+ {
|
||||
+ static unsigned int once;
|
||||
+
|
||||
+ if (!once++)
|
||||
+ FIXME("Can't handle WINED3D_BLT_ASYNC flag.\n");
|
||||
+ flags &= ~WINED3D_BLT_ASYNC;
|
||||
+ }
|
||||
+
|
||||
+ /* WINED3D_BLT_DO_NOT_WAIT appeared in DX7. */
|
||||
+ if (flags & WINED3D_BLT_DO_NOT_WAIT)
|
||||
+ {
|
||||
+ static unsigned int once;
|
||||
+
|
||||
+ if (!once++)
|
||||
+ FIXME("Can't handle WINED3D_BLT_DO_NOT_WAIT flag.\n");
|
||||
+ flags &= ~WINED3D_BLT_DO_NOT_WAIT;
|
||||
+ }
|
||||
+
|
||||
+ TRACE("Emitting blit %p <== %p\n", dst_surface, src_surface);
|
||||
+ wined3d_cs_emit_blt(device->cs, dst_surface, dst_rect, src_surface, src_rect,
|
||||
+ flags, fx, filter);
|
||||
+
|
||||
+ return WINED3D_OK;
|
||||
+}
|
||||
if (!src_box)
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index a65367398f0..7cd69134a0c 100644
|
||||
index 60e53f55463..9d0909852cd 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -3190,8 +3190,13 @@ HRESULT CDECL wined3d_texture_blt(struct wined3d_texture *dst_texture, unsigned
|
||||
@@ -3189,8 +3189,13 @@ HRESULT CDECL wined3d_texture_blt(struct wined3d_texture *dst_texture, unsigned
|
||||
if (dst_texture->sub_resources[dst_sub_resource_idx].map_count
|
||||
|| (src_texture && src_texture->sub_resources[src_sub_resource_idx].map_count))
|
||||
{
|
||||
@@ -350,31 +60,6 @@ index a65367398f0..7cd69134a0c 100644
|
||||
}
|
||||
|
||||
if ((dst_format_flags & WINED3DFMT_FLAG_BLOCKS) && (flags & WINED3D_BLT_COLOR_FILL))
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index a3716e937a5..1c3ba4644f1 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -3067,6 +3067,9 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
|
||||
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;
|
||||
+void surface_blt_ugly(struct wined3d_surface *dst_surface, const RECT *dst_rect_in,
|
||||
+ struct wined3d_surface *src_surface, const RECT *src_rect_in, DWORD flags,
|
||||
+ const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
|
||||
|
||||
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;
|
||||
@@ -3218,6 +3221,10 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device) DECLSPEC_HID
|
||||
void wined3d_cs_destroy(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_destroy_object(struct wined3d_cs *cs,
|
||||
void (*callback)(void *object), void *object) DECLSPEC_HIDDEN;
|
||||
+void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surface,
|
||||
+ const RECT *dst_rect, struct wined3d_surface *src_surface,
|
||||
+ const RECT *src_rect, DWORD flags, const struct wined3d_blt_fx *fx,
|
||||
+ enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *rects,
|
||||
DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_dispatch(struct wined3d_cs *cs,
|
||||
--
|
||||
2.11.0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From da8e396548580773fb77f92c866163693dd576e5 Mon Sep 17 00:00:00 2001
|
||||
From b880794502fe7d805e3f49b61c8a8b6664cbd187 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Thu, 4 Jul 2013 21:10:16 +0200
|
||||
Subject: wined3d: Send render target view clears through the command stream
|
||||
@@ -24,19 +24,19 @@ index 8e5be756654..88e0e44c4d3 100644
|
||||
* supported as offscreen plain surfaces and do not support D3DUSAGE_RENDERTARGET
|
||||
* when created as texture. */
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index f2eb87e35b8..c38bbbd2754 100644
|
||||
index bf1b63b897b..b8c99985af4 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -68,6 +68,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_BLT_SUB_RESOURCE,
|
||||
WINED3D_CS_OP_UPDATE_SUB_RESOURCE,
|
||||
WINED3D_CS_OP_PUSH_CONSTANTS,
|
||||
WINED3D_CS_OP_BLT,
|
||||
+ WINED3D_CS_OP_CLEAR_RTV,
|
||||
};
|
||||
|
||||
struct wined3d_cs_sync
|
||||
@@ -389,6 +390,18 @@ struct wined3d_cs_blt
|
||||
enum wined3d_texture_filter_type filter;
|
||||
@@ -391,6 +392,18 @@ struct wined3d_cs_push_constants
|
||||
BYTE constants[1];
|
||||
};
|
||||
|
||||
+struct wined3d_cs_clear_rtv
|
||||
@@ -54,7 +54,7 @@ index f2eb87e35b8..c38bbbd2754 100644
|
||||
static void wined3d_cs_exec_sync(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
}
|
||||
@@ -1908,6 +1921,41 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
|
||||
@@ -1940,6 +1953,41 @@ void wined3d_cs_emit_push_constants(struct wined3d_cs *cs, enum wined3d_push_con
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@@ -96,19 +96,19 @@ index f2eb87e35b8..c38bbbd2754 100644
|
||||
static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_SYNC */ wined3d_cs_exec_sync,
|
||||
@@ -1952,6 +2000,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -1984,6 +2032,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_BLT_SUB_RESOURCE */ wined3d_cs_exec_blt_sub_resource,
|
||||
/* WINED3D_CS_OP_UPDATE_SUB_RESOURCE */ wined3d_cs_exec_update_sub_resource,
|
||||
/* WINED3D_CS_OP_PUSH_CONSTANTS */ wined3d_cs_exec_push_constants,
|
||||
/* WINED3D_CS_OP_BLT */ wined3d_cs_exec_blt,
|
||||
+ /* WINED3D_CS_OP_CLEAR_RTV */ wined3d_cs_exec_clear_rtv,
|
||||
};
|
||||
|
||||
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 a06cae6412e..0e491b3b8cd 100644
|
||||
index c3a10a2d13a..728e5570777 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -4246,10 +4246,8 @@ HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *devi
|
||||
@@ -4320,10 +4320,8 @@ HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *devi
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@@ -122,11 +122,11 @@ index a06cae6412e..0e491b3b8cd 100644
|
||||
|
||||
struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(const struct wined3d_device *device,
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 1c3ba4644f1..6fbfa5d9c9c 100644
|
||||
index 8a07bb98523..f69cead4d1c 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -3227,6 +3227,9 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
|
||||
enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
|
||||
@@ -3225,6 +3225,9 @@ void wined3d_cs_emit_blt_sub_resource(struct wined3d_cs *cs, struct wined3d_reso
|
||||
const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *rects,
|
||||
DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil) DECLSPEC_HIDDEN;
|
||||
+void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarget_view *view,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From ae3267b2c9b77715d189c233472c870a0f55d41b Mon Sep 17 00:00:00 2001
|
||||
From 8f9e2da3bc48abffee005b95c2b996352db2de16 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Thu, 1 Aug 2013 00:33:48 +0200
|
||||
Subject: wined3d: Send update_texture calls through the CS
|
||||
@@ -11,18 +11,18 @@ FIXME: This logic duplication is ugly.
|
||||
3 files changed, 141 insertions(+), 75 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index c38bbbd2754..47678602fed 100644
|
||||
index b8c99985af4..bbea6bbb454 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -69,6 +69,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_UPDATE_SUB_RESOURCE,
|
||||
WINED3D_CS_OP_PUSH_CONSTANTS,
|
||||
WINED3D_CS_OP_BLT,
|
||||
WINED3D_CS_OP_CLEAR_RTV,
|
||||
+ WINED3D_CS_OP_UPDATE_TEXTURE,
|
||||
};
|
||||
|
||||
struct wined3d_cs_sync
|
||||
@@ -402,6 +403,12 @@ struct wined3d_cs_clear_rtv
|
||||
@@ -404,6 +405,12 @@ struct wined3d_cs_clear_rtv
|
||||
const struct blit_shader *blitter;
|
||||
};
|
||||
|
||||
@@ -35,7 +35,7 @@ index c38bbbd2754..47678602fed 100644
|
||||
static void wined3d_cs_exec_sync(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
}
|
||||
@@ -1956,6 +1963,35 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
|
||||
@@ -1988,6 +1995,35 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@@ -71,19 +71,19 @@ index c38bbbd2754..47678602fed 100644
|
||||
static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_SYNC */ wined3d_cs_exec_sync,
|
||||
@@ -2001,6 +2037,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -2033,6 +2069,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_UPDATE_SUB_RESOURCE */ wined3d_cs_exec_update_sub_resource,
|
||||
/* WINED3D_CS_OP_PUSH_CONSTANTS */ wined3d_cs_exec_push_constants,
|
||||
/* WINED3D_CS_OP_BLT */ wined3d_cs_exec_blt,
|
||||
/* WINED3D_CS_OP_CLEAR_RTV */ wined3d_cs_exec_clear_rtv,
|
||||
+ /* WINED3D_CS_OP_UPDATE_TEXTURE */ wined3d_cs_exec_update_texture,
|
||||
};
|
||||
|
||||
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 2fdfd944b7e..d244091782f 100644
|
||||
index 364eac4411e..d0e1fe6e9d7 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -3627,34 +3627,17 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device
|
||||
@@ -3659,34 +3659,17 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device
|
||||
start_idx, index_count, start_instance, instance_count, TRUE);
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ index 2fdfd944b7e..d244091782f 100644
|
||||
|
||||
/* Only a prepare, since we're uploading entire volumes. */
|
||||
wined3d_texture_prepare_texture(dst_texture, context, FALSE);
|
||||
@@ -3662,32 +3645,89 @@ static HRESULT wined3d_device_update_texture_3d(struct wined3d_device *device,
|
||||
@@ -3694,32 +3677,89 @@ static HRESULT wined3d_device_update_texture_3d(struct wined3d_device *device,
|
||||
|
||||
for (i = 0; i < level_count; ++i)
|
||||
{
|
||||
@@ -222,7 +222,7 @@ index 2fdfd944b7e..d244091782f 100644
|
||||
|
||||
TRACE("device %p, src_texture %p, dst_texture %p.\n", device, src_texture, dst_texture);
|
||||
|
||||
@@ -3724,63 +3764,48 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
|
||||
@@ -3756,63 +3796,48 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@@ -316,10 +316,10 @@ index 2fdfd944b7e..d244091782f 100644
|
||||
|
||||
HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device, DWORD *num_passes)
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 6fbfa5d9c9c..5b68475945d 100644
|
||||
index f69cead4d1c..fcefe12d226 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2702,6 +2702,8 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
|
||||
@@ -2703,6 +2703,8 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
|
||||
void device_resource_add(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
void device_resource_released(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
void device_invalidate_state(const struct wined3d_device *device, DWORD state) DECLSPEC_HIDDEN;
|
||||
@@ -328,7 +328,7 @@ index 6fbfa5d9c9c..5b68475945d 100644
|
||||
|
||||
static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD state)
|
||||
{
|
||||
@@ -3294,6 +3296,8 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou
|
||||
@@ -3292,6 +3294,8 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou
|
||||
void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||
unsigned int sub_resource_idx, const struct wined3d_box *box, const void *data, unsigned int row_pitch,
|
||||
unsigned int slice_pitch) DECLSPEC_HIDDEN;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 41decdb7669a8e83c5c6a244b50822d93ad8d1db Mon Sep 17 00:00:00 2001
|
||||
From cdbc30321bd78951ffc6e2deaca50b1414ff7abe Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Sun, 16 Mar 2014 14:13:42 +0100
|
||||
Subject: wined3d: Send getdc and releasedc through the command stream.
|
||||
@@ -11,11 +11,11 @@ Another hacky patch to avoid using GL outside the worker thread.
|
||||
3 files changed, 119 insertions(+), 29 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 47678602fed..735991db6e2 100644
|
||||
index bbea6bbb454..2a3a984088d 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -70,6 +70,8 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_BLT,
|
||||
WINED3D_CS_OP_PUSH_CONSTANTS,
|
||||
WINED3D_CS_OP_CLEAR_RTV,
|
||||
WINED3D_CS_OP_UPDATE_TEXTURE,
|
||||
+ WINED3D_CS_OP_GET_DC,
|
||||
@@ -23,7 +23,7 @@ index 47678602fed..735991db6e2 100644
|
||||
};
|
||||
|
||||
struct wined3d_cs_sync
|
||||
@@ -409,6 +411,14 @@ struct wined3d_cs_update_texture
|
||||
@@ -411,6 +413,14 @@ struct wined3d_cs_update_texture
|
||||
struct wined3d_texture *src, *dst;
|
||||
};
|
||||
|
||||
@@ -38,7 +38,7 @@ index 47678602fed..735991db6e2 100644
|
||||
static void wined3d_cs_exec_sync(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
}
|
||||
@@ -1992,6 +2002,54 @@ void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_textur
|
||||
@@ -2024,6 +2034,54 @@ void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_textur
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@@ -93,8 +93,8 @@ index 47678602fed..735991db6e2 100644
|
||||
static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_SYNC */ wined3d_cs_exec_sync,
|
||||
@@ -2038,6 +2096,8 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_BLT */ wined3d_cs_exec_blt,
|
||||
@@ -2070,6 +2128,8 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_PUSH_CONSTANTS */ wined3d_cs_exec_push_constants,
|
||||
/* WINED3D_CS_OP_CLEAR_RTV */ wined3d_cs_exec_clear_rtv,
|
||||
/* WINED3D_CS_OP_UPDATE_TEXTURE */ wined3d_cs_exec_update_texture,
|
||||
+ /* WINED3D_CS_OP_GET_DC */ wined3d_cs_exec_get_dc,
|
||||
@@ -103,10 +103,10 @@ index 47678602fed..735991db6e2 100644
|
||||
|
||||
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index 378ce476ca0..5c9cadef95a 100644
|
||||
index 60e53f55463..b692c504501 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -3473,13 +3473,41 @@ HRESULT CDECL wined3d_texture_create(struct wined3d_device *device, const struct
|
||||
@@ -3509,13 +3509,41 @@ HRESULT CDECL wined3d_texture_create(struct wined3d_device *device, const struct
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ index 378ce476ca0..5c9cadef95a 100644
|
||||
|
||||
TRACE("texture %p, sub_resource_idx %u, dc %p.\n", texture, sub_resource_idx, dc);
|
||||
|
||||
@@ -3504,28 +3532,32 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i
|
||||
@@ -3540,28 +3568,32 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i
|
||||
if (texture->resource.map_count && !(texture->flags & WINED3D_TEXTURE_GET_DC_LENIENT))
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
|
||||
@@ -200,7 +200,7 @@ index 378ce476ca0..5c9cadef95a 100644
|
||||
}
|
||||
|
||||
HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsigned int sub_resource_idx, HDC dc)
|
||||
@@ -3556,14 +3588,5 @@ HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsign
|
||||
@@ -3592,14 +3624,5 @@ HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsign
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@@ -217,10 +217,10 @@ index 378ce476ca0..5c9cadef95a 100644
|
||||
+ return wined3d_cs_emit_release_dc(device->cs, texture, sub_resource_idx);
|
||||
}
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 5b68475945d..0d85fadec75 100644
|
||||
index fcefe12d226..6373ee3df67 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2947,6 +2947,7 @@ void wined3d_texture_bind_and_dirtify(struct wined3d_texture *texture,
|
||||
@@ -2948,6 +2948,7 @@ void wined3d_texture_bind_and_dirtify(struct wined3d_texture *texture,
|
||||
struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN;
|
||||
HRESULT wined3d_texture_check_box_dimensions(const struct wined3d_texture *texture,
|
||||
unsigned int level, const struct wined3d_box *box) DECLSPEC_HIDDEN;
|
||||
@@ -228,7 +228,7 @@ index 5b68475945d..0d85fadec75 100644
|
||||
GLenum wined3d_texture_get_gl_buffer(const struct wined3d_texture *texture) DECLSPEC_HIDDEN;
|
||||
void wined3d_texture_get_memory(struct wined3d_texture *texture, unsigned int sub_resource_idx,
|
||||
struct wined3d_bo_address *data, DWORD locations) DECLSPEC_HIDDEN;
|
||||
@@ -2962,6 +2963,8 @@ BOOL wined3d_texture_prepare_location(struct wined3d_texture *texture, unsigned
|
||||
@@ -2963,6 +2964,8 @@ BOOL wined3d_texture_prepare_location(struct wined3d_texture *texture, unsigned
|
||||
struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
|
||||
void wined3d_texture_prepare_texture(struct wined3d_texture *texture,
|
||||
struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN;
|
||||
@@ -237,7 +237,7 @@ index 5b68475945d..0d85fadec75 100644
|
||||
void wined3d_texture_set_map_binding(struct wined3d_texture *texture, DWORD map_binding) DECLSPEC_HIDDEN;
|
||||
void wined3d_texture_set_swapchain(struct wined3d_texture *texture,
|
||||
struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
|
||||
@@ -3237,6 +3240,8 @@ void wined3d_cs_emit_dispatch(struct wined3d_cs *cs,
|
||||
@@ -3235,6 +3238,8 @@ void wined3d_cs_emit_dispatch(struct wined3d_cs *cs,
|
||||
void wined3d_cs_emit_draw(struct wined3d_cs *cs, GLenum primitive_type, int base_vertex_idx,
|
||||
unsigned int start_idx, unsigned int index_count, unsigned int start_instance,
|
||||
unsigned int instance_count, BOOL indexed) DECLSPEC_HIDDEN;
|
||||
@@ -246,7 +246,7 @@ index 5b68475945d..0d85fadec75 100644
|
||||
void wined3d_cs_emit_glfinish(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *swapchain,
|
||||
@@ -3244,6 +3249,8 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
|
||||
@@ -3242,6 +3247,8 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
|
||||
void wined3d_cs_emit_push_constants(struct wined3d_cs *cs, enum wined3d_push_constants p,
|
||||
unsigned int start_idx, unsigned int count, const void *constants) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *query, DWORD flags) DECLSPEC_HIDDEN;
|
||||
|
||||
@@ -1,132 +0,0 @@
|
||||
From 3bf5f63ec62c705afb14d485df3e2d0bd799d7dd Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Tue, 7 Feb 2017 14:37:07 +0100
|
||||
Subject: wined3d: Send buffer copy requests through CS.
|
||||
|
||||
---
|
||||
dlls/wined3d/cs.c | 44 ++++++++++++++++++++++++++++++++++++++++++
|
||||
dlls/wined3d/device.c | 8 ++++----
|
||||
dlls/wined3d/wined3d_private.h | 3 +++
|
||||
3 files changed, 51 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index be7e041b86c..51ac0c2b000 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -75,6 +75,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_RELEASE_DC,
|
||||
WINED3D_CS_OP_UPDATE_SWAP_INTERVAL,
|
||||
WINED3D_CS_OP_TEXTURE_ADD_DIRTY_REGION,
|
||||
+ WINED3D_CS_OP_BUFFER_COPY,
|
||||
};
|
||||
|
||||
struct wined3d_cs_sync
|
||||
@@ -443,6 +444,16 @@ struct wined3d_cs_texture_add_dirty_region
|
||||
unsigned int sub_resource_idx;
|
||||
};
|
||||
|
||||
+struct wined3d_cs_buffer_copy
|
||||
+{
|
||||
+ enum wined3d_cs_op opcode;
|
||||
+ struct wined3d_buffer *dst_buffer;
|
||||
+ unsigned int dst_offset;
|
||||
+ struct wined3d_buffer *src_buffer;
|
||||
+ unsigned int src_offset;
|
||||
+ unsigned int size;
|
||||
+};
|
||||
+
|
||||
static void wined3d_cs_exec_sync(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
}
|
||||
@@ -2150,6 +2161,38 @@ void wined3d_cs_emit_texture_add_dirty_region(struct wined3d_cs *cs,
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
+static void wined3d_cs_exec_buffer_copy(struct wined3d_cs *cs, const void *data)
|
||||
+{
|
||||
+ const struct wined3d_cs_buffer_copy *op = data;
|
||||
+ HRESULT hr;
|
||||
+
|
||||
+ if (FAILED(hr = wined3d_buffer_copy(op->dst_buffer, op->dst_offset, op->src_buffer, op->src_offset, op->size)))
|
||||
+ ERR("Failed to copy buffer, hr %#x.\n", hr);
|
||||
+
|
||||
+ wined3d_resource_release(&op->dst_buffer->resource);
|
||||
+ wined3d_resource_release(&op->src_buffer->resource);
|
||||
+}
|
||||
+
|
||||
+void wined3d_cs_emit_buffer_copy(struct wined3d_cs *cs, struct wined3d_buffer *dst_buffer,
|
||||
+ unsigned int dst_offset, struct wined3d_buffer *src_buffer, unsigned int src_offset,
|
||||
+ unsigned int size)
|
||||
+{
|
||||
+ struct wined3d_cs_buffer_copy *op;
|
||||
+
|
||||
+ op = cs->ops->require_space(cs, sizeof(*op));
|
||||
+ op->opcode = WINED3D_CS_OP_BUFFER_COPY;
|
||||
+ op->dst_buffer = dst_buffer;
|
||||
+ op->dst_offset = dst_offset;
|
||||
+ op->src_buffer = src_buffer;
|
||||
+ op->src_offset = src_offset;
|
||||
+ op->size = size;
|
||||
+
|
||||
+ wined3d_resource_acquire(&dst_buffer->resource);
|
||||
+ wined3d_resource_acquire(&src_buffer->resource);
|
||||
+
|
||||
+ cs->ops->submit(cs);
|
||||
+}
|
||||
+
|
||||
static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_SYNC */ wined3d_cs_exec_sync,
|
||||
@@ -2201,6 +2244,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_RELEASE_DC */ wined3d_cs_exec_release_dc,
|
||||
/* WINED3D_CS_OP_UPDATE_SWAP_INTERVAL */ wined3d_cs_exec_update_swap_interval,
|
||||
/* WINED3D_CS_OP_TEXTURE_ADD_DIRTY_REGION */ wined3d_cs_exec_texture_add_dirty_region,
|
||||
+ /* WINED3D_CS_OP_BUFFER_COPY */ wined3d_cs_exec_buffer_copy,
|
||||
};
|
||||
|
||||
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 749ba9ca19c..a8ca7cbaf56 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -3991,10 +3991,9 @@ void CDECL wined3d_device_copy_resource(struct wined3d_device *device,
|
||||
|
||||
if (dst_resource->type == WINED3D_RTYPE_BUFFER)
|
||||
{
|
||||
- if (FAILED(hr = wined3d_buffer_copy(buffer_from_resource(dst_resource), 0,
|
||||
+ wined3d_cs_emit_buffer_copy(device->cs, buffer_from_resource(dst_resource), 0,
|
||||
buffer_from_resource(src_resource), 0,
|
||||
- dst_resource->size)))
|
||||
- ERR("Failed to copy buffer, hr %#x.\n", hr);
|
||||
+ dst_resource->size);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -4116,8 +4115,9 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
- return wined3d_buffer_copy(buffer_from_resource(dst_resource), dst_x,
|
||||
+ wined3d_cs_emit_buffer_copy(device->cs, buffer_from_resource(dst_resource), dst_x,
|
||||
buffer_from_resource(src_resource), src_offset, size);
|
||||
+ return WINED3D_OK;
|
||||
}
|
||||
|
||||
if (dst_resource->type != WINED3D_RTYPE_TEXTURE_2D)
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index d45c45c09dc..708091f573b 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -3239,6 +3239,9 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
|
||||
const RECT *dst_rect, struct wined3d_surface *src_surface,
|
||||
const RECT *src_rect, DWORD flags, const struct wined3d_blt_fx *fx,
|
||||
enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
|
||||
+void wined3d_cs_emit_buffer_copy(struct wined3d_cs *cs, struct wined3d_buffer *dst_buffer,
|
||||
+ unsigned int dst_offset, struct wined3d_buffer *src_buffer, unsigned int src_offset,
|
||||
+ unsigned int size) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *rects,
|
||||
DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarget_view *view,
|
||||
--
|
||||
2.11.0
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
From 66849c6928010aa02b9d9d049fcc43c5a3823b0c Mon Sep 17 00:00:00 2001
|
||||
From ec94556fda1517b698ed180ebd06f20bf59d2438 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Wed, 8 Feb 2017 12:32:55 +0100
|
||||
Subject: wined3d: Do not immediately submit stateblock updates.
|
||||
@@ -9,10 +9,10 @@ Subject: wined3d: Do not immediately submit stateblock updates.
|
||||
2 files changed, 36 insertions(+), 28 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 705d30b2879..25f833dfdce 100644
|
||||
index 75907ff6146..ffea25e50c0 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -882,7 +882,7 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query
|
||||
@@ -856,7 +856,7 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query
|
||||
op->predicate = predicate;
|
||||
op->value = value;
|
||||
|
||||
@@ -21,7 +21,7 @@ index 705d30b2879..25f833dfdce 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_viewport(struct wined3d_cs *cs, const void *data)
|
||||
@@ -903,7 +903,7 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
|
||||
@@ -877,7 +877,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;
|
||||
|
||||
@@ -30,7 +30,7 @@ index 705d30b2879..25f833dfdce 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_scissor_rect(struct wined3d_cs *cs, const void *data)
|
||||
@@ -924,7 +924,7 @@ void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
|
||||
@@ -898,7 +898,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;
|
||||
|
||||
@@ -39,7 +39,7 @@ index 705d30b2879..25f833dfdce 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_rendertarget_view(struct wined3d_cs *cs, const void *data)
|
||||
@@ -947,7 +947,7 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
|
||||
@@ -921,7 +921,7 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
|
||||
op->view_idx = view_idx;
|
||||
op->view = view;
|
||||
|
||||
@@ -48,7 +48,7 @@ index 705d30b2879..25f833dfdce 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const void *data)
|
||||
@@ -997,7 +997,7 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3
|
||||
@@ -971,7 +971,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;
|
||||
|
||||
@@ -57,7 +57,7 @@ index 705d30b2879..25f833dfdce 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_vertex_declaration(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1018,7 +1018,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
|
||||
@@ -992,7 +992,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;
|
||||
|
||||
@@ -66,7 +66,7 @@ index 705d30b2879..25f833dfdce 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_stream_source(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1055,7 +1055,7 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -1029,7 +1029,7 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
|
||||
op->offset = offset;
|
||||
op->stride = stride;
|
||||
|
||||
@@ -75,7 +75,7 @@ index 705d30b2879..25f833dfdce 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_stream_source_freq(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1082,7 +1082,7 @@ void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_i
|
||||
@@ -1056,7 +1056,7 @@ void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_i
|
||||
op->frequency = frequency;
|
||||
op->flags = flags;
|
||||
|
||||
@@ -84,7 +84,7 @@ index 705d30b2879..25f833dfdce 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_stream_output(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1115,7 +1115,7 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -1089,7 +1089,7 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
|
||||
op->buffer = buffer;
|
||||
op->offset = offset;
|
||||
|
||||
@@ -93,7 +93,7 @@ index 705d30b2879..25f833dfdce 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_index_buffer(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1149,7 +1149,7 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
|
||||
@@ -1123,7 +1123,7 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
|
||||
op->format_id = format_id;
|
||||
op->offset = offset;
|
||||
|
||||
@@ -102,7 +102,7 @@ index 705d30b2879..25f833dfdce 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_constant_buffer(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1180,7 +1180,7 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
|
||||
@@ -1154,7 +1154,7 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
|
||||
op->cb_idx = cb_idx;
|
||||
op->buffer = buffer;
|
||||
|
||||
@@ -111,7 +111,7 @@ index 705d30b2879..25f833dfdce 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_texture(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1273,7 +1273,7 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
|
||||
@@ -1247,7 +1247,7 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
|
||||
op->stage = stage;
|
||||
op->texture = texture;
|
||||
|
||||
@@ -120,7 +120,7 @@ index 705d30b2879..25f833dfdce 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_shader_resource_view(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1308,7 +1308,7 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
|
||||
@@ -1282,7 +1282,7 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
|
||||
op->view_idx = view_idx;
|
||||
op->view = view;
|
||||
|
||||
@@ -129,7 +129,7 @@ index 705d30b2879..25f833dfdce 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_unordered_access_view(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1340,7 +1340,7 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
|
||||
@@ -1314,7 +1314,7 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
|
||||
op->view_idx = view_idx;
|
||||
op->view = view;
|
||||
|
||||
@@ -138,7 +138,7 @@ index 705d30b2879..25f833dfdce 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_sampler(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1367,7 +1367,7 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
@@ -1341,7 +1341,7 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
op->sampler_idx = sampler_idx;
|
||||
op->sampler = sampler;
|
||||
|
||||
@@ -147,7 +147,7 @@ index 705d30b2879..25f833dfdce 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_shader(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1393,7 +1393,7 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
@@ -1367,7 +1367,7 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
op->type = type;
|
||||
op->shader = shader;
|
||||
|
||||
@@ -156,7 +156,7 @@ index 705d30b2879..25f833dfdce 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_rasterizer_state(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1415,7 +1415,7 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
|
||||
@@ -1389,7 +1389,7 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
|
||||
op->opcode = WINED3D_CS_OP_SET_RASTERIZER_STATE;
|
||||
op->state = rasterizer_state;
|
||||
|
||||
@@ -165,7 +165,7 @@ index 705d30b2879..25f833dfdce 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_render_state(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1437,7 +1437,7 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
|
||||
@@ -1411,7 +1411,7 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
|
||||
op->state = state;
|
||||
op->value = value;
|
||||
|
||||
@@ -174,7 +174,7 @@ index 705d30b2879..25f833dfdce 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_texture_state(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1461,7 +1461,7 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
|
||||
@@ -1435,7 +1435,7 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
|
||||
op->state = state;
|
||||
op->value = value;
|
||||
|
||||
@@ -183,7 +183,7 @@ index 705d30b2879..25f833dfdce 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_sampler_state(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1485,7 +1485,7 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
|
||||
@@ -1459,7 +1459,7 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
|
||||
op->state = state;
|
||||
op->value = value;
|
||||
|
||||
@@ -192,7 +192,7 @@ index 705d30b2879..25f833dfdce 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_transform(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1509,7 +1509,7 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
|
||||
@@ -1483,7 +1483,7 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
|
||||
op->state = state;
|
||||
op->matrix = *matrix;
|
||||
|
||||
@@ -201,7 +201,7 @@ index 705d30b2879..25f833dfdce 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_clip_plane(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1531,7 +1531,7 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
|
||||
@@ -1505,7 +1505,7 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
|
||||
op->plane_idx = plane_idx;
|
||||
op->plane = *plane;
|
||||
|
||||
@@ -210,7 +210,7 @@ index 705d30b2879..25f833dfdce 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1616,7 +1616,7 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
|
||||
@@ -1590,7 +1590,7 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
|
||||
else
|
||||
op->set = 0;
|
||||
|
||||
@@ -219,7 +219,7 @@ index 705d30b2879..25f833dfdce 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_material(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1637,7 +1637,7 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
|
||||
@@ -1611,7 +1611,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;
|
||||
|
||||
@@ -228,7 +228,7 @@ index 705d30b2879..25f833dfdce 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_light(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1687,7 +1687,7 @@ void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light
|
||||
@@ -1661,7 +1661,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;
|
||||
|
||||
@@ -237,7 +237,7 @@ index 705d30b2879..25f833dfdce 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_light_enable(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1723,7 +1723,7 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, unsigned int idx, B
|
||||
@@ -1697,7 +1697,7 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, unsigned int idx, B
|
||||
op->idx = idx;
|
||||
op->enable = enable;
|
||||
|
||||
@@ -246,7 +246,7 @@ index 705d30b2879..25f833dfdce 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1745,7 +1745,7 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
@@ -1719,7 +1719,7 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
op = cs->ops->require_space(cs, sizeof(*op), 0);
|
||||
op->opcode = WINED3D_CS_OP_RESET_STATE;
|
||||
|
||||
@@ -255,7 +255,7 @@ index 705d30b2879..25f833dfdce 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_callback(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1994,7 +1994,7 @@ void wined3d_cs_emit_push_constants(struct wined3d_cs *cs, enum wined3d_push_con
|
||||
@@ -2111,7 +2111,7 @@ void wined3d_cs_emit_push_constants(struct wined3d_cs *cs, enum wined3d_push_con
|
||||
op->count = count;
|
||||
memcpy(op->constants, constants, count * push_constant_info[p].size);
|
||||
|
||||
@@ -263,8 +263,8 @@ index 705d30b2879..25f833dfdce 100644
|
||||
+ cs->ops->submit_delayed(cs);
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_blt(struct wined3d_cs *cs, const void *data)
|
||||
@@ -2514,6 +2514,7 @@ static const struct wined3d_cs_ops wined3d_cs_st_ops =
|
||||
static UINT wined3d_cs_exec_clear_rtv(struct wined3d_cs *cs, const void *data)
|
||||
@@ -2397,6 +2397,7 @@ static const struct wined3d_cs_ops wined3d_cs_st_ops =
|
||||
wined3d_cs_st_require_space,
|
||||
wined3d_cs_st_submit,
|
||||
wined3d_cs_st_submit,
|
||||
@@ -272,7 +272,7 @@ index 705d30b2879..25f833dfdce 100644
|
||||
};
|
||||
|
||||
static void wined3d_cs_list_enqueue(struct wined3d_cs_list *list, struct wined3d_cs_block *block)
|
||||
@@ -2690,11 +2691,17 @@ static void wined3d_cs_mt_submit_and_wait(struct wined3d_cs *cs)
|
||||
@@ -2573,11 +2574,17 @@ static void wined3d_cs_mt_submit_and_wait(struct wined3d_cs *cs)
|
||||
while (!InterlockedCompareExchange(&fence, TRUE, TRUE));
|
||||
}
|
||||
|
||||
@@ -291,10 +291,10 @@ index 705d30b2879..25f833dfdce 100644
|
||||
|
||||
static void wined3d_cs_mt_emit_stop(struct wined3d_cs *cs)
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index e71dfbb2ca8..b8c14275406 100644
|
||||
index 893768527b1..367e17fb7a7 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -3216,6 +3216,7 @@ struct wined3d_cs_ops
|
||||
@@ -3231,6 +3231,7 @@ struct wined3d_cs_ops
|
||||
void *(*require_space)(struct wined3d_cs *cs, size_t size, int priority);
|
||||
void (*submit)(struct wined3d_cs *cs);
|
||||
void (*submit_and_wait)(struct wined3d_cs *cs);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user