mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
Rebase against 6a05069a43f1a8f0e69c4cedd134f8d7400b8a95.
This commit is contained in:
parent
a56b7a18c3
commit
76b749edc9
@ -52,7 +52,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "a5031391f40c6196b9baccbf69f5ccbe3b59e17c"
|
||||
echo "6a05069a43f1a8f0e69c4cedd134f8d7400b8a95"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
@ -8498,10 +8498,8 @@ if test "$enable_wined3d_CSMT_Main" -eq 1; then
|
||||
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Send render target view clears through the command stream.", 1 },';
|
||||
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Get rid of the end_scene flush and finish.", 1 },';
|
||||
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Send update_texture calls through the CS.", 1 },';
|
||||
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Send getdc and releasedc through the command stream.", 1 },';
|
||||
printf '%s\n' '+ { "Sebastian Lackner", "wined3d: Send query_poll through the command stream.", 1 },';
|
||||
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Update the swap interval through the CS in reset.", 1 },';
|
||||
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Create initial DCs through the CS.", 1 },';
|
||||
printf '%s\n' '+ { "Nils Kuhnhenn", "wined3d: Fix context_acquire not being called from the command thread in wined3d_texture_add_dirty_region.", 1 },';
|
||||
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Wrap GL BOs in a structure.", 1 },';
|
||||
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Avoid destroying views in color and depth fills.", 1 },';
|
||||
@ -8515,7 +8513,6 @@ if test "$enable_wined3d_CSMT_Main" -eq 1; then
|
||||
printf '%s\n' '+ { "Sebastian Lackner", "wined3d: Use priority queue for query polls.", 1 },';
|
||||
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Don'\''t call glFinish before swapping.", 1 },';
|
||||
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Use an event to block the worker thread when it is idle.", 1 },';
|
||||
printf '%s\n' '+ { "Sebastian Lackner", "wined3d: Use priority queue for get_dc / release_dc.", 1 },';
|
||||
printf '%s\n' '+ { "Sebastian Lackner", "wined3d: Do not immediately submit stateblock updates.", 1 },';
|
||||
printf '%s\n' '+ { "Sebastian Lackner", "wined3d: Use priority queue for update_sub_resource.", 1 },';
|
||||
printf '%s\n' '+ { "Michael Müller", "wined3d: Use spin lock for cs list critical sections.", 1 },';
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 94dd5e43f248b35ad24938fbf7422fd455f5185d Mon Sep 17 00:00:00 2001
|
||||
From d8e7bb3cf2730686403c387bb3ed9b79e513294f Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sun, 19 Feb 2017 00:57:12 +0100
|
||||
Subject: wined3d: Add additional synchronization CS ops.
|
||||
@ -7,12 +7,13 @@ Subject: wined3d: Add additional synchronization CS ops.
|
||||
dlls/wined3d/cs.c | 53 +++++++++++++++++++++++++++++++++++++++---
|
||||
dlls/wined3d/device.c | 2 ++
|
||||
dlls/wined3d/swapchain.c | 2 ++
|
||||
dlls/wined3d/texture.c | 11 +++++++++
|
||||
dlls/wined3d/view.c | 6 +++++
|
||||
dlls/wined3d/wined3d_private.h | 3 +++
|
||||
5 files changed, 63 insertions(+), 3 deletions(-)
|
||||
6 files changed, 74 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 39071faef32..543528ae570 100644
|
||||
index f5bf70d2ee..8c0abf449f 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -26,6 +26,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d);
|
||||
@ -24,7 +25,7 @@ index 39071faef32..543528ae570 100644
|
||||
WINED3D_CS_OP_PRESENT,
|
||||
WINED3D_CS_OP_CLEAR,
|
||||
WINED3D_CS_OP_DISPATCH,
|
||||
@@ -66,6 +68,16 @@ enum wined3d_cs_op
|
||||
@@ -67,6 +69,16 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_UPDATE_SUB_RESOURCE,
|
||||
};
|
||||
|
||||
@ -41,7 +42,7 @@ index 39071faef32..543528ae570 100644
|
||||
struct wined3d_cs_present
|
||||
{
|
||||
enum wined3d_cs_op opcode;
|
||||
@@ -354,6 +366,38 @@ struct wined3d_cs_update_sub_resource
|
||||
@@ -369,6 +381,38 @@ struct wined3d_cs_update_sub_resource
|
||||
struct wined3d_sub_resource_data data;
|
||||
};
|
||||
|
||||
@ -80,7 +81,7 @@ index 39071faef32..543528ae570 100644
|
||||
static void wined3d_cs_exec_present(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
const struct wined3d_cs_present *op = data;
|
||||
@@ -1628,7 +1672,7 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||
@@ -1643,7 +1687,7 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||
op->flags = flags;
|
||||
op->hr = &hr;
|
||||
|
||||
@ -89,7 +90,7 @@ index 39071faef32..543528ae570 100644
|
||||
|
||||
return hr;
|
||||
}
|
||||
@@ -1652,7 +1696,7 @@ HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resourc
|
||||
@@ -1667,7 +1711,7 @@ HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resourc
|
||||
op->sub_resource_idx = sub_resource_idx;
|
||||
op->hr = &hr;
|
||||
|
||||
@ -98,7 +99,7 @@ index 39071faef32..543528ae570 100644
|
||||
|
||||
return hr;
|
||||
}
|
||||
@@ -1726,11 +1770,13 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
|
||||
@@ -1809,11 +1853,13 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
|
||||
|
||||
wined3d_resource_acquire(resource);
|
||||
|
||||
@ -113,7 +114,7 @@ index 39071faef32..543528ae570 100644
|
||||
/* WINED3D_CS_OP_PRESENT */ wined3d_cs_exec_present,
|
||||
/* WINED3D_CS_OP_CLEAR */ wined3d_cs_exec_clear,
|
||||
/* WINED3D_CS_OP_DISPATCH */ wined3d_cs_exec_dispatch,
|
||||
@@ -1862,6 +1908,7 @@ static const struct wined3d_cs_ops wined3d_cs_st_ops =
|
||||
@@ -1946,6 +1992,7 @@ static const struct wined3d_cs_ops wined3d_cs_st_ops =
|
||||
{
|
||||
wined3d_cs_st_require_space,
|
||||
wined3d_cs_st_submit,
|
||||
@ -122,10 +123,10 @@ index 39071faef32..543528ae570 100644
|
||||
};
|
||||
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 0baf7f1b7cc..ea27553e8c8 100644
|
||||
index 94879b5de1..e328f32403 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -1008,6 +1008,7 @@ static void wined3d_device_delete_opengl_contexts_cs(void *object)
|
||||
@@ -1029,6 +1029,7 @@ static void wined3d_device_delete_opengl_contexts_cs(void *object)
|
||||
static void wined3d_device_delete_opengl_contexts(struct wined3d_device *device)
|
||||
{
|
||||
wined3d_cs_destroy_object(device->cs, wined3d_device_delete_opengl_contexts_cs, device);
|
||||
@ -133,7 +134,7 @@ index 0baf7f1b7cc..ea27553e8c8 100644
|
||||
}
|
||||
|
||||
static void wined3d_device_create_primary_opengl_context_cs(void *object)
|
||||
@@ -1043,6 +1044,7 @@ static void wined3d_device_create_primary_opengl_context_cs(void *object)
|
||||
@@ -1064,6 +1065,7 @@ static void wined3d_device_create_primary_opengl_context_cs(void *object)
|
||||
static HRESULT wined3d_device_create_primary_opengl_context(struct wined3d_device *device)
|
||||
{
|
||||
wined3d_cs_init_object(device->cs, wined3d_device_create_primary_opengl_context_cs, device);
|
||||
@ -142,7 +143,7 @@ index 0baf7f1b7cc..ea27553e8c8 100644
|
||||
return E_FAIL;
|
||||
|
||||
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
index 25deaeb1ae9..bd23999fb1e 100644
|
||||
index 25deaeb1ae..bd23999fb1 100644
|
||||
--- a/dlls/wined3d/swapchain.c
|
||||
+++ b/dlls/wined3d/swapchain.c
|
||||
@@ -66,6 +66,7 @@ static void swapchain_cleanup(struct wined3d_swapchain *swapchain)
|
||||
@ -161,8 +162,61 @@ index 25deaeb1ae9..bd23999fb1e 100644
|
||||
|
||||
if (!swapchain->context[0])
|
||||
{
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index 91f0cc36ed..0197f6daae 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -1391,6 +1391,7 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT
|
||||
if (surface->dc)
|
||||
{
|
||||
wined3d_cs_destroy_object(device->cs, texture2d_destroy_dc, surface);
|
||||
+ wined3d_cs_emit_sync(device->cs);
|
||||
create_dib = TRUE;
|
||||
}
|
||||
|
||||
@@ -1451,7 +1452,10 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT
|
||||
wined3d_texture_invalidate_location(texture, 0, ~valid_location);
|
||||
|
||||
if (create_dib)
|
||||
+ {
|
||||
wined3d_cs_init_object(device->cs, texture2d_create_dc, surface);
|
||||
+ wined3d_cs_emit_sync(device->cs);
|
||||
+ }
|
||||
|
||||
return WINED3D_OK;
|
||||
}
|
||||
@@ -2856,6 +2860,7 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
|
||||
if ((desc->usage & WINED3DUSAGE_OWNDC) || (device->wined3d->flags & WINED3D_NO3D))
|
||||
{
|
||||
wined3d_cs_init_object(device->cs, texture2d_create_dc, surface);
|
||||
+ wined3d_cs_emit_sync(device->cs);
|
||||
if (!surface->dc)
|
||||
{
|
||||
wined3d_texture_cleanup_sync(texture);
|
||||
@@ -3653,7 +3658,10 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
|
||||
if (!surface->dc)
|
||||
+ {
|
||||
wined3d_cs_init_object(device->cs, texture2d_create_dc, surface);
|
||||
+ wined3d_cs_emit_sync(device->cs);
|
||||
+ }
|
||||
if (!surface->dc)
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
|
||||
@@ -3697,7 +3705,10 @@ HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsign
|
||||
}
|
||||
|
||||
if (!(texture->resource.usage & WINED3DUSAGE_OWNDC) && !(device->wined3d->flags & WINED3D_NO3D))
|
||||
+ {
|
||||
wined3d_cs_destroy_object(device->cs, texture2d_destroy_dc, surface);
|
||||
+ wined3d_cs_emit_sync(device->cs);
|
||||
+ }
|
||||
|
||||
--sub_resource->map_count;
|
||||
if (!--texture->resource.map_count && texture->update_map_binding)
|
||||
diff --git a/dlls/wined3d/view.c b/dlls/wined3d/view.c
|
||||
index 3cd20ea8fad..9b9e7eef4c6 100644
|
||||
index 3cd20ea8fa..9b9e7eef4c 100644
|
||||
--- a/dlls/wined3d/view.c
|
||||
+++ b/dlls/wined3d/view.c
|
||||
@@ -594,6 +594,8 @@ static void wined3d_shader_resource_view_cs_init(void *object)
|
||||
@ -200,10 +254,10 @@ index 3cd20ea8fad..9b9e7eef4c6 100644
|
||||
|
||||
return WINED3D_OK;
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index e8d771ecb32..d2e0052067f 100644
|
||||
index 987f3dc70b..9918f13f08 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -3198,6 +3198,7 @@ struct wined3d_cs_ops
|
||||
@@ -3209,6 +3209,7 @@ struct wined3d_cs_ops
|
||||
{
|
||||
void *(*require_space)(struct wined3d_cs *cs, size_t size);
|
||||
void (*submit)(struct wined3d_cs *cs);
|
||||
@ -211,7 +265,7 @@ index e8d771ecb32..d2e0052067f 100644
|
||||
void (*push_constants)(struct wined3d_cs *cs, enum wined3d_push_constants p,
|
||||
unsigned int start_idx, unsigned int count, const void *constants);
|
||||
};
|
||||
@@ -3224,6 +3225,7 @@ void wined3d_cs_emit_dispatch(struct wined3d_cs *cs,
|
||||
@@ -3239,6 +3240,7 @@ 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;
|
||||
@ -219,7 +273,7 @@ index e8d771ecb32..d2e0052067f 100644
|
||||
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;
|
||||
@@ -3275,6 +3277,7 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
|
||||
@@ -3290,6 +3292,7 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
|
||||
void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs,
|
||||
struct wined3d_vertex_declaration *declaration) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_viewport *viewport) DECLSPEC_HIDDEN;
|
||||
|
@ -1,260 +0,0 @@
|
||||
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.
|
||||
|
||||
Another hacky patch to avoid using GL outside the worker thread.
|
||||
---
|
||||
dlls/wined3d/cs.c | 60 +++++++++++++++++++++++++++++++
|
||||
dlls/wined3d/texture.c | 81 +++++++++++++++++++++++++++---------------
|
||||
dlls/wined3d/wined3d_private.h | 7 ++++
|
||||
3 files changed, 119 insertions(+), 29 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
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_PUSH_CONSTANTS,
|
||||
WINED3D_CS_OP_CLEAR_RTV,
|
||||
WINED3D_CS_OP_UPDATE_TEXTURE,
|
||||
+ WINED3D_CS_OP_GET_DC,
|
||||
+ WINED3D_CS_OP_RELEASE_DC,
|
||||
};
|
||||
|
||||
struct wined3d_cs_sync
|
||||
@@ -411,6 +413,14 @@ struct wined3d_cs_update_texture
|
||||
struct wined3d_texture *src, *dst;
|
||||
};
|
||||
|
||||
+struct wined3d_cs_get_release_dc
|
||||
+{
|
||||
+ enum wined3d_cs_op opcode;
|
||||
+ struct wined3d_texture *texture;
|
||||
+ unsigned int sub_resource_idx;
|
||||
+ HRESULT *hr;
|
||||
+};
|
||||
+
|
||||
static void wined3d_cs_exec_sync(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
}
|
||||
@@ -2024,6 +2034,54 @@ void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_textur
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
+static void wined3d_cs_exec_get_dc(struct wined3d_cs *cs, const void *data)
|
||||
+{
|
||||
+ const struct wined3d_cs_get_release_dc *op = data;
|
||||
+
|
||||
+ *op->hr = wined3d_texture_get_dc_cs(op->texture, op->sub_resource_idx);
|
||||
+}
|
||||
+
|
||||
+HRESULT wined3d_cs_emit_get_dc(struct wined3d_cs *cs, struct wined3d_texture *texture,
|
||||
+ unsigned int sub_resource_idx)
|
||||
+{
|
||||
+ struct wined3d_cs_get_release_dc *op;
|
||||
+ HRESULT hr;
|
||||
+
|
||||
+ op = cs->ops->require_space(cs, sizeof(*op));
|
||||
+ op->opcode = WINED3D_CS_OP_GET_DC;
|
||||
+ op->texture = texture;
|
||||
+ op->sub_resource_idx = sub_resource_idx;
|
||||
+ op->hr = &hr;
|
||||
+
|
||||
+ cs->ops->submit_and_wait(cs);
|
||||
+
|
||||
+ return hr;
|
||||
+}
|
||||
+
|
||||
+static void wined3d_cs_exec_release_dc(struct wined3d_cs *cs, const void *data)
|
||||
+{
|
||||
+ const struct wined3d_cs_get_release_dc *op = data;
|
||||
+
|
||||
+ *op->hr = wined3d_texture_release_dc_cs(op->texture, op->sub_resource_idx);
|
||||
+}
|
||||
+
|
||||
+HRESULT wined3d_cs_emit_release_dc(struct wined3d_cs *cs, struct wined3d_texture *texture,
|
||||
+ unsigned int sub_resource_idx)
|
||||
+{
|
||||
+ struct wined3d_cs_get_release_dc *op;
|
||||
+ HRESULT hr;
|
||||
+
|
||||
+ op = cs->ops->require_space(cs, sizeof(*op));
|
||||
+ op->opcode = WINED3D_CS_OP_RELEASE_DC;
|
||||
+ op->texture = texture;
|
||||
+ op->sub_resource_idx = sub_resource_idx;
|
||||
+ op->hr = &hr;
|
||||
+
|
||||
+ cs->ops->submit_and_wait(cs);
|
||||
+
|
||||
+ return hr;
|
||||
+}
|
||||
+
|
||||
static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_SYNC */ wined3d_cs_exec_sync,
|
||||
@@ -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,
|
||||
+ /* WINED3D_CS_OP_RELEASE_DC */ wined3d_cs_exec_release_dc,
|
||||
};
|
||||
|
||||
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 60e53f55463..b692c504501 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -3509,13 +3509,41 @@ HRESULT CDECL wined3d_texture_create(struct wined3d_device *device, const struct
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
+HRESULT wined3d_texture_get_dc_cs(struct wined3d_texture *texture, unsigned int sub_resource_idx)
|
||||
+{
|
||||
+ struct wined3d_device *device = texture->resource.device;
|
||||
+ struct wined3d_context *context = NULL;
|
||||
+ struct wined3d_texture_sub_resource *sub_resource = &texture->sub_resources[sub_resource_idx];
|
||||
+ struct wined3d_surface *surface = sub_resource->u.surface;
|
||||
+ HRESULT hr = WINED3D_OK;
|
||||
+
|
||||
+ if (device->d3d_initialized)
|
||||
+ context = context_acquire(device, NULL, 0);
|
||||
+
|
||||
+ wined3d_texture_load_location(texture, sub_resource_idx, context, texture->resource.map_binding);
|
||||
+ wined3d_texture_invalidate_location(texture, sub_resource_idx, ~texture->resource.map_binding);
|
||||
+
|
||||
+ if (!surface->dc)
|
||||
+ hr = wined3d_surface_create_dc(surface);
|
||||
+ if (context)
|
||||
+ context_release(context);
|
||||
+ if (FAILED(hr))
|
||||
+ return hr;
|
||||
+
|
||||
+ if (!(texture->flags & WINED3D_TEXTURE_GET_DC_LENIENT))
|
||||
+ texture->flags |= WINED3D_TEXTURE_DC_IN_USE;
|
||||
+ ++texture->resource.map_count;
|
||||
+ ++sub_resource->map_count;
|
||||
+
|
||||
+ return hr;
|
||||
+}
|
||||
+
|
||||
HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned int sub_resource_idx, HDC *dc)
|
||||
{
|
||||
struct wined3d_device *device = texture->resource.device;
|
||||
struct wined3d_texture_sub_resource *sub_resource;
|
||||
- struct wined3d_context *context = NULL;
|
||||
struct wined3d_surface *surface;
|
||||
- HRESULT hr = WINED3D_OK;
|
||||
+ HRESULT hr;
|
||||
|
||||
TRACE("texture %p, sub_resource_idx %u, dc %p.\n", texture, sub_resource_idx, dc);
|
||||
|
||||
@@ -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;
|
||||
|
||||
- if (device->d3d_initialized)
|
||||
- context = context_acquire(device, NULL, 0);
|
||||
-
|
||||
- wined3d_texture_load_location(texture, sub_resource_idx, context, texture->resource.map_binding);
|
||||
- wined3d_texture_invalidate_location(texture, sub_resource_idx, ~texture->resource.map_binding);
|
||||
-
|
||||
- if (!surface->dc)
|
||||
- hr = wined3d_surface_create_dc(surface);
|
||||
- if (context)
|
||||
- context_release(context);
|
||||
+ hr = wined3d_cs_emit_get_dc(device->cs, texture, sub_resource_idx);
|
||||
if (FAILED(hr))
|
||||
- return WINED3DERR_INVALIDCALL;
|
||||
-
|
||||
- if (!(texture->flags & WINED3D_TEXTURE_GET_DC_LENIENT))
|
||||
- texture->flags |= WINED3D_TEXTURE_DC_IN_USE;
|
||||
- ++texture->resource.map_count;
|
||||
- ++sub_resource->map_count;
|
||||
+ return hr;
|
||||
|
||||
*dc = surface->dc;
|
||||
TRACE("Returning dc %p.\n", *dc);
|
||||
|
||||
- return hr;
|
||||
+ return WINED3D_OK;
|
||||
+}
|
||||
+
|
||||
+HRESULT wined3d_texture_release_dc_cs(struct wined3d_texture *texture, unsigned int sub_resource_idx)
|
||||
+{
|
||||
+ struct wined3d_device *device = texture->resource.device;
|
||||
+ struct wined3d_texture_sub_resource *sub_resource = &texture->sub_resources[sub_resource_idx];
|
||||
+ struct wined3d_surface *surface = sub_resource->u.surface;
|
||||
+
|
||||
+ if (!(texture->resource.usage & WINED3DUSAGE_OWNDC) && !(device->wined3d->flags & WINED3D_NO3D))
|
||||
+ wined3d_surface_destroy_dc(surface);
|
||||
+
|
||||
+ --sub_resource->map_count;
|
||||
+ if (!--texture->resource.map_count && texture->update_map_binding)
|
||||
+ wined3d_texture_update_map_binding(texture);
|
||||
+ if (!(texture->flags & WINED3D_TEXTURE_GET_DC_LENIENT))
|
||||
+ texture->flags &= ~WINED3D_TEXTURE_DC_IN_USE;
|
||||
+
|
||||
+ return WINED3D_OK;
|
||||
}
|
||||
|
||||
HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsigned int sub_resource_idx, HDC dc)
|
||||
@@ -3592,14 +3624,5 @@ HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsign
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
- if (!(texture->resource.usage & WINED3DUSAGE_OWNDC) && !(device->wined3d->flags & WINED3D_NO3D))
|
||||
- wined3d_surface_destroy_dc(surface);
|
||||
-
|
||||
- --sub_resource->map_count;
|
||||
- if (!--texture->resource.map_count && texture->update_map_binding)
|
||||
- wined3d_texture_update_map_binding(texture);
|
||||
- if (!(texture->flags & WINED3D_TEXTURE_GET_DC_LENIENT))
|
||||
- texture->flags &= ~WINED3D_TEXTURE_DC_IN_USE;
|
||||
-
|
||||
- return WINED3D_OK;
|
||||
+ 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 fcefe12d226..6373ee3df67 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -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;
|
||||
+HRESULT wined3d_texture_get_dc_cs(struct wined3d_texture *texture, unsigned int sub_resource_idx) DECLSPEC_HIDDEN;
|
||||
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;
|
||||
@@ -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;
|
||||
+HRESULT wined3d_texture_release_dc_cs(struct wined3d_texture *texture,
|
||||
+ unsigned int sub_resource_idx) DECLSPEC_HIDDEN;
|
||||
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;
|
||||
@@ -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;
|
||||
+HRESULT wined3d_cs_emit_get_dc(struct wined3d_cs *cs, struct wined3d_texture *texture,
|
||||
+ unsigned int sub_resource_idx) DECLSPEC_HIDDEN;
|
||||
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,
|
||||
@@ -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;
|
||||
+HRESULT wined3d_cs_emit_release_dc(struct wined3d_cs *cs, struct wined3d_texture *texture,
|
||||
+ unsigned int sub_resource_idx) 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,
|
||||
const struct wined3d_vec4 *plane) DECLSPEC_HIDDEN;
|
||||
--
|
||||
2.11.0
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 9708948e10b9272abae5a4ffdad1b2e1be4b2dd4 Mon Sep 17 00:00:00 2001
|
||||
From 644d2723fdf8d547bf5a0a4c43d119b6801dac77 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sun, 19 Feb 2017 01:58:25 +0100
|
||||
Subject: wined3d: Send query_poll through the command stream.
|
||||
@ -10,10 +10,10 @@ Subject: wined3d: Send query_poll through the command stream.
|
||||
3 files changed, 36 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 29b27176d34..81deae77363 100644
|
||||
index bbea6bbb45..6d01424bda 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -59,6 +59,7 @@ enum wined3d_cs_op
|
||||
@@ -61,6 +61,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_RESET_STATE,
|
||||
WINED3D_CS_OP_CALLBACK,
|
||||
WINED3D_CS_OP_QUERY_ISSUE,
|
||||
@ -21,7 +21,7 @@ index 29b27176d34..81deae77363 100644
|
||||
WINED3D_CS_OP_PRELOAD_RESOURCE,
|
||||
WINED3D_CS_OP_UNLOAD_RESOURCE,
|
||||
WINED3D_CS_OP_MAP,
|
||||
@@ -319,6 +320,14 @@ struct wined3d_cs_query_issue
|
||||
@@ -330,6 +331,14 @@ struct wined3d_cs_query_issue
|
||||
DWORD flags;
|
||||
};
|
||||
|
||||
@ -36,7 +36,7 @@ index 29b27176d34..81deae77363 100644
|
||||
struct wined3d_cs_preload_resource
|
||||
{
|
||||
enum wined3d_cs_op opcode;
|
||||
@@ -1584,6 +1593,30 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
|
||||
@@ -1665,6 +1674,30 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -67,7 +67,7 @@ index 29b27176d34..81deae77363 100644
|
||||
static void wined3d_cs_exec_preload_resource(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
const struct wined3d_cs_preload_resource *op = data;
|
||||
@@ -2087,6 +2120,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -2061,6 +2094,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_RESET_STATE */ wined3d_cs_exec_reset_state,
|
||||
/* WINED3D_CS_OP_CALLBACK */ wined3d_cs_exec_callback,
|
||||
/* WINED3D_CS_OP_QUERY_ISSUE */ wined3d_cs_exec_query_issue,
|
||||
@ -76,7 +76,7 @@ index 29b27176d34..81deae77363 100644
|
||||
/* WINED3D_CS_OP_UNLOAD_RESOURCE */ wined3d_cs_exec_unload_resource,
|
||||
/* WINED3D_CS_OP_MAP */ wined3d_cs_exec_map,
|
||||
diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
|
||||
index bc3b15f30dd..15935ab4469 100644
|
||||
index bc3b15f30d..15935ab446 100644
|
||||
--- a/dlls/wined3d/query.c
|
||||
+++ b/dlls/wined3d/query.c
|
||||
@@ -350,7 +350,7 @@ HRESULT CDECL wined3d_query_get_data(struct wined3d_query *query,
|
||||
@ -89,17 +89,17 @@ index bc3b15f30dd..15935ab4469 100644
|
||||
|
||||
if (data)
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index da3ee393739..91b2215f287 100644
|
||||
index 9301d10999..9d25bae822 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -3220,6 +3220,7 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
|
||||
@@ -3252,6 +3252,7 @@ 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;
|
||||
+BOOL wined3d_cs_emit_query_poll(struct wined3d_cs *cs, struct wined3d_query *query, DWORD flags) DECLSPEC_HIDDEN;
|
||||
HRESULT wined3d_cs_emit_release_dc(struct wined3d_cs *cs, struct wined3d_texture *texture,
|
||||
unsigned int sub_resource_idx) 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,
|
||||
const struct wined3d_vec4 *plane) DECLSPEC_HIDDEN;
|
||||
--
|
||||
2.11.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 6f0d725b9aad64432838ef31d2d4a69336a4839d Mon Sep 17 00:00:00 2001
|
||||
From d3e3b9bf7f27aa281a7e930f70018006ca20258e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefandoesinger@gmx.at>
|
||||
Date: Sat, 7 May 2016 21:58:06 +0100
|
||||
Subject: wined3d: Update the swap interval through the CS in reset.
|
||||
@ -10,19 +10,19 @@ Subject: wined3d: Update the swap interval through the CS in reset.
|
||||
3 files changed, 28 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 07fccb41bfd..53883ff103c 100644
|
||||
index 6d01424bda..1da3addcdd 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -73,6 +73,7 @@ enum wined3d_cs_op
|
||||
@@ -71,6 +71,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_PUSH_CONSTANTS,
|
||||
WINED3D_CS_OP_CLEAR_RTV,
|
||||
WINED3D_CS_OP_UPDATE_TEXTURE,
|
||||
WINED3D_CS_OP_GET_DC,
|
||||
WINED3D_CS_OP_RELEASE_DC,
|
||||
+ WINED3D_CS_OP_UPDATE_SWAP_INTERVAL,
|
||||
};
|
||||
|
||||
struct wined3d_cs_sync
|
||||
@@ -428,6 +429,12 @@ struct wined3d_cs_get_release_dc
|
||||
HRESULT *hr;
|
||||
@@ -420,6 +421,12 @@ struct wined3d_cs_update_texture
|
||||
struct wined3d_texture *src, *dst;
|
||||
};
|
||||
|
||||
+struct wined3d_cs_update_swap_interval
|
||||
@ -34,8 +34,8 @@ index 07fccb41bfd..53883ff103c 100644
|
||||
static void wined3d_cs_exec_sync(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
}
|
||||
@@ -2083,6 +2090,24 @@ HRESULT wined3d_cs_emit_release_dc(struct wined3d_cs *cs, struct wined3d_texture
|
||||
return hr;
|
||||
@@ -2057,6 +2064,24 @@ void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_textur
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
+static void wined3d_cs_exec_update_swap_interval(struct wined3d_cs *cs, const void *data)
|
||||
@ -59,19 +59,19 @@ index 07fccb41bfd..53883ff103c 100644
|
||||
static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_SYNC */ wined3d_cs_exec_sync,
|
||||
@@ -2132,6 +2157,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -2104,6 +2129,7 @@ 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,
|
||||
/* WINED3D_CS_OP_RELEASE_DC */ wined3d_cs_exec_release_dc,
|
||||
+ /* WINED3D_CS_OP_UPDATE_SWAP_INTERVAL */ wined3d_cs_exec_update_swap_interval,
|
||||
};
|
||||
|
||||
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 d244091782f..d0af77483e7 100644
|
||||
index eb8c86f954..bf48c71564 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -4833,7 +4833,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
@@ -4907,7 +4907,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
{
|
||||
if (reset_state)
|
||||
hr = wined3d_device_create_primary_opengl_context(device);
|
||||
@ -81,10 +81,10 @@ index d244091782f..d0af77483e7 100644
|
||||
|
||||
/* All done. There is no need to reload resources or shaders, this will happen automatically on the
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 05c1b2d32a3..b8f2ade12dd 100644
|
||||
index 9d25bae822..b5a27dcbac 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -3304,6 +3304,7 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou
|
||||
@@ -3305,6 +3305,7 @@ 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,49 +0,0 @@
|
||||
From 2aadab885c6dca2c21e7c7e598205d5e771f6538 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefandoesinger@gmx.at>
|
||||
Date: Sat, 7 May 2016 22:31:28 +0100
|
||||
Subject: wined3d: Create initial DCs through the CS.
|
||||
|
||||
---
|
||||
dlls/wined3d/texture.c | 18 +++++++++++++-----
|
||||
1 file changed, 13 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index 2360c589902..70c4590f74a 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -1314,7 +1314,11 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT
|
||||
wined3d_texture_invalidate_location(texture, 0, ~valid_location);
|
||||
|
||||
if (create_dib)
|
||||
- wined3d_surface_create_dc(surface);
|
||||
+ {
|
||||
+ HDC dc;
|
||||
+ wined3d_texture_get_dc(texture, 0, &dc);
|
||||
+ wined3d_texture_release_dc(texture, 0, dc);
|
||||
+ }
|
||||
|
||||
return WINED3D_OK;
|
||||
}
|
||||
@@ -2729,11 +2733,15 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
|
||||
|
||||
TRACE("Created surface level %u, layer %u @ %p.\n", i, j, surface);
|
||||
|
||||
- if (((desc->usage & WINED3DUSAGE_OWNDC) || (device->wined3d->flags & WINED3D_NO3D))
|
||||
- && FAILED(hr = wined3d_surface_create_dc(surface)))
|
||||
+ if ((desc->usage & WINED3DUSAGE_OWNDC) || (device->wined3d->flags & WINED3D_NO3D))
|
||||
{
|
||||
- wined3d_texture_cleanup_sync(texture);
|
||||
- return hr;
|
||||
+ HDC dc;
|
||||
+ if (FAILED(hr = wined3d_texture_get_dc(texture, idx, &dc)))
|
||||
+ {
|
||||
+ wined3d_texture_cleanup_sync(texture);
|
||||
+ return hr;
|
||||
+ }
|
||||
+ wined3d_texture_release_dc(texture, idx, dc);
|
||||
}
|
||||
}
|
||||
}
|
||||
--
|
||||
2.11.0
|
||||
|
@ -1,4 +1,4 @@
|
||||
From d8510f1a77606628c1868332f11f5dd8ec90f82e Mon Sep 17 00:00:00 2001
|
||||
From b3788f5f7f5a57baeb565e5d3a08cfaf263de01e Mon Sep 17 00:00:00 2001
|
||||
From: Nils Kuhnhenn <nils@volafile.io>
|
||||
Date: Fri, 5 Aug 2016 20:28:46 +0200
|
||||
Subject: wined3d: Fix context_acquire not being called from the command thread
|
||||
@ -11,18 +11,18 @@ Subject: wined3d: Fix context_acquire not being called from the command thread
|
||||
3 files changed, 51 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 770760f78c7..8b13ca2f792 100644
|
||||
index 1da3addcdd..d0c0d94537 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -74,6 +74,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_GET_DC,
|
||||
WINED3D_CS_OP_RELEASE_DC,
|
||||
@@ -72,6 +72,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_CLEAR_RTV,
|
||||
WINED3D_CS_OP_UPDATE_TEXTURE,
|
||||
WINED3D_CS_OP_UPDATE_SWAP_INTERVAL,
|
||||
+ WINED3D_CS_OP_TEXTURE_ADD_DIRTY_REGION,
|
||||
};
|
||||
|
||||
struct wined3d_cs_sync
|
||||
@@ -435,6 +436,13 @@ struct wined3d_cs_update_swap_interval
|
||||
@@ -427,6 +428,13 @@ struct wined3d_cs_update_swap_interval
|
||||
struct wined3d_swapchain *swapchain;
|
||||
};
|
||||
|
||||
@ -36,7 +36,7 @@ index 770760f78c7..8b13ca2f792 100644
|
||||
static void wined3d_cs_exec_sync(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
}
|
||||
@@ -2092,6 +2100,45 @@ void wined3d_cs_emit_update_swap_interval(struct wined3d_cs *cs, struct wined3d_
|
||||
@@ -2082,6 +2090,45 @@ void wined3d_cs_emit_update_swap_interval(struct wined3d_cs *cs, struct wined3d_
|
||||
cs->ops->submit_and_wait(cs);
|
||||
}
|
||||
|
||||
@ -82,19 +82,19 @@ index 770760f78c7..8b13ca2f792 100644
|
||||
static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_SYNC */ wined3d_cs_exec_sync,
|
||||
@@ -2142,6 +2189,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_GET_DC */ wined3d_cs_exec_get_dc,
|
||||
/* WINED3D_CS_OP_RELEASE_DC */ wined3d_cs_exec_release_dc,
|
||||
@@ -2130,6 +2177,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_CLEAR_RTV */ wined3d_cs_exec_clear_rtv,
|
||||
/* WINED3D_CS_OP_UPDATE_TEXTURE */ wined3d_cs_exec_update_texture,
|
||||
/* 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,
|
||||
};
|
||||
|
||||
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 baecda0b9ed..4c6a8e96611 100644
|
||||
index 41da65112d..7edb214c2a 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -1523,7 +1523,6 @@ struct wined3d_texture_sub_resource *wined3d_texture_get_sub_resource(struct win
|
||||
@@ -1658,7 +1658,6 @@ static struct wined3d_texture_sub_resource *wined3d_texture_get_sub_resource(str
|
||||
HRESULT CDECL wined3d_texture_add_dirty_region(struct wined3d_texture *texture,
|
||||
UINT layer, const struct wined3d_box *dirty_region)
|
||||
{
|
||||
@ -102,7 +102,7 @@ index baecda0b9ed..4c6a8e96611 100644
|
||||
unsigned int sub_resource_idx;
|
||||
|
||||
TRACE("texture %p, layer %u, dirty_region %s.\n", texture, layer, debug_box(dirty_region));
|
||||
@@ -1535,19 +1534,7 @@ HRESULT CDECL wined3d_texture_add_dirty_region(struct wined3d_texture *texture,
|
||||
@@ -1670,19 +1669,7 @@ HRESULT CDECL wined3d_texture_add_dirty_region(struct wined3d_texture *texture,
|
||||
}
|
||||
sub_resource_idx = layer * texture->level_count;
|
||||
|
||||
@ -124,10 +124,10 @@ index baecda0b9ed..4c6a8e96611 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 6e215b8f2c4..efa3b879098 100644
|
||||
index b5a27dcbac..c846148069 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -3296,6 +3296,8 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
|
||||
@@ -3300,6 +3300,8 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
|
||||
void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs,
|
||||
struct wined3d_vertex_declaration *declaration) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_viewport *viewport) DECLSPEC_HIDDEN;
|
||||
|
@ -1,21 +1,21 @@
|
||||
From bfb7d6f0b22ec9b8512083cd8044051217cf7155 Mon Sep 17 00:00:00 2001
|
||||
From 64dd5bb16beb1eafba1cceda4b2ab8edcc5145e3 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/context.c | 3 +
|
||||
dlls/wined3d/cs.c | 432 ++++++++++++++++++++++++++++++++++++-----
|
||||
dlls/wined3d/cs.c | 424 ++++++++++++++++++++++++++++++++++++-----
|
||||
dlls/wined3d/device.c | 2 +-
|
||||
dlls/wined3d/wined3d_main.c | 10 +
|
||||
dlls/wined3d/wined3d_private.h | 33 +++-
|
||||
5 files changed, 422 insertions(+), 58 deletions(-)
|
||||
5 files changed, 416 insertions(+), 56 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
index e1ca83395e7..03d007da870 100644
|
||||
index 9fa12e0c70..9bce86f775 100644
|
||||
--- a/dlls/wined3d/context.c
|
||||
+++ b/dlls/wined3d/context.c
|
||||
@@ -3730,6 +3730,9 @@ struct wined3d_context *context_acquire(const struct wined3d_device *device,
|
||||
@@ -3766,6 +3766,9 @@ struct wined3d_context *context_acquire(const struct wined3d_device *device,
|
||||
|
||||
TRACE("device %p, texture %p, sub_resource_idx %u.\n", device, texture, sub_resource_idx);
|
||||
|
||||
@ -26,7 +26,7 @@ index e1ca83395e7..03d007da870 100644
|
||||
current_context = NULL;
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 5789172697b..f94c20a8cb9 100644
|
||||
index d0c0d94537..94de259603 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -18,6 +18,7 @@
|
||||
@ -37,15 +37,15 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
#include "wined3d_private.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3d);
|
||||
@@ -75,6 +76,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_RELEASE_DC,
|
||||
@@ -73,6 +74,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_UPDATE_TEXTURE,
|
||||
WINED3D_CS_OP_UPDATE_SWAP_INTERVAL,
|
||||
WINED3D_CS_OP_TEXTURE_ADD_DIRTY_REGION,
|
||||
+ WINED3D_CS_OP_STOP,
|
||||
};
|
||||
|
||||
struct wined3d_cs_sync
|
||||
@@ -445,8 +447,14 @@ struct wined3d_cs_texture_add_dirty_region
|
||||
@@ -435,8 +437,14 @@ struct wined3d_cs_texture_add_dirty_region
|
||||
unsigned int sub_resource_idx;
|
||||
};
|
||||
|
||||
@ -61,7 +61,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_sync(struct wined3d_cs *cs)
|
||||
@@ -459,12 +467,14 @@ void wined3d_cs_emit_sync(struct wined3d_cs *cs)
|
||||
@@ -449,12 +457,14 @@ void wined3d_cs_emit_sync(struct wined3d_cs *cs)
|
||||
cs->ops->submit_and_wait(cs);
|
||||
}
|
||||
|
||||
@ -77,7 +77,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_glfinish(struct wined3d_cs *cs)
|
||||
@@ -477,7 +487,7 @@ void wined3d_cs_emit_glfinish(struct wined3d_cs *cs)
|
||||
@@ -467,7 +477,7 @@ void wined3d_cs_emit_glfinish(struct wined3d_cs *cs)
|
||||
cs->ops->submit_and_wait(cs);
|
||||
}
|
||||
|
||||
@ -86,7 +86,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
{
|
||||
const struct wined3d_cs_present *op = data;
|
||||
struct wined3d_swapchain *swapchain;
|
||||
@@ -495,6 +505,8 @@ static void wined3d_cs_exec_present(struct wined3d_cs *cs, const void *data)
|
||||
@@ -485,6 +495,8 @@ static void wined3d_cs_exec_present(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
wined3d_resource_release(&swapchain->back_buffers[i]->resource);
|
||||
}
|
||||
@ -95,7 +95,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *swapchain,
|
||||
@@ -534,13 +546,14 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
|
||||
@@ -524,13 +536,14 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
|
||||
pending = InterlockedCompareExchange(&cs->pending_presents, 0, 0);
|
||||
}
|
||||
|
||||
@ -111,7 +111,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
|
||||
device = cs->device;
|
||||
wined3d_get_draw_rect(state, &draw_rect);
|
||||
@@ -558,6 +571,8 @@ static void wined3d_cs_exec_clear(struct wined3d_cs *cs, const void *data)
|
||||
@@ -548,6 +561,8 @@ static void wined3d_cs_exec_clear(struct wined3d_cs *cs, const void *data)
|
||||
}
|
||||
if (op->flags & (WINED3DCLEAR_ZBUFFER | WINED3DCLEAR_STENCIL))
|
||||
wined3d_resource_release(state->fb->depth_stencil->resource);
|
||||
@ -120,7 +120,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *rects,
|
||||
@@ -696,7 +711,7 @@ static void release_unordered_access_resources(const struct wined3d_shader *shad
|
||||
@@ -686,7 +701,7 @@ static void release_unordered_access_resources(const struct wined3d_shader *shad
|
||||
}
|
||||
}
|
||||
|
||||
@ -129,7 +129,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
{
|
||||
const struct wined3d_cs_dispatch *op = data;
|
||||
struct wined3d_state *state = &cs->state;
|
||||
@@ -707,6 +722,8 @@ static void wined3d_cs_exec_dispatch(struct wined3d_cs *cs, const void *data)
|
||||
@@ -697,6 +712,8 @@ static void wined3d_cs_exec_dispatch(struct wined3d_cs *cs, const void *data)
|
||||
release_shader_resources(state, 1u << WINED3D_SHADER_TYPE_COMPUTE);
|
||||
release_unordered_access_resources(state->shader[WINED3D_SHADER_TYPE_COMPUTE],
|
||||
state->unordered_access_view[WINED3D_PIPELINE_COMPUTE]);
|
||||
@ -138,7 +138,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_dispatch(struct wined3d_cs *cs,
|
||||
@@ -728,7 +745,7 @@ void wined3d_cs_emit_dispatch(struct wined3d_cs *cs,
|
||||
@@ -718,7 +735,7 @@ void wined3d_cs_emit_dispatch(struct wined3d_cs *cs,
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -147,7 +147,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
{
|
||||
struct wined3d_state *state = &cs->state;
|
||||
const struct wined3d_cs_draw *op = data;
|
||||
@@ -773,6 +790,8 @@ static void wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
|
||||
@@ -763,6 +780,8 @@ static void wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
|
||||
release_shader_resources(state, ~(1u << WINED3D_SHADER_TYPE_COMPUTE));
|
||||
release_unordered_access_resources(state->shader[WINED3D_SHADER_TYPE_PIXEL],
|
||||
state->unordered_access_view[WINED3D_PIPELINE_GRAPHICS]);
|
||||
@ -156,7 +156,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_draw(struct wined3d_cs *cs, GLenum primitive_type, int base_vertex_idx, unsigned int start_idx,
|
||||
@@ -818,12 +837,14 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, GLenum primitive_type, int base
|
||||
@@ -808,12 +827,14 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, GLenum primitive_type, int base
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -172,7 +172,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query *predicate, BOOL value)
|
||||
@@ -838,12 +859,14 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query
|
||||
@@ -828,12 +849,14 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -188,7 +188,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_viewport *viewport)
|
||||
@@ -857,12 +880,14 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
|
||||
@@ -847,12 +870,14 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -204,7 +204,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
|
||||
@@ -876,12 +901,14 @@ void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
|
||||
@@ -866,12 +891,14 @@ void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -220,7 +220,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int view_idx,
|
||||
@@ -897,7 +924,7 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
|
||||
@@ -887,7 +914,7 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -229,7 +229,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
{
|
||||
const struct wined3d_cs_set_depth_stencil_view *op = data;
|
||||
struct wined3d_device *device = cs->device;
|
||||
@@ -932,6 +959,8 @@ static void wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
|
||||
@@ -922,6 +949,8 @@ static void wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
|
||||
}
|
||||
|
||||
device_invalidate_state(device, STATE_FRAMEBUFFER);
|
||||
@ -238,7 +238,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3d_rendertarget_view *view)
|
||||
@@ -945,12 +974,14 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3
|
||||
@@ -935,12 +964,14 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -254,7 +254,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3d_vertex_declaration *declaration)
|
||||
@@ -964,7 +995,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
|
||||
@@ -954,7 +985,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -263,7 +263,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
{
|
||||
const struct wined3d_cs_set_stream_source *op = data;
|
||||
struct wined3d_stream_state *stream;
|
||||
@@ -982,6 +1013,8 @@ static void wined3d_cs_exec_set_stream_source(struct wined3d_cs *cs, const void
|
||||
@@ -972,6 +1003,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);
|
||||
@ -272,7 +272,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -999,7 +1032,7 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -989,7 +1022,7 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -281,7 +281,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
{
|
||||
const struct wined3d_cs_set_stream_source_freq *op = data;
|
||||
struct wined3d_stream_state *stream;
|
||||
@@ -1009,6 +1042,8 @@ static void wined3d_cs_exec_set_stream_source_freq(struct wined3d_cs *cs, const
|
||||
@@ -999,6 +1032,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);
|
||||
@ -290,7 +290,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_idx, UINT frequency, UINT flags)
|
||||
@@ -1024,7 +1059,7 @@ void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_i
|
||||
@@ -1014,7 +1049,7 @@ void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_i
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -299,7 +299,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
{
|
||||
const struct wined3d_cs_set_stream_output *op = data;
|
||||
struct wined3d_stream_output *stream;
|
||||
@@ -1039,6 +1074,8 @@ static void wined3d_cs_exec_set_stream_output(struct wined3d_cs *cs, const void
|
||||
@@ -1029,6 +1064,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);
|
||||
@ -308,7 +308,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -1055,7 +1092,7 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -1045,7 +1082,7 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -317,7 +317,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
{
|
||||
const struct wined3d_cs_set_index_buffer *op = data;
|
||||
struct wined3d_buffer *prev;
|
||||
@@ -1071,6 +1108,8 @@ static void wined3d_cs_exec_set_index_buffer(struct wined3d_cs *cs, const void *
|
||||
@@ -1061,6 +1098,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);
|
||||
@ -326,7 +326,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buffer *buffer,
|
||||
@@ -1087,7 +1126,7 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
|
||||
@@ -1077,7 +1116,7 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -335,7 +335,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
{
|
||||
const struct wined3d_cs_set_constant_buffer *op = data;
|
||||
struct wined3d_buffer *prev;
|
||||
@@ -1101,6 +1140,7 @@ static void wined3d_cs_exec_set_constant_buffer(struct wined3d_cs *cs, const voi
|
||||
@@ -1091,6 +1130,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));
|
||||
@ -343,7 +343,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_shader_type type,
|
||||
@@ -1117,7 +1157,7 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
|
||||
@@ -1107,7 +1147,7 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -352,7 +352,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info = &cs->device->adapter->gl_info;
|
||||
const struct wined3d_d3d_info *d3d_info = &cs->device->adapter->d3d_info;
|
||||
@@ -1194,6 +1234,8 @@ static void wined3d_cs_exec_set_texture(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1184,6 +1224,8 @@ static void wined3d_cs_exec_set_texture(struct wined3d_cs *cs, const void *data)
|
||||
|
||||
if (new_use_color_key)
|
||||
device_invalidate_state(cs->device, STATE_COLOR_KEY);
|
||||
@ -361,7 +361,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined3d_texture *texture)
|
||||
@@ -1208,7 +1250,7 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
|
||||
@@ -1198,7 +1240,7 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -370,7 +370,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
{
|
||||
const struct wined3d_cs_set_shader_resource_view *op = data;
|
||||
struct wined3d_shader_resource_view *prev;
|
||||
@@ -1225,6 +1267,8 @@ static void wined3d_cs_exec_set_shader_resource_view(struct wined3d_cs *cs, cons
|
||||
@@ -1215,6 +1257,8 @@ static void wined3d_cs_exec_set_shader_resource_view(struct wined3d_cs *cs, cons
|
||||
device_invalidate_state(cs->device, STATE_GRAPHICS_SHADER_RESOURCE_BINDING);
|
||||
else
|
||||
device_invalidate_state(cs->device, STATE_COMPUTE_SHADER_RESOURCE_BINDING);
|
||||
@ -379,7 +379,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3d_shader_type type,
|
||||
@@ -1241,7 +1285,7 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
|
||||
@@ -1231,7 +1275,7 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -388,7 +388,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
{
|
||||
const struct wined3d_cs_set_unordered_access_view *op = data;
|
||||
struct wined3d_unordered_access_view *prev;
|
||||
@@ -1255,6 +1299,8 @@ static void wined3d_cs_exec_set_unordered_access_view(struct wined3d_cs *cs, con
|
||||
@@ -1245,6 +1289,8 @@ static void wined3d_cs_exec_set_unordered_access_view(struct wined3d_cs *cs, con
|
||||
InterlockedDecrement(&prev->resource->bind_count);
|
||||
|
||||
device_invalidate_state(cs->device, STATE_UNORDERED_ACCESS_VIEW_BINDING(op->pipeline));
|
||||
@ -397,7 +397,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined3d_pipeline pipeline,
|
||||
@@ -1271,7 +1317,7 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
|
||||
@@ -1261,7 +1307,7 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -406,7 +406,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
{
|
||||
const struct wined3d_cs_set_sampler *op = data;
|
||||
|
||||
@@ -1280,6 +1326,8 @@ static void wined3d_cs_exec_set_sampler(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1270,6 +1316,8 @@ static void wined3d_cs_exec_set_sampler(struct wined3d_cs *cs, const void *data)
|
||||
device_invalidate_state(cs->device, STATE_GRAPHICS_SHADER_RESOURCE_BINDING);
|
||||
else
|
||||
device_invalidate_state(cs->device, STATE_COMPUTE_SHADER_RESOURCE_BINDING);
|
||||
@ -415,7 +415,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type type,
|
||||
@@ -1296,7 +1344,7 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
@@ -1286,7 +1334,7 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -424,7 +424,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
{
|
||||
const struct wined3d_cs_set_shader *op = data;
|
||||
|
||||
@@ -1306,6 +1354,8 @@ static void wined3d_cs_exec_set_shader(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1296,6 +1344,8 @@ static void wined3d_cs_exec_set_shader(struct wined3d_cs *cs, const void *data)
|
||||
device_invalidate_state(cs->device, STATE_GRAPHICS_SHADER_RESOURCE_BINDING);
|
||||
else
|
||||
device_invalidate_state(cs->device, STATE_COMPUTE_SHADER_RESOURCE_BINDING);
|
||||
@ -433,7 +433,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type type, struct wined3d_shader *shader)
|
||||
@@ -1320,12 +1370,14 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
@@ -1310,12 +1360,14 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -449,7 +449,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
|
||||
@@ -1340,12 +1392,14 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
|
||||
@@ -1330,12 +1382,14 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -465,7 +465,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render_state state, DWORD value)
|
||||
@@ -1360,12 +1414,14 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
|
||||
@@ -1350,12 +1404,14 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -481,7 +481,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
|
||||
@@ -1382,12 +1438,14 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
|
||||
@@ -1372,12 +1428,14 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -497,7 +497,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
|
||||
@@ -1404,13 +1462,15 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
|
||||
@@ -1394,13 +1452,15 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -514,7 +514,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform_state state,
|
||||
@@ -1426,12 +1486,14 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
|
||||
@@ -1416,12 +1476,14 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -530,7 +530,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const struct wined3d_vec4 *plane)
|
||||
@@ -1446,7 +1508,7 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
|
||||
@@ -1436,7 +1498,7 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -539,7 +539,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
{
|
||||
const struct wined3d_cs_set_color_key *op = data;
|
||||
struct wined3d_texture *texture = op->texture;
|
||||
@@ -1507,6 +1569,8 @@ static void wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *dat
|
||||
@@ -1497,6 +1559,8 @@ static void wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *dat
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -548,7 +548,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture *texture,
|
||||
@@ -1529,12 +1593,14 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
|
||||
@@ -1519,12 +1583,14 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -564,7 +564,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_material *material)
|
||||
@@ -1548,7 +1614,7 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
|
||||
@@ -1538,7 +1604,7 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -573,7 +573,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
{
|
||||
const struct wined3d_cs_set_light *op = data;
|
||||
struct wined3d_light_info *light_info;
|
||||
@@ -1562,7 +1628,7 @@ static void wined3d_cs_exec_set_light(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1552,7 +1618,7 @@ static void wined3d_cs_exec_set_light(struct wined3d_cs *cs, const void *data)
|
||||
if (!(light_info = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*light_info))))
|
||||
{
|
||||
ERR("Failed to allocate light info.\n");
|
||||
@ -582,7 +582,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
}
|
||||
|
||||
hash_idx = LIGHTMAP_HASHFUNC(light_idx);
|
||||
@@ -1583,6 +1649,8 @@ static void wined3d_cs_exec_set_light(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1573,6 +1639,8 @@ static void wined3d_cs_exec_set_light(struct wined3d_cs *cs, const void *data)
|
||||
light_info->direction = op->light.direction;
|
||||
light_info->exponent = op->light.exponent;
|
||||
light_info->cutoff = op->light.cutoff;
|
||||
@ -591,7 +591,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light_info *light)
|
||||
@@ -1596,7 +1664,7 @@ void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light
|
||||
@@ -1586,7 +1654,7 @@ void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -600,7 +600,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
{
|
||||
const struct wined3d_cs_set_light_enable *op = data;
|
||||
struct wined3d_device *device = cs->device;
|
||||
@@ -1606,7 +1674,7 @@ static void wined3d_cs_exec_set_light_enable(struct wined3d_cs *cs, const void *
|
||||
@@ -1596,7 +1664,7 @@ static void wined3d_cs_exec_set_light_enable(struct wined3d_cs *cs, const void *
|
||||
if (!(light_info = wined3d_state_get_light(&cs->state, op->idx)))
|
||||
{
|
||||
ERR("Light doesn't exist.\n");
|
||||
@ -609,7 +609,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
}
|
||||
|
||||
prev_idx = light_info->glIndex;
|
||||
@@ -1616,6 +1684,8 @@ static void wined3d_cs_exec_set_light_enable(struct wined3d_cs *cs, const void *
|
||||
@@ -1606,6 +1674,8 @@ static void wined3d_cs_exec_set_light_enable(struct wined3d_cs *cs, const void *
|
||||
device_invalidate_state(device, STATE_LIGHT_TYPE);
|
||||
device_invalidate_state(device, STATE_ACTIVELIGHT(op->enable ? light_info->glIndex : prev_idx));
|
||||
}
|
||||
@ -618,7 +618,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, unsigned int idx, BOOL enable)
|
||||
@@ -1630,7 +1700,7 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, unsigned int idx, B
|
||||
@@ -1620,7 +1690,7 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, unsigned int idx, B
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -627,7 +627,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
{
|
||||
struct wined3d_adapter *adapter = cs->device->adapter;
|
||||
|
||||
@@ -1638,6 +1708,8 @@ static void wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1628,6 +1698,8 @@ static void wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data)
|
||||
memset(&cs->state, 0, sizeof(cs->state));
|
||||
state_init(&cs->state, &cs->fb, &adapter->gl_info, &adapter->d3d_info,
|
||||
WINED3D_STATE_NO_REF | WINED3D_STATE_INIT_DEFAULT);
|
||||
@ -636,7 +636,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
@@ -1650,11 +1722,13 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
@@ -1640,11 +1712,13 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -651,7 +651,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
}
|
||||
|
||||
static void wined3d_cs_emit_callback(struct wined3d_cs *cs, void (*callback)(void *object), void *object)
|
||||
@@ -1679,12 +1753,14 @@ void wined3d_cs_init_object(struct wined3d_cs *cs, void (*callback)(void *object
|
||||
@@ -1669,12 +1743,14 @@ void wined3d_cs_init_object(struct wined3d_cs *cs, void (*callback)(void *object
|
||||
wined3d_cs_emit_callback(cs, callback, object);
|
||||
}
|
||||
|
||||
@ -667,7 +667,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *query, DWORD flags)
|
||||
@@ -1699,12 +1775,14 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
|
||||
@@ -1689,12 +1765,14 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -683,7 +683,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
}
|
||||
|
||||
BOOL wined3d_cs_emit_query_poll(struct wined3d_cs *cs, struct wined3d_query *query, DWORD flags)
|
||||
@@ -1723,13 +1801,15 @@ BOOL wined3d_cs_emit_query_poll(struct wined3d_cs *cs, struct wined3d_query *que
|
||||
@@ -1713,13 +1791,15 @@ BOOL wined3d_cs_emit_query_poll(struct wined3d_cs *cs, struct wined3d_query *que
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -700,7 +700,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource)
|
||||
@@ -1745,13 +1825,15 @@ void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_reso
|
||||
@@ -1735,13 +1815,15 @@ void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_reso
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -717,7 +717,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource)
|
||||
@@ -1767,13 +1849,15 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou
|
||||
@@ -1757,13 +1839,15 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -734,7 +734,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
}
|
||||
|
||||
HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource, unsigned int sub_resource_idx,
|
||||
@@ -1796,12 +1880,14 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||
@@ -1786,12 +1870,14 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||
return hr;
|
||||
}
|
||||
|
||||
@ -750,7 +750,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
}
|
||||
|
||||
HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resource, unsigned int sub_resource_idx)
|
||||
@@ -1820,7 +1906,7 @@ HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resourc
|
||||
@@ -1810,7 +1896,7 @@ HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resourc
|
||||
return hr;
|
||||
}
|
||||
|
||||
@ -759,7 +759,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
{
|
||||
const struct wined3d_cs_blt_sub_resource *op = data;
|
||||
|
||||
@@ -1859,6 +1945,8 @@ static void wined3d_cs_exec_blt_sub_resource(struct wined3d_cs *cs, const void *
|
||||
@@ -1849,6 +1935,8 @@ static void wined3d_cs_exec_blt_sub_resource(struct wined3d_cs *cs, const void *
|
||||
if (op->src_resource)
|
||||
wined3d_resource_release(op->src_resource);
|
||||
wined3d_resource_release(op->dst_resource);
|
||||
@ -768,7 +768,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_blt_sub_resource(struct wined3d_cs *cs, struct wined3d_resource *dst_resource,
|
||||
@@ -1888,7 +1976,7 @@ void wined3d_cs_emit_blt_sub_resource(struct wined3d_cs *cs, struct wined3d_reso
|
||||
@@ -1878,7 +1966,7 @@ void wined3d_cs_emit_blt_sub_resource(struct wined3d_cs *cs, struct wined3d_reso
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -777,7 +777,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
{
|
||||
const struct wined3d_cs_update_sub_resource *op = data;
|
||||
const struct wined3d_box *box = &op->box;
|
||||
@@ -1938,6 +2026,7 @@ static void wined3d_cs_exec_update_sub_resource(struct wined3d_cs *cs, const voi
|
||||
@@ -1928,6 +2016,7 @@ static void wined3d_cs_exec_update_sub_resource(struct wined3d_cs *cs, const voi
|
||||
|
||||
done:
|
||||
wined3d_resource_release(op->resource);
|
||||
@ -785,7 +785,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||
@@ -1982,10 +2071,11 @@ push_constant_info[] =
|
||||
@@ -1972,10 +2061,11 @@ push_constant_info[] =
|
||||
{FIELD_OFFSET(struct wined3d_state, ps_consts_b), sizeof(BOOL), WINED3D_SHADER_CONST_PS_B},
|
||||
};
|
||||
|
||||
@ -798,7 +798,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
unsigned int context_count;
|
||||
unsigned int i;
|
||||
size_t offset;
|
||||
@@ -2001,6 +2091,8 @@ static void wined3d_cs_exec_push_constants(struct wined3d_cs *cs, const void *da
|
||||
@@ -1991,6 +2081,8 @@ static void wined3d_cs_exec_push_constants(struct wined3d_cs *cs, const void *da
|
||||
{
|
||||
device->contexts[i]->constant_update_mask |= push_constant_info[op->p].mask;
|
||||
}
|
||||
@ -807,7 +807,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_push_constants(struct wined3d_cs *cs, enum wined3d_push_constants p,
|
||||
@@ -2018,7 +2110,7 @@ void wined3d_cs_emit_push_constants(struct wined3d_cs *cs, enum wined3d_push_con
|
||||
@@ -2008,7 +2100,7 @@ void wined3d_cs_emit_push_constants(struct wined3d_cs *cs, enum wined3d_push_con
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -816,7 +816,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
{
|
||||
const struct wined3d_cs_clear_rtv *op = data;
|
||||
struct wined3d_device *device = cs->device;
|
||||
@@ -2029,6 +2121,8 @@ static void wined3d_cs_exec_clear_rtv(struct wined3d_cs *cs, const void *data)
|
||||
@@ -2019,6 +2111,8 @@ static void wined3d_cs_exec_clear_rtv(struct wined3d_cs *cs, const void *data)
|
||||
op->blitter->depth_fill(device, op->view, &op->rect, op->flags, op->depth, op->stencil);
|
||||
|
||||
wined3d_resource_release(op->view->resource);
|
||||
@ -825,7 +825,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarget_view *view,
|
||||
@@ -2053,7 +2147,7 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
|
||||
@@ -2043,7 +2137,7 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -834,7 +834,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
{
|
||||
const struct wined3d_cs_update_texture *op = data;
|
||||
struct wined3d_context *context;
|
||||
@@ -2064,6 +2158,8 @@ static void wined3d_cs_exec_update_texture(struct wined3d_cs *cs, const void *da
|
||||
@@ -2054,6 +2148,8 @@ static void wined3d_cs_exec_update_texture(struct wined3d_cs *cs, const void *da
|
||||
|
||||
wined3d_resource_release(&op->src->resource);
|
||||
wined3d_resource_release(&op->dst->resource);
|
||||
@ -843,40 +843,10 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_texture *src,
|
||||
@@ -2082,11 +2178,13 @@ void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_textur
|
||||
@@ -2072,11 +2168,13 @@ void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_textur
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
-static void wined3d_cs_exec_get_dc(struct wined3d_cs *cs, const void *data)
|
||||
+static UINT wined3d_cs_exec_get_dc(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
const struct wined3d_cs_get_release_dc *op = data;
|
||||
|
||||
*op->hr = wined3d_texture_get_dc_cs(op->texture, op->sub_resource_idx);
|
||||
+
|
||||
+ return sizeof(*op);
|
||||
}
|
||||
|
||||
HRESULT wined3d_cs_emit_get_dc(struct wined3d_cs *cs, struct wined3d_texture *texture,
|
||||
@@ -2106,11 +2204,13 @@ HRESULT wined3d_cs_emit_get_dc(struct wined3d_cs *cs, struct wined3d_texture *te
|
||||
return hr;
|
||||
}
|
||||
|
||||
-static void wined3d_cs_exec_release_dc(struct wined3d_cs *cs, const void *data)
|
||||
+static UINT wined3d_cs_exec_release_dc(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
const struct wined3d_cs_get_release_dc *op = data;
|
||||
|
||||
*op->hr = wined3d_texture_release_dc_cs(op->texture, op->sub_resource_idx);
|
||||
+
|
||||
+ return sizeof(*op);
|
||||
}
|
||||
|
||||
HRESULT wined3d_cs_emit_release_dc(struct wined3d_cs *cs, struct wined3d_texture *texture,
|
||||
@@ -2130,11 +2230,13 @@ HRESULT wined3d_cs_emit_release_dc(struct wined3d_cs *cs, struct wined3d_texture
|
||||
return hr;
|
||||
}
|
||||
|
||||
-static void wined3d_cs_exec_update_swap_interval(struct wined3d_cs *cs, const void *data)
|
||||
+static UINT wined3d_cs_exec_update_swap_interval(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
@ -888,7 +858,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_update_swap_interval(struct wined3d_cs *cs, struct wined3d_swapchain *swapchain)
|
||||
@@ -2148,7 +2250,7 @@ void wined3d_cs_emit_update_swap_interval(struct wined3d_cs *cs, struct wined3d_
|
||||
@@ -2090,7 +2188,7 @@ void wined3d_cs_emit_update_swap_interval(struct wined3d_cs *cs, struct wined3d_
|
||||
cs->ops->submit_and_wait(cs);
|
||||
}
|
||||
|
||||
@ -897,7 +867,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
{
|
||||
const struct wined3d_cs_texture_add_dirty_region *op = data;
|
||||
struct wined3d_texture *texture = op->texture;
|
||||
@@ -2166,6 +2268,8 @@ static void wined3d_cs_exec_texture_add_dirty_region(struct wined3d_cs *cs, cons
|
||||
@@ -2108,6 +2206,8 @@ static void wined3d_cs_exec_texture_add_dirty_region(struct wined3d_cs *cs, cons
|
||||
context_release(context);
|
||||
|
||||
wined3d_resource_release(&texture->resource);
|
||||
@ -906,7 +876,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_texture_add_dirty_region(struct wined3d_cs *cs,
|
||||
@@ -2187,7 +2291,7 @@ void wined3d_cs_emit_texture_add_dirty_region(struct wined3d_cs *cs,
|
||||
@@ -2129,7 +2229,7 @@ void wined3d_cs_emit_texture_add_dirty_region(struct wined3d_cs *cs,
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -915,7 +885,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
{
|
||||
/* WINED3D_CS_OP_SYNC */ wined3d_cs_exec_sync,
|
||||
/* WINED3D_CS_OP_GLFINISH */ wined3d_cs_exec_glfinish,
|
||||
@@ -2291,6 +2395,201 @@ static const struct wined3d_cs_ops wined3d_cs_st_ops =
|
||||
@@ -2231,6 +2331,201 @@ static const struct wined3d_cs_ops wined3d_cs_st_ops =
|
||||
wined3d_cs_st_submit,
|
||||
};
|
||||
|
||||
@ -1117,7 +1087,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
|
||||
@@ -2320,12 +2619,41 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
@@ -2260,12 +2555,41 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -1160,7 +1130,7 @@ index 5789172697b..f94c20a8cb9 100644
|
||||
HeapFree(GetProcessHeap(), 0, cs->data);
|
||||
HeapFree(GetProcessHeap(), 0, cs);
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index eecc5787b5c..a04a6b697ef 100644
|
||||
index b271e72c98..abfdcb1cd0 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -1310,7 +1310,7 @@ UINT CDECL wined3d_device_get_available_texture_mem(const struct wined3d_device
|
||||
@ -1173,7 +1143,7 @@ index eecc5787b5c..a04a6b697ef 100644
|
||||
GLint vram_free_kb;
|
||||
UINT64 vram_free;
|
||||
diff --git a/dlls/wined3d/wined3d_main.c b/dlls/wined3d/wined3d_main.c
|
||||
index 1ce5937f173..4ef747ca89a 100644
|
||||
index aaced215de..473a7550bd 100644
|
||||
--- a/dlls/wined3d/wined3d_main.c
|
||||
+++ b/dlls/wined3d/wined3d_main.c
|
||||
@@ -90,6 +90,7 @@ struct wined3d_settings wined3d_settings =
|
||||
@ -1203,7 +1173,7 @@ index 1ce5937f173..4ef747ca89a 100644
|
||||
if (hkey) RegCloseKey( hkey );
|
||||
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index eb3384c1675..508c4cba0e9 100644
|
||||
index 5cdb7f1ea5..4e8fca716e 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -391,6 +391,7 @@ struct wined3d_settings
|
||||
@ -1214,7 +1184,7 @@ index eb3384c1675..508c4cba0e9 100644
|
||||
};
|
||||
|
||||
extern struct wined3d_settings wined3d_settings DECLSPEC_HIDDEN;
|
||||
@@ -2793,11 +2794,6 @@ static inline void wined3d_resource_release(struct wined3d_resource *resource)
|
||||
@@ -2805,11 +2806,6 @@ static inline void wined3d_resource_release(struct wined3d_resource *resource)
|
||||
InterlockedDecrement(&resource->access_count);
|
||||
}
|
||||
|
||||
@ -1226,7 +1196,7 @@ index eb3384c1675..508c4cba0e9 100644
|
||||
void resource_cleanup(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *device,
|
||||
enum wined3d_resource_type type, const struct wined3d_format *format,
|
||||
@@ -3213,6 +3209,21 @@ enum wined3d_push_constants
|
||||
@@ -3220,6 +3216,21 @@ enum wined3d_push_constants
|
||||
WINED3D_PUSH_CONSTANTS_PS_B,
|
||||
};
|
||||
|
||||
@ -1248,7 +1218,7 @@ index eb3384c1675..508c4cba0e9 100644
|
||||
struct wined3d_cs_ops
|
||||
{
|
||||
void *(*require_space)(struct wined3d_cs *cs, size_t size);
|
||||
@@ -3230,9 +3241,21 @@ struct wined3d_cs
|
||||
@@ -3237,9 +3248,21 @@ struct wined3d_cs
|
||||
size_t data_size, start, end;
|
||||
void *data;
|
||||
|
||||
|
@ -1,18 +1,18 @@
|
||||
From 2c6f63e68a369302556be78022b0e60482698153 Mon Sep 17 00:00:00 2001
|
||||
From 980a986cec394b6fc4a577cbf0efc6147191b084 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Wed, 8 Feb 2017 00:12:31 +0100
|
||||
Subject: wined3d: Introduce a separate priority queue.
|
||||
|
||||
---
|
||||
dlls/wined3d/cs.c | 125 ++++++++++++++++++++++-------------------
|
||||
dlls/wined3d/cs.c | 121 ++++++++++++++++++++++-------------------
|
||||
dlls/wined3d/wined3d_private.h | 4 +-
|
||||
2 files changed, 70 insertions(+), 59 deletions(-)
|
||||
2 files changed, 68 insertions(+), 57 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 3f629388176..8b92a76e4d4 100644
|
||||
index 310ddd108f..d7604e5d7c 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -461,7 +461,7 @@ void wined3d_cs_emit_sync(struct wined3d_cs *cs)
|
||||
@@ -451,7 +451,7 @@ void wined3d_cs_emit_sync(struct wined3d_cs *cs)
|
||||
{
|
||||
struct wined3d_cs_sync *op;
|
||||
|
||||
@ -21,7 +21,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
op->opcode = WINED3D_CS_OP_SYNC;
|
||||
|
||||
cs->ops->submit_and_wait(cs);
|
||||
@@ -481,7 +481,7 @@ void wined3d_cs_emit_glfinish(struct wined3d_cs *cs)
|
||||
@@ -471,7 +471,7 @@ void wined3d_cs_emit_glfinish(struct wined3d_cs *cs)
|
||||
{
|
||||
struct wined3d_cs_glfinish *op;
|
||||
|
||||
@ -30,7 +30,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
op->opcode = WINED3D_CS_OP_GLFINISH;
|
||||
|
||||
cs->ops->submit_and_wait(cs);
|
||||
@@ -516,7 +516,7 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
|
||||
@@ -506,7 +506,7 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
|
||||
unsigned int i;
|
||||
LONG pending;
|
||||
|
||||
@ -39,7 +39,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
op->opcode = WINED3D_CS_OP_PRESENT;
|
||||
op->dst_window_override = dst_window_override;
|
||||
op->swapchain = swapchain;
|
||||
@@ -582,7 +582,7 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
@@ -572,7 +572,7 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
struct wined3d_cs_clear *op;
|
||||
unsigned int i;
|
||||
|
||||
@ -48,7 +48,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
op->opcode = WINED3D_CS_OP_CLEAR;
|
||||
op->flags = flags;
|
||||
op->color = *color;
|
||||
@@ -732,7 +732,7 @@ void wined3d_cs_emit_dispatch(struct wined3d_cs *cs,
|
||||
@@ -722,7 +722,7 @@ void wined3d_cs_emit_dispatch(struct wined3d_cs *cs,
|
||||
const struct wined3d_state *state = &cs->device->state;
|
||||
struct wined3d_cs_dispatch *op;
|
||||
|
||||
@ -57,7 +57,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
op->opcode = WINED3D_CS_OP_DISPATCH;
|
||||
op->group_count_x = group_count_x;
|
||||
op->group_count_y = group_count_y;
|
||||
@@ -801,7 +801,7 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, GLenum primitive_type, int base
|
||||
@@ -791,7 +791,7 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, GLenum primitive_type, int base
|
||||
struct wined3d_cs_draw *op;
|
||||
unsigned int i;
|
||||
|
||||
@ -66,7 +66,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
op->opcode = WINED3D_CS_OP_DRAW;
|
||||
op->primitive_type = primitive_type;
|
||||
op->base_vertex_idx = base_vertex_idx;
|
||||
@@ -851,7 +851,7 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query
|
||||
@@ -841,7 +841,7 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query
|
||||
{
|
||||
struct wined3d_cs_set_predication *op;
|
||||
|
||||
@ -75,7 +75,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_PREDICATION;
|
||||
op->predicate = predicate;
|
||||
op->value = value;
|
||||
@@ -873,7 +873,7 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
|
||||
@@ -863,7 +863,7 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
|
||||
{
|
||||
struct wined3d_cs_set_viewport *op;
|
||||
|
||||
@ -84,7 +84,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_VIEWPORT;
|
||||
op->viewport = *viewport;
|
||||
|
||||
@@ -894,7 +894,7 @@ void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
|
||||
@@ -884,7 +884,7 @@ void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
|
||||
{
|
||||
struct wined3d_cs_set_scissor_rect *op;
|
||||
|
||||
@ -93,7 +93,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_SCISSOR_RECT;
|
||||
op->rect = *rect;
|
||||
|
||||
@@ -916,7 +916,7 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
|
||||
@@ -906,7 +906,7 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
|
||||
{
|
||||
struct wined3d_cs_set_rendertarget_view *op;
|
||||
|
||||
@ -102,7 +102,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_RENDERTARGET_VIEW;
|
||||
op->view_idx = view_idx;
|
||||
op->view = view;
|
||||
@@ -967,7 +967,7 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3
|
||||
@@ -957,7 +957,7 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3
|
||||
{
|
||||
struct wined3d_cs_set_depth_stencil_view *op;
|
||||
|
||||
@ -111,7 +111,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_DEPTH_STENCIL_VIEW;
|
||||
op->view = view;
|
||||
|
||||
@@ -988,7 +988,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
|
||||
@@ -978,7 +978,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
|
||||
{
|
||||
struct wined3d_cs_set_vertex_declaration *op;
|
||||
|
||||
@ -120,7 +120,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_VERTEX_DECLARATION;
|
||||
op->declaration = declaration;
|
||||
|
||||
@@ -1022,7 +1022,7 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -1012,7 +1012,7 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
|
||||
{
|
||||
struct wined3d_cs_set_stream_source *op;
|
||||
|
||||
@ -129,7 +129,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_STREAM_SOURCE;
|
||||
op->stream_idx = stream_idx;
|
||||
op->buffer = buffer;
|
||||
@@ -1050,7 +1050,7 @@ void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_i
|
||||
@@ -1040,7 +1040,7 @@ void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_i
|
||||
{
|
||||
struct wined3d_cs_set_stream_source_freq *op;
|
||||
|
||||
@ -138,7 +138,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_STREAM_SOURCE_FREQ;
|
||||
op->stream_idx = stream_idx;
|
||||
op->frequency = frequency;
|
||||
@@ -1083,7 +1083,7 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -1073,7 +1073,7 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
|
||||
{
|
||||
struct wined3d_cs_set_stream_output *op;
|
||||
|
||||
@ -147,7 +147,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_STREAM_OUTPUT;
|
||||
op->stream_idx = stream_idx;
|
||||
op->buffer = buffer;
|
||||
@@ -1117,7 +1117,7 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
|
||||
@@ -1107,7 +1107,7 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
|
||||
{
|
||||
struct wined3d_cs_set_index_buffer *op;
|
||||
|
||||
@ -156,7 +156,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_INDEX_BUFFER;
|
||||
op->buffer = buffer;
|
||||
op->format_id = format_id;
|
||||
@@ -1148,7 +1148,7 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
|
||||
@@ -1138,7 +1138,7 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
|
||||
{
|
||||
struct wined3d_cs_set_constant_buffer *op;
|
||||
|
||||
@ -165,7 +165,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_CONSTANT_BUFFER;
|
||||
op->type = type;
|
||||
op->cb_idx = cb_idx;
|
||||
@@ -1242,7 +1242,7 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
|
||||
@@ -1232,7 +1232,7 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
|
||||
{
|
||||
struct wined3d_cs_set_texture *op;
|
||||
|
||||
@ -174,7 +174,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_TEXTURE;
|
||||
op->stage = stage;
|
||||
op->texture = texture;
|
||||
@@ -1276,7 +1276,7 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
|
||||
@@ -1266,7 +1266,7 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
|
||||
{
|
||||
struct wined3d_cs_set_shader_resource_view *op;
|
||||
|
||||
@ -183,7 +183,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_SHADER_RESOURCE_VIEW;
|
||||
op->type = type;
|
||||
op->view_idx = view_idx;
|
||||
@@ -1308,7 +1308,7 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
|
||||
@@ -1298,7 +1298,7 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
|
||||
{
|
||||
struct wined3d_cs_set_unordered_access_view *op;
|
||||
|
||||
@ -192,7 +192,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_UNORDERED_ACCESS_VIEW;
|
||||
op->pipeline = pipeline;
|
||||
op->view_idx = view_idx;
|
||||
@@ -1335,7 +1335,7 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
@@ -1325,7 +1325,7 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
{
|
||||
struct wined3d_cs_set_sampler *op;
|
||||
|
||||
@ -201,7 +201,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_SAMPLER;
|
||||
op->type = type;
|
||||
op->sampler_idx = sampler_idx;
|
||||
@@ -1362,7 +1362,7 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
@@ -1352,7 +1352,7 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
{
|
||||
struct wined3d_cs_set_shader *op;
|
||||
|
||||
@ -210,7 +210,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_SHADER;
|
||||
op->type = type;
|
||||
op->shader = shader;
|
||||
@@ -1385,7 +1385,7 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
|
||||
@@ -1375,7 +1375,7 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
|
||||
{
|
||||
struct wined3d_cs_set_rasterizer_state *op;
|
||||
|
||||
@ -219,7 +219,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_RASTERIZER_STATE;
|
||||
op->state = rasterizer_state;
|
||||
|
||||
@@ -1406,7 +1406,7 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
|
||||
@@ -1396,7 +1396,7 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
|
||||
{
|
||||
struct wined3d_cs_set_render_state *op;
|
||||
|
||||
@ -228,7 +228,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_RENDER_STATE;
|
||||
op->state = state;
|
||||
op->value = value;
|
||||
@@ -1429,7 +1429,7 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
|
||||
@@ -1419,7 +1419,7 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
|
||||
{
|
||||
struct wined3d_cs_set_texture_state *op;
|
||||
|
||||
@ -237,7 +237,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_TEXTURE_STATE;
|
||||
op->stage = stage;
|
||||
op->state = state;
|
||||
@@ -1453,7 +1453,7 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
|
||||
@@ -1443,7 +1443,7 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
|
||||
{
|
||||
struct wined3d_cs_set_sampler_state *op;
|
||||
|
||||
@ -246,7 +246,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_SAMPLER_STATE;
|
||||
op->sampler_idx = sampler_idx;
|
||||
op->state = state;
|
||||
@@ -1478,7 +1478,7 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
|
||||
@@ -1468,7 +1468,7 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
|
||||
{
|
||||
struct wined3d_cs_set_transform *op;
|
||||
|
||||
@ -255,7 +255,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_TRANSFORM;
|
||||
op->state = state;
|
||||
op->matrix = *matrix;
|
||||
@@ -1500,7 +1500,7 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
|
||||
@@ -1490,7 +1490,7 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
|
||||
{
|
||||
struct wined3d_cs_set_clip_plane *op;
|
||||
|
||||
@ -264,7 +264,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_CLIP_PLANE;
|
||||
op->plane_idx = plane_idx;
|
||||
op->plane = *plane;
|
||||
@@ -1578,7 +1578,7 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
|
||||
@@ -1568,7 +1568,7 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
|
||||
{
|
||||
struct wined3d_cs_set_color_key *op;
|
||||
|
||||
@ -273,7 +273,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_COLOR_KEY;
|
||||
op->texture = texture;
|
||||
op->flags = flags;
|
||||
@@ -1607,7 +1607,7 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
|
||||
@@ -1597,7 +1597,7 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
|
||||
{
|
||||
struct wined3d_cs_set_material *op;
|
||||
|
||||
@ -282,7 +282,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_MATERIAL;
|
||||
op->material = *material;
|
||||
|
||||
@@ -1657,7 +1657,7 @@ void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light
|
||||
@@ -1647,7 +1647,7 @@ void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light
|
||||
{
|
||||
struct wined3d_cs_set_light *op;
|
||||
|
||||
@ -291,7 +291,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_LIGHT;
|
||||
op->light = *light;
|
||||
|
||||
@@ -1692,7 +1692,7 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, unsigned int idx, B
|
||||
@@ -1682,7 +1682,7 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, unsigned int idx, B
|
||||
{
|
||||
struct wined3d_cs_set_light_enable *op;
|
||||
|
||||
@ -300,7 +300,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_LIGHT_ENABLE;
|
||||
op->idx = idx;
|
||||
op->enable = enable;
|
||||
@@ -1716,7 +1716,7 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
@@ -1706,7 +1706,7 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
{
|
||||
struct wined3d_cs_reset_state *op;
|
||||
|
||||
@ -309,7 +309,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
op->opcode = WINED3D_CS_OP_RESET_STATE;
|
||||
|
||||
cs->ops->submit(cs);
|
||||
@@ -1735,7 +1735,7 @@ static void wined3d_cs_emit_callback(struct wined3d_cs *cs, void (*callback)(voi
|
||||
@@ -1725,7 +1725,7 @@ static void wined3d_cs_emit_callback(struct wined3d_cs *cs, void (*callback)(voi
|
||||
{
|
||||
struct wined3d_cs_callback *op;
|
||||
|
||||
@ -318,7 +318,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
op->opcode = WINED3D_CS_OP_CALLBACK;
|
||||
op->callback = callback;
|
||||
op->object = object;
|
||||
@@ -1767,7 +1767,7 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
|
||||
@@ -1757,7 +1757,7 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
|
||||
{
|
||||
struct wined3d_cs_query_issue *op;
|
||||
|
||||
@ -327,7 +327,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
op->opcode = WINED3D_CS_OP_QUERY_ISSUE;
|
||||
op->query = query;
|
||||
op->flags = flags;
|
||||
@@ -1790,7 +1790,7 @@ BOOL wined3d_cs_emit_query_poll(struct wined3d_cs *cs, struct wined3d_query *que
|
||||
@@ -1780,7 +1780,7 @@ BOOL wined3d_cs_emit_query_poll(struct wined3d_cs *cs, struct wined3d_query *que
|
||||
struct wined3d_cs_query_poll *op;
|
||||
BOOL ret;
|
||||
|
||||
@ -336,7 +336,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
op->opcode = WINED3D_CS_OP_QUERY_POLL;
|
||||
op->query = query;
|
||||
op->flags = flags;
|
||||
@@ -1816,7 +1816,7 @@ void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_reso
|
||||
@@ -1806,7 +1806,7 @@ void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_reso
|
||||
{
|
||||
struct wined3d_cs_preload_resource *op;
|
||||
|
||||
@ -345,7 +345,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
op->opcode = WINED3D_CS_OP_PRELOAD_RESOURCE;
|
||||
op->resource = resource;
|
||||
|
||||
@@ -1840,7 +1840,7 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou
|
||||
@@ -1830,7 +1830,7 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou
|
||||
{
|
||||
struct wined3d_cs_unload_resource *op;
|
||||
|
||||
@ -354,7 +354,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
op->opcode = WINED3D_CS_OP_UNLOAD_RESOURCE;
|
||||
op->resource = resource;
|
||||
|
||||
@@ -1866,7 +1866,7 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||
@@ -1856,7 +1856,7 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||
struct wined3d_cs_map *op;
|
||||
HRESULT hr;
|
||||
|
||||
@ -363,7 +363,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
op->opcode = WINED3D_CS_OP_MAP;
|
||||
op->resource = resource;
|
||||
op->sub_resource_idx = sub_resource_idx;
|
||||
@@ -1895,7 +1895,7 @@ HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resourc
|
||||
@@ -1885,7 +1885,7 @@ HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resourc
|
||||
struct wined3d_cs_unmap *op;
|
||||
HRESULT hr;
|
||||
|
||||
@ -372,7 +372,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
op->opcode = WINED3D_CS_OP_UNMAP;
|
||||
op->resource = resource;
|
||||
op->sub_resource_idx = sub_resource_idx;
|
||||
@@ -1956,7 +1956,7 @@ void wined3d_cs_emit_blt_sub_resource(struct wined3d_cs *cs, struct wined3d_reso
|
||||
@@ -1946,7 +1946,7 @@ void wined3d_cs_emit_blt_sub_resource(struct wined3d_cs *cs, struct wined3d_reso
|
||||
{
|
||||
struct wined3d_cs_blt_sub_resource *op;
|
||||
|
||||
@ -381,7 +381,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
op->opcode = WINED3D_CS_OP_BLT_SUB_RESOURCE;
|
||||
op->dst_resource = dst_resource;
|
||||
op->dst_sub_resource_idx = dst_sub_resource_idx;
|
||||
@@ -2035,7 +2035,7 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
|
||||
@@ -2025,7 +2025,7 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
|
||||
{
|
||||
struct wined3d_cs_update_sub_resource *op;
|
||||
|
||||
@ -390,7 +390,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
op->opcode = WINED3D_CS_OP_UPDATE_SUB_RESOURCE;
|
||||
op->resource = resource;
|
||||
op->sub_resource_idx = sub_resource_idx;
|
||||
@@ -2100,7 +2100,7 @@ void wined3d_cs_emit_push_constants(struct wined3d_cs *cs, enum wined3d_push_con
|
||||
@@ -2090,7 +2090,7 @@ void wined3d_cs_emit_push_constants(struct wined3d_cs *cs, enum wined3d_push_con
|
||||
{
|
||||
struct wined3d_cs_push_constants *op;
|
||||
|
||||
@ -399,7 +399,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
op->opcode = WINED3D_CS_OP_PUSH_CONSTANTS;
|
||||
op->p = p;
|
||||
op->start_idx = start_idx;
|
||||
@@ -2131,7 +2131,7 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
|
||||
@@ -2121,7 +2121,7 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
|
||||
{
|
||||
struct wined3d_cs_clear_rtv *op;
|
||||
|
||||
@ -408,7 +408,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
op->opcode = WINED3D_CS_OP_CLEAR_RTV;
|
||||
op->view = view;
|
||||
op->rect = *rect;
|
||||
@@ -2167,7 +2167,7 @@ void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_textur
|
||||
@@ -2157,7 +2157,7 @@ void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_textur
|
||||
{
|
||||
struct wined3d_cs_update_texture *op;
|
||||
|
||||
@ -417,25 +417,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
op->opcode = WINED3D_CS_OP_UPDATE_TEXTURE;
|
||||
op->src = src;
|
||||
op->dst = dst;
|
||||
@@ -2193,7 +2193,7 @@ HRESULT wined3d_cs_emit_get_dc(struct wined3d_cs *cs, struct wined3d_texture *te
|
||||
struct wined3d_cs_get_release_dc *op;
|
||||
HRESULT hr;
|
||||
|
||||
- op = cs->ops->require_space(cs, sizeof(*op));
|
||||
+ op = cs->ops->require_space(cs, sizeof(*op), 0);
|
||||
op->opcode = WINED3D_CS_OP_GET_DC;
|
||||
op->texture = texture;
|
||||
op->sub_resource_idx = sub_resource_idx;
|
||||
@@ -2219,7 +2219,7 @@ HRESULT wined3d_cs_emit_release_dc(struct wined3d_cs *cs, struct wined3d_texture
|
||||
struct wined3d_cs_get_release_dc *op;
|
||||
HRESULT hr;
|
||||
|
||||
- op = cs->ops->require_space(cs, sizeof(*op));
|
||||
+ op = cs->ops->require_space(cs, sizeof(*op), 0);
|
||||
op->opcode = WINED3D_CS_OP_RELEASE_DC;
|
||||
op->texture = texture;
|
||||
op->sub_resource_idx = sub_resource_idx;
|
||||
@@ -2243,7 +2243,7 @@ void wined3d_cs_emit_update_swap_interval(struct wined3d_cs *cs, struct wined3d_
|
||||
@@ -2181,7 +2181,7 @@ void wined3d_cs_emit_update_swap_interval(struct wined3d_cs *cs, struct wined3d_
|
||||
{
|
||||
struct wined3d_cs_update_swap_interval *op;
|
||||
|
||||
@ -444,7 +426,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
op->opcode = WINED3D_CS_OP_UPDATE_SWAP_INTERVAL;
|
||||
op->swapchain = swapchain;
|
||||
|
||||
@@ -2281,7 +2281,7 @@ void wined3d_cs_emit_texture_add_dirty_region(struct wined3d_cs *cs,
|
||||
@@ -2219,7 +2219,7 @@ void wined3d_cs_emit_texture_add_dirty_region(struct wined3d_cs *cs,
|
||||
if (dirty_region)
|
||||
WARN("Ignoring dirty_region %s.\n", debug_box(dirty_region));
|
||||
|
||||
@ -453,7 +435,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
op->opcode = WINED3D_CS_OP_TEXTURE_ADD_DIRTY_REGION;
|
||||
op->texture = texture;
|
||||
op->sub_resource_idx = sub_resource_idx;
|
||||
@@ -2344,7 +2344,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -2280,7 +2280,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_TEXTURE_ADD_DIRTY_REGION */ wined3d_cs_exec_texture_add_dirty_region,
|
||||
};
|
||||
|
||||
@ -462,7 +444,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
{
|
||||
if (size > (cs->data_size - cs->end))
|
||||
{
|
||||
@@ -2428,6 +2428,8 @@ static struct wined3d_cs_block *wined3d_cs_dequeue_command(struct wined3d_cs *cs
|
||||
@@ -2364,6 +2364,8 @@ static struct wined3d_cs_block *wined3d_cs_dequeue_command(struct wined3d_cs *cs
|
||||
/* FIXME: Use an event to wait after a couple of spins. */
|
||||
for (;;)
|
||||
{
|
||||
@ -471,7 +453,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
if ((block = wined3d_cs_list_dequeue(&cs->exec_list)))
|
||||
return block;
|
||||
}
|
||||
@@ -2455,7 +2457,7 @@ static void wined3d_cs_list_cleanup(struct wined3d_cs_list *list)
|
||||
@@ -2391,7 +2393,7 @@ static void wined3d_cs_list_cleanup(struct wined3d_cs_list *list)
|
||||
DeleteCriticalSection(&list->lock);
|
||||
}
|
||||
|
||||
@ -480,7 +462,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
{
|
||||
struct wined3d_cs_block *block;
|
||||
|
||||
@@ -2469,26 +2471,28 @@ static struct wined3d_cs_block *wined3d_cs_get_block(struct wined3d_cs *cs)
|
||||
@@ -2405,26 +2407,28 @@ static struct wined3d_cs_block *wined3d_cs_get_block(struct wined3d_cs *cs)
|
||||
}
|
||||
|
||||
block->pos = 0;
|
||||
@ -513,7 +495,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
cs->current_block = block;
|
||||
}
|
||||
|
||||
@@ -2500,10 +2504,13 @@ static void *wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size)
|
||||
@@ -2436,10 +2440,13 @@ static void *wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size)
|
||||
|
||||
static void wined3d_cs_mt_submit(struct wined3d_cs *cs)
|
||||
{
|
||||
@ -528,7 +510,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
cs->current_block = NULL;
|
||||
}
|
||||
|
||||
@@ -2517,7 +2524,7 @@ static void wined3d_cs_mt_submit_and_wait(struct wined3d_cs *cs)
|
||||
@@ -2453,7 +2460,7 @@ static void wined3d_cs_mt_submit_and_wait(struct wined3d_cs *cs)
|
||||
|
||||
block = cs->current_block;
|
||||
block->fence = &fence;
|
||||
@ -537,7 +519,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
cs->current_block = NULL;
|
||||
|
||||
/* A busy wait should be fine, we're not supposed to have to wait very
|
||||
@@ -2539,7 +2546,7 @@ static void wined3d_cs_mt_emit_stop(struct wined3d_cs *cs)
|
||||
@@ -2475,7 +2482,7 @@ static void wined3d_cs_mt_emit_stop(struct wined3d_cs *cs)
|
||||
assert(cs->thread_id != GetCurrentThreadId());
|
||||
assert(cs->ops == &wined3d_cs_mt_ops);
|
||||
|
||||
@ -546,7 +528,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
op->opcode = WINED3D_CS_OP_STOP;
|
||||
|
||||
cs->ops->submit(cs);
|
||||
@@ -2625,6 +2632,7 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
@@ -2561,6 +2568,7 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
|
||||
wined3d_cs_list_init(&cs->free_list);
|
||||
wined3d_cs_list_init(&cs->exec_list);
|
||||
@ -554,7 +536,7 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
|
||||
if (!(cs->thread = CreateThread(NULL, 0, wined3d_cs_run, cs, 0, &cs->thread_id)))
|
||||
{
|
||||
@@ -2650,6 +2658,7 @@ void wined3d_cs_destroy(struct wined3d_cs *cs)
|
||||
@@ -2586,6 +2594,7 @@ void wined3d_cs_destroy(struct wined3d_cs *cs)
|
||||
WaitForSingleObject(cs->thread, INFINITE);
|
||||
CloseHandle(cs->thread);
|
||||
|
||||
@ -563,10 +545,10 @@ index 3f629388176..8b92a76e4d4 100644
|
||||
wined3d_cs_list_cleanup(&cs->free_list);
|
||||
}
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 508c4cba0e9..0223a6c3cac 100644
|
||||
index 4e8fca716e..a6a51fea0a 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -3220,13 +3220,14 @@ struct wined3d_cs_block
|
||||
@@ -3227,13 +3227,14 @@ struct wined3d_cs_block
|
||||
{
|
||||
struct list entry;
|
||||
UINT pos;
|
||||
@ -582,7 +564,7 @@ index 508c4cba0e9..0223a6c3cac 100644
|
||||
void (*submit)(struct wined3d_cs *cs);
|
||||
void (*submit_and_wait)(struct wined3d_cs *cs);
|
||||
};
|
||||
@@ -3246,6 +3247,7 @@ struct wined3d_cs
|
||||
@@ -3253,6 +3254,7 @@ struct wined3d_cs
|
||||
struct wined3d_cs_block *current_block;
|
||||
struct wined3d_cs_list free_list;
|
||||
struct wined3d_cs_list exec_list;
|
||||
|
@ -1,56 +0,0 @@
|
||||
From 125cc8384a0f759df49cbf0e753877c3057ba2d1 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Wed, 8 Feb 2017 11:57:52 +0100
|
||||
Subject: wined3d: Use priority queue for get_dc / release_dc.
|
||||
|
||||
---
|
||||
dlls/wined3d/cs.c | 4 ++--
|
||||
dlls/wined3d/texture.c | 4 ++++
|
||||
2 files changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 1c9d8e1d192..1d2d9d7b990 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -2210,7 +2210,7 @@ HRESULT wined3d_cs_emit_get_dc(struct wined3d_cs *cs, struct wined3d_texture *te
|
||||
struct wined3d_cs_get_release_dc *op;
|
||||
HRESULT hr;
|
||||
|
||||
- op = cs->ops->require_space(cs, sizeof(*op), 0);
|
||||
+ op = cs->ops->require_space(cs, sizeof(*op), 1);
|
||||
op->opcode = WINED3D_CS_OP_GET_DC;
|
||||
op->texture = texture;
|
||||
op->sub_resource_idx = sub_resource_idx;
|
||||
@@ -2236,7 +2236,7 @@ HRESULT wined3d_cs_emit_release_dc(struct wined3d_cs *cs, struct wined3d_texture
|
||||
struct wined3d_cs_get_release_dc *op;
|
||||
HRESULT hr;
|
||||
|
||||
- op = cs->ops->require_space(cs, sizeof(*op), 0);
|
||||
+ op = cs->ops->require_space(cs, sizeof(*op), 1);
|
||||
op->opcode = WINED3D_CS_OP_RELEASE_DC;
|
||||
op->texture = texture;
|
||||
op->sub_resource_idx = sub_resource_idx;
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index bff7452e773..18ae2ae23cf 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -3536,6 +3536,8 @@ 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;
|
||||
|
||||
+ wined3d_resource_wait_idle(&texture->resource);
|
||||
+
|
||||
hr = wined3d_cs_emit_get_dc(device->cs, texture, sub_resource_idx);
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
@@ -3592,5 +3594,7 @@ HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsign
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
+ wined3d_resource_wait_idle(&texture->resource);
|
||||
+
|
||||
return wined3d_cs_emit_release_dc(device->cs, texture, sub_resource_idx);
|
||||
}
|
||||
--
|
||||
2.11.0
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user