Rebase against 35ca862025fa14065d4ebed761783de225cb6690.

This commit is contained in:
Sebastian Lackner 2017-04-10 18:40:48 +02:00
parent e4ac3ea735
commit d06996cabd
11 changed files with 465 additions and 609 deletions

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "8b1737c0fdf1d3d905bea281d9241f1f48f333e9"
echo "35ca862025fa14065d4ebed761783de225cb6690"
}
# Show version information
@ -8756,7 +8756,6 @@ if test "$enable_wined3d_CSMT_Main" -eq 1; then
printf '%s\n' '+ { "Sebastian Lackner", "wined3d: Send push_constants through the CS.", 1 },';
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Prevent the command stream from running ahead too far.", 1 },';
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Send blits through the command stream.", 1 },';
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' '+ { "Sebastian Lackner", "wined3d: Send query_poll through the command stream.", 1 },';

View File

@ -1,119 +0,0 @@
From 31bc8f2369c91f82e5773ce8be5de3701030387a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 4 Jul 2013 21:10:16 +0200
Subject: wined3d: Send render target view clears through the command stream
---
dlls/wined3d/cs.c | 46 ++++++++++++++++++++++++++++++++++++++++++
dlls/wined3d/device.c | 2 +-
dlls/wined3d/wined3d_private.h | 3 +++
3 files changed, 50 insertions(+), 1 deletion(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 80a9322224..04dac9b4ed 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -68,6 +68,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_BLT_SUB_RESOURCE,
WINED3D_CS_OP_UPDATE_SUB_RESOURCE,
WINED3D_CS_OP_PUSH_CONSTANTS,
+ WINED3D_CS_OP_CLEAR_RTV,
};
struct wined3d_cs_sync
@@ -391,6 +392,18 @@ struct wined3d_cs_push_constants
BYTE constants[1];
};
+struct wined3d_cs_clear_rtv
+{
+ enum wined3d_cs_op opcode;
+ struct wined3d_rendertarget_view *view;
+ RECT rect;
+ DWORD flags;
+ struct wined3d_color color;
+ float depth;
+ DWORD stencil;
+ const struct wined3d_blitter_ops *blitter;
+};
+
static void wined3d_cs_exec_sync(struct wined3d_cs *cs, const void *data)
{
}
@@ -1952,6 +1965,38 @@ void wined3d_cs_emit_push_constants(struct wined3d_cs *cs, enum wined3d_push_con
cs->ops->submit(cs);
}
+static void wined3d_cs_exec_clear_rtv(struct wined3d_cs *cs, const void *data)
+{
+ const struct wined3d_cs_clear_rtv *op = data;
+ struct wined3d_device *device = cs->device;
+
+ op->blitter->blitter_clear(device, op->view, &op->rect, op->flags, &op->color, op->depth, op->stencil);
+
+ wined3d_resource_release(op->view->resource);
+}
+
+void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarget_view *view,
+ const RECT *rect, DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil,
+ const struct wined3d_blitter_ops *blitter)
+{
+ struct wined3d_cs_clear_rtv *op;
+
+ op = cs->ops->require_space(cs, sizeof(*op));
+ op->opcode = WINED3D_CS_OP_CLEAR_RTV;
+ op->view = view;
+ op->rect = *rect;
+ op->flags = flags;
+ if (flags & WINED3DCLEAR_TARGET)
+ op->color = *color;
+ op->depth = depth;
+ op->stencil = stencil;
+ op->blitter = blitter;
+
+ wined3d_resource_acquire(view->resource);
+
+ cs->ops->submit(cs);
+}
+
static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_SYNC */ wined3d_cs_exec_sync,
@@ -1996,6 +2041,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_BLT_SUB_RESOURCE */ wined3d_cs_exec_blt_sub_resource,
/* WINED3D_CS_OP_UPDATE_SUB_RESOURCE */ wined3d_cs_exec_update_sub_resource,
/* WINED3D_CS_OP_PUSH_CONSTANTS */ wined3d_cs_exec_push_constants,
+ /* WINED3D_CS_OP_CLEAR_RTV */ wined3d_cs_exec_clear_rtv,
};
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 1fa212fd33..e019982d29 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -4324,7 +4324,7 @@ HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *devi
return WINED3DERR_INVALIDCALL;
}
- blitter->blitter_clear(device, view, rect, flags, color, depth, stencil);
+ wined3d_cs_emit_clear_rtv(device->cs, view, rect, flags, color, depth, stencil, blitter);
return WINED3D_OK;
}
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index c0327d6ce2..87f111e1ab 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3235,6 +3235,9 @@ void wined3d_cs_emit_blt_sub_resource(struct wined3d_cs *cs, struct wined3d_reso
const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *rects,
DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarget_view *view,
+ const RECT *rect, DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil,
+ const struct wined3d_blitter_ops *blitter) DECLSPEC_HIDDEN;
void wined3d_cs_emit_dispatch(struct wined3d_cs *cs,
unsigned int group_count_x, unsigned int group_count_y, unsigned int group_count_z) DECLSPEC_HIDDEN;
void wined3d_cs_emit_draw(struct wined3d_cs *cs, GLenum primitive_type, int base_vertex_idx,
--
2.11.0

View File

@ -1,4 +1,4 @@
From 27c6d619ed9ad1090a5ee9724e25492f5d945de7 Mon Sep 17 00:00:00 2001
From 2a7eaa9e87e874b19ee60afa4cdf9c6bf23a0dd6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 1 Aug 2013 00:33:48 +0200
Subject: wined3d: Send update_texture calls through the CS
@ -11,19 +11,19 @@ FIXME: This logic duplication is ugly.
3 files changed, 141 insertions(+), 75 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 72e177a41e..82dbe684e2 100644
index 811a8af1ce..1c67ab0f1c 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -69,6 +69,7 @@ enum wined3d_cs_op
@@ -68,6 +68,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_BLT_SUB_RESOURCE,
WINED3D_CS_OP_UPDATE_SUB_RESOURCE,
WINED3D_CS_OP_PUSH_CONSTANTS,
WINED3D_CS_OP_CLEAR_RTV,
+ WINED3D_CS_OP_UPDATE_TEXTURE,
};
struct wined3d_cs_sync
@@ -404,6 +405,12 @@ struct wined3d_cs_clear_rtv
const struct wined3d_blitter_ops *blitter;
@@ -394,6 +395,12 @@ struct wined3d_cs_push_constants
BYTE constants[1];
};
+struct wined3d_cs_update_texture
@ -35,7 +35,7 @@ index 72e177a41e..82dbe684e2 100644
static void wined3d_cs_exec_sync(struct wined3d_cs *cs, const void *data)
{
}
@@ -1988,6 +1995,35 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
@@ -1999,6 +2006,35 @@ void wined3d_cs_emit_push_constants(struct wined3d_cs *cs, enum wined3d_push_con
cs->ops->submit(cs);
}
@ -71,19 +71,19 @@ index 72e177a41e..82dbe684e2 100644
static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_SYNC */ wined3d_cs_exec_sync,
@@ -2033,6 +2069,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2043,6 +2079,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_BLT_SUB_RESOURCE */ wined3d_cs_exec_blt_sub_resource,
/* WINED3D_CS_OP_UPDATE_SUB_RESOURCE */ wined3d_cs_exec_update_sub_resource,
/* WINED3D_CS_OP_PUSH_CONSTANTS */ wined3d_cs_exec_push_constants,
/* WINED3D_CS_OP_CLEAR_RTV */ wined3d_cs_exec_clear_rtv,
+ /* WINED3D_CS_OP_UPDATE_TEXTURE */ wined3d_cs_exec_update_texture,
};
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 1805cd71a8..0192552a14 100644
index bac505d3a8..acc1916747 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -3667,34 +3667,17 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device
@@ -3656,34 +3656,17 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device
start_idx, index_count, start_instance, instance_count, TRUE);
}
@ -122,7 +122,7 @@ index 1805cd71a8..0192552a14 100644
/* Only a prepare, since we're uploading entire volumes. */
wined3d_texture_prepare_texture(dst_texture, context, FALSE);
@@ -3702,32 +3685,89 @@ static HRESULT wined3d_device_update_texture_3d(struct wined3d_device *device,
@@ -3691,32 +3674,89 @@ static HRESULT wined3d_device_update_texture_3d(struct wined3d_device *device,
for (i = 0; i < level_count; ++i)
{
@ -222,7 +222,7 @@ index 1805cd71a8..0192552a14 100644
TRACE("device %p, src_texture %p, dst_texture %p.\n", device, src_texture, dst_texture);
@@ -3764,63 +3804,48 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
@@ -3753,63 +3793,48 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
return WINED3DERR_INVALIDCALL;
}
@ -316,10 +316,10 @@ index 1805cd71a8..0192552a14 100644
HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device, DWORD *num_passes)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 59b446167b..7026544526 100644
index d5bc41defb..b9839e6c41 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2709,6 +2709,8 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
@@ -2715,6 +2715,8 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
void device_resource_add(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
void device_resource_released(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
void device_invalidate_state(const struct wined3d_device *device, DWORD state) DECLSPEC_HIDDEN;
@ -328,7 +328,7 @@ index 59b446167b..7026544526 100644
static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD state)
{
@@ -3299,6 +3301,8 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou
@@ -3302,6 +3304,8 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou
void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_resource *resource,
unsigned int sub_resource_idx, const struct wined3d_box *box, const void *data, unsigned int row_pitch,
unsigned int slice_pitch) DECLSPEC_HIDDEN;

View File

@ -1,4 +1,4 @@
From d3e3b9bf7f27aa281a7e930f70018006ca20258e Mon Sep 17 00:00:00 2001
From 4d40a30b39e380e7b1b4bdf5a297340e3483305d 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,18 +10,18 @@ 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 6d01424bda..1da3addcdd 100644
index 058dca866e..cfcbbfbacc 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -71,6 +71,7 @@ enum wined3d_cs_op
@@ -70,6 +70,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_UPDATE_SUB_RESOURCE,
WINED3D_CS_OP_PUSH_CONSTANTS,
WINED3D_CS_OP_CLEAR_RTV,
WINED3D_CS_OP_UPDATE_TEXTURE,
+ WINED3D_CS_OP_UPDATE_SWAP_INTERVAL,
};
struct wined3d_cs_sync
@@ -420,6 +421,12 @@ struct wined3d_cs_update_texture
@@ -410,6 +411,12 @@ struct wined3d_cs_update_texture
struct wined3d_texture *src, *dst;
};
@ -34,7 +34,7 @@ index 6d01424bda..1da3addcdd 100644
static void wined3d_cs_exec_sync(struct wined3d_cs *cs, const void *data)
{
}
@@ -2057,6 +2064,24 @@ void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_textur
@@ -2068,6 +2075,24 @@ void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_textur
cs->ops->submit(cs);
}
@ -59,19 +59,19 @@ index 6d01424bda..1da3addcdd 100644
static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_SYNC */ wined3d_cs_exec_sync,
@@ -2104,6 +2129,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2114,6 +2139,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_UPDATE_SUB_RESOURCE */ wined3d_cs_exec_update_sub_resource,
/* WINED3D_CS_OP_PUSH_CONSTANTS */ wined3d_cs_exec_push_constants,
/* WINED3D_CS_OP_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,
};
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 eb8c86f954..bf48c71564 100644
index acc1916747..ef136e813f 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -4907,7 +4907,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
@@ -4903,7 +4903,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
{
if (reset_state)
hr = wined3d_device_create_primary_opengl_context(device);
@ -81,7 +81,7 @@ index eb8c86f954..bf48c71564 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 9d25bae822..b5a27dcbac 100644
index 6863825f45..f377367b6f 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3305,6 +3305,7 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou

View File

@ -1,4 +1,4 @@
From b3788f5f7f5a57baeb565e5d3a08cfaf263de01e Mon Sep 17 00:00:00 2001
From 9fcf11a9d8a434369e31ab08c7f6b80f47b5203a 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 1da3addcdd..d0c0d94537 100644
index cfcbbfbacc..e380f9edcb 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -72,6 +72,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_CLEAR_RTV,
@@ -71,6 +71,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_PUSH_CONSTANTS,
WINED3D_CS_OP_UPDATE_TEXTURE,
WINED3D_CS_OP_UPDATE_SWAP_INTERVAL,
+ WINED3D_CS_OP_TEXTURE_ADD_DIRTY_REGION,
};
struct wined3d_cs_sync
@@ -427,6 +428,13 @@ struct wined3d_cs_update_swap_interval
@@ -417,6 +418,13 @@ struct wined3d_cs_update_swap_interval
struct wined3d_swapchain *swapchain;
};
@ -36,7 +36,7 @@ index 1da3addcdd..d0c0d94537 100644
static void wined3d_cs_exec_sync(struct wined3d_cs *cs, const void *data)
{
}
@@ -2082,6 +2090,45 @@ void wined3d_cs_emit_update_swap_interval(struct wined3d_cs *cs, struct wined3d_
@@ -2093,6 +2101,45 @@ void wined3d_cs_emit_update_swap_interval(struct wined3d_cs *cs, struct wined3d_
cs->ops->submit_and_wait(cs);
}
@ -82,8 +82,8 @@ index 1da3addcdd..d0c0d94537 100644
static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_SYNC */ wined3d_cs_exec_sync,
@@ -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,
@@ -2140,6 +2187,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_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,
@ -91,10 +91,10 @@ index 1da3addcdd..d0c0d94537 100644
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index 41da65112d..7edb214c2a 100644
index 2b249c26c0..700e587f8d 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -1658,7 +1658,6 @@ static struct wined3d_texture_sub_resource *wined3d_texture_get_sub_resource(str
@@ -1654,7 +1654,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 41da65112d..7edb214c2a 100644
unsigned int sub_resource_idx;
TRACE("texture %p, layer %u, dirty_region %s.\n", texture, layer, debug_box(dirty_region));
@@ -1670,19 +1669,7 @@ HRESULT CDECL wined3d_texture_add_dirty_region(struct wined3d_texture *texture,
@@ -1666,19 +1665,7 @@ HRESULT CDECL wined3d_texture_add_dirty_region(struct wined3d_texture *texture,
}
sub_resource_idx = layer * texture->level_count;
@ -124,7 +124,7 @@ index 41da65112d..7edb214c2a 100644
}
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index b5a27dcbac..c846148069 100644
index f377367b6f..21bc1cde7e 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3300,6 +3300,8 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined

View File

@ -1,4 +1,4 @@
From 31a69723040b5337806a75dc3b9706da2e4dbe08 Mon Sep 17 00:00:00 2001
From 2c32b3dc13fe6872a69e430cb7cb0a2a2f111875 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Sun, 19 Feb 2017 05:10:26 +0100
Subject: wined3d: Add a separate variable to check if queries are started.
@ -9,19 +9,19 @@ Subject: wined3d: Add a separate variable to check if queries are started.
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
index 15935ab4469..70603367894 100644
index f437c49faa..5965a330d5 100644
--- a/dlls/wined3d/query.c
+++ b/dlls/wined3d/query.c
@@ -504,7 +504,7 @@ static void wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DWORD
@@ -491,7 +491,7 @@ static void wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DWORD
* restart. */
if (flags & WINED3DISSUE_BEGIN)
{
- if (query->state == QUERY_BUILDING)
+ if (oq->started)
{
if (oq->context->tid != GetCurrentThreadId())
if ((context = context_reacquire(device, oq->context)))
{
@@ -535,13 +535,14 @@ static void wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DWORD
@@ -518,13 +518,14 @@ static void wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DWORD
checkGLcall("glBeginQuery()");
context_release(context);
@ -35,10 +35,10 @@ index 15935ab4469..70603367894 100644
- if (query->state == QUERY_BUILDING)
+ if (oq->started)
{
if (oq->context->tid != GetCurrentThreadId())
if ((context = context_reacquire(device, oq->context)))
{
@@ -558,6 +559,7 @@ static void wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DWORD
context_release(context);
@@ -538,6 +539,7 @@ static void wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DWORD
FIXME("Wrong thread, can't end query.\n");
}
}
+ oq->started = FALSE;
@ -46,10 +46,10 @@ index 15935ab4469..70603367894 100644
}
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 7ad99bca086..9fa4d00c24f 100644
index b564036b55..7cef5c4dcb 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -1540,6 +1540,7 @@ struct wined3d_occlusion_query
@@ -1617,6 +1617,7 @@ struct wined3d_occlusion_query
GLuint id;
struct wined3d_context *context;
UINT64 samples;

View File

@ -1,18 +1,18 @@
From dbcafaa6d9d1c5e1ab39ea4e8afa970edce76e58 Mon Sep 17 00:00:00 2001
From 18746e1192dc09909f0e2478d35667e526230371 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 | 424 ++++++++++++++++++++++++++++++++++++-----
dlls/wined3d/cs.c | 428 ++++++++++++++++++++++++++++++++++++-----
dlls/wined3d/device.c | 2 +-
dlls/wined3d/wined3d_main.c | 10 +
dlls/wined3d/wined3d_private.h | 33 +++-
5 files changed, 416 insertions(+), 56 deletions(-)
5 files changed, 419 insertions(+), 57 deletions(-)
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 1d0aedd7ce..d0297d38e3 100644
index 71c683d119..2db127af3a 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -3787,6 +3787,9 @@ struct wined3d_context *context_acquire(const struct wined3d_device *device,
@ -26,7 +26,7 @@ index 1d0aedd7ce..d0297d38e3 100644
current_context = NULL;
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 41d639c329..bb8eefaa19 100644
index e380f9edcb..81695b7b14 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -18,6 +18,7 @@
@ -37,7 +37,7 @@ index 41d639c329..bb8eefaa19 100644
#include "wined3d_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3d);
@@ -73,6 +74,7 @@ enum wined3d_cs_op
@@ -72,6 +73,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_UPDATE_TEXTURE,
WINED3D_CS_OP_UPDATE_SWAP_INTERVAL,
WINED3D_CS_OP_TEXTURE_ADD_DIRTY_REGION,
@ -45,7 +45,15 @@ index 41d639c329..bb8eefaa19 100644
};
struct wined3d_cs_sync
@@ -435,8 +437,14 @@ struct wined3d_cs_texture_add_dirty_region
@@ -97,6 +99,7 @@ struct wined3d_cs_present
struct wined3d_cs_clear
{
enum wined3d_cs_op opcode;
+ unsigned int size;
DWORD flags;
unsigned int rt_count;
struct wined3d_fb_state *fb;
@@ -425,8 +428,14 @@ struct wined3d_cs_texture_add_dirty_region
unsigned int sub_resource_idx;
};
@ -61,7 +69,7 @@ index 41d639c329..bb8eefaa19 100644
}
void wined3d_cs_emit_sync(struct wined3d_cs *cs)
@@ -449,12 +457,14 @@ void wined3d_cs_emit_sync(struct wined3d_cs *cs)
@@ -439,12 +448,14 @@ void wined3d_cs_emit_sync(struct wined3d_cs *cs)
cs->ops->submit_and_wait(cs);
}
@ -77,7 +85,7 @@ index 41d639c329..bb8eefaa19 100644
}
void wined3d_cs_emit_glfinish(struct wined3d_cs *cs)
@@ -467,7 +477,7 @@ void wined3d_cs_emit_glfinish(struct wined3d_cs *cs)
@@ -457,7 +468,7 @@ void wined3d_cs_emit_glfinish(struct wined3d_cs *cs)
cs->ops->submit_and_wait(cs);
}
@ -86,7 +94,7 @@ index 41d639c329..bb8eefaa19 100644
{
const struct wined3d_cs_present *op = data;
struct wined3d_swapchain *swapchain;
@@ -485,6 +495,8 @@ static void wined3d_cs_exec_present(struct wined3d_cs *cs, const void *data)
@@ -475,6 +486,8 @@ static void wined3d_cs_exec_present(struct wined3d_cs *cs, const void *data)
{
wined3d_resource_release(&swapchain->back_buffers[i]->resource);
}
@ -95,7 +103,7 @@ index 41d639c329..bb8eefaa19 100644
}
void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *swapchain,
@@ -524,13 +536,14 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
@@ -514,7 +527,7 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
pending = InterlockedCompareExchange(&cs->pending_presents, 0, 0);
}
@ -104,23 +112,47 @@ index 41d639c329..bb8eefaa19 100644
{
const struct wined3d_state *state = &cs->state;
const struct wined3d_cs_clear *op = data;
struct wined3d_device *device;
unsigned int i;
RECT draw_rect;
+ size_t size = FIELD_OFFSET(struct wined3d_cs_clear, rects[op->rect_count]);
device = cs->device;
wined3d_get_draw_rect(state, &draw_rect);
@@ -548,6 +561,8 @@ static void wined3d_cs_exec_clear(struct wined3d_cs *cs, const void *data)
@@ -537,6 +550,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);
wined3d_resource_release(op->fb->depth_stencil->resource);
+
+ return size;
+ return op->size;
}
void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *rects,
@@ -686,7 +701,7 @@ static void release_unordered_access_resources(const struct wined3d_shader *shad
@@ -545,10 +560,12 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
unsigned int rt_count = cs->device->adapter->gl_info.limits.buffers;
const struct wined3d_state *state = &cs->device->state;
struct wined3d_cs_clear *op;
+ size_t size = FIELD_OFFSET(struct wined3d_cs_clear, rects[rect_count]);
unsigned int i;
- op = cs->ops->require_space(cs, FIELD_OFFSET(struct wined3d_cs_clear, rects[rect_count]));
+ op = cs->ops->require_space(cs, size);
op->opcode = WINED3D_CS_OP_CLEAR;
+ op->size = size;
op->flags = flags;
op->rt_count = rt_count;
op->fb = &cs->fb;
@@ -582,13 +599,15 @@ void wined3d_cs_emit_clear_rendertarget_view(struct wined3d_cs *cs, struct wined
struct wined3d_rendertarget_view *rt;
struct wined3d_fb_state fb;
} *extra;
+ size_t size = FIELD_OFFSET(struct wined3d_cs_clear, rects[1]) + sizeof(*extra);
- op = cs->ops->require_space(cs, FIELD_OFFSET(struct wined3d_cs_clear, rects[1]) + sizeof(*extra));
+ op = cs->ops->require_space(cs, size);
extra = (void *)&op->rects[1];
extra->fb.render_targets = &extra->rt;
op->fb = &extra->fb;
op->opcode = WINED3D_CS_OP_CLEAR;
+ op->size = size;
op->flags = flags;
if (flags & WINED3DCLEAR_TARGET)
{
@@ -720,7 +739,7 @@ static void release_unordered_access_resources(const struct wined3d_shader *shad
}
}
@ -129,7 +161,7 @@ index 41d639c329..bb8eefaa19 100644
{
const struct wined3d_cs_dispatch *op = data;
struct wined3d_state *state = &cs->state;
@@ -697,6 +712,8 @@ static void wined3d_cs_exec_dispatch(struct wined3d_cs *cs, const void *data)
@@ -731,6 +750,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 +170,7 @@ index 41d639c329..bb8eefaa19 100644
}
void wined3d_cs_emit_dispatch(struct wined3d_cs *cs,
@@ -718,7 +735,7 @@ void wined3d_cs_emit_dispatch(struct wined3d_cs *cs,
@@ -752,7 +773,7 @@ void wined3d_cs_emit_dispatch(struct wined3d_cs *cs,
cs->ops->submit(cs);
}
@ -147,7 +179,7 @@ index 41d639c329..bb8eefaa19 100644
{
struct wined3d_state *state = &cs->state;
const struct wined3d_cs_draw *op = data;
@@ -768,6 +785,8 @@ static void wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
@@ -802,6 +823,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 +188,7 @@ index 41d639c329..bb8eefaa19 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
@@ -852,12 +875,14 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, GLenum primitive_type, int base
cs->ops->submit(cs);
}
@ -172,7 +204,7 @@ index 41d639c329..bb8eefaa19 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
@@ -872,12 +897,14 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query
cs->ops->submit(cs);
}
@ -188,7 +220,7 @@ index 41d639c329..bb8eefaa19 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
@@ -891,12 +918,14 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
cs->ops->submit(cs);
}
@ -204,7 +236,7 @@ index 41d639c329..bb8eefaa19 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)
@@ -910,12 +939,14 @@ void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
cs->ops->submit(cs);
}
@ -220,7 +252,7 @@ index 41d639c329..bb8eefaa19 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
@@ -931,7 +962,7 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
cs->ops->submit(cs);
}
@ -229,7 +261,7 @@ index 41d639c329..bb8eefaa19 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
@@ -966,6 +997,8 @@ static void wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
}
device_invalidate_state(device, STATE_FRAMEBUFFER);
@ -238,7 +270,7 @@ index 41d639c329..bb8eefaa19 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
@@ -979,12 +1012,14 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3
cs->ops->submit(cs);
}
@ -254,7 +286,7 @@ index 41d639c329..bb8eefaa19 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
@@ -998,7 +1033,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
cs->ops->submit(cs);
}
@ -263,7 +295,7 @@ index 41d639c329..bb8eefaa19 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
@@ -1016,6 +1051,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 +304,7 @@ index 41d639c329..bb8eefaa19 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,
@@ -1033,7 +1070,7 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
cs->ops->submit(cs);
}
@ -281,7 +313,7 @@ index 41d639c329..bb8eefaa19 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
@@ -1043,6 +1080,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 +322,7 @@ index 41d639c329..bb8eefaa19 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
@@ -1058,7 +1097,7 @@ void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_i
cs->ops->submit(cs);
}
@ -299,7 +331,7 @@ index 41d639c329..bb8eefaa19 100644
{
const struct wined3d_cs_set_stream_output *op = data;
struct wined3d_stream_output *stream;
@@ -1041,6 +1076,8 @@ static void wined3d_cs_exec_set_stream_output(struct wined3d_cs *cs, const void
@@ -1075,6 +1114,8 @@ static void wined3d_cs_exec_set_stream_output(struct wined3d_cs *cs, const void
InterlockedDecrement(&prev->resource.bind_count);
device_invalidate_state(cs->device, STATE_STREAM_OUTPUT);
@ -308,7 +340,7 @@ index 41d639c329..bb8eefaa19 100644
}
void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
@@ -1057,7 +1094,7 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
@@ -1091,7 +1132,7 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
cs->ops->submit(cs);
}
@ -317,7 +349,7 @@ index 41d639c329..bb8eefaa19 100644
{
const struct wined3d_cs_set_index_buffer *op = data;
struct wined3d_buffer *prev;
@@ -1073,6 +1110,8 @@ static void wined3d_cs_exec_set_index_buffer(struct wined3d_cs *cs, const void *
@@ -1107,6 +1148,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 +358,7 @@ index 41d639c329..bb8eefaa19 100644
}
void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buffer *buffer,
@@ -1089,7 +1128,7 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
@@ -1123,7 +1166,7 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
cs->ops->submit(cs);
}
@ -335,7 +367,7 @@ index 41d639c329..bb8eefaa19 100644
{
const struct wined3d_cs_set_constant_buffer *op = data;
struct wined3d_buffer *prev;
@@ -1103,6 +1142,7 @@ static void wined3d_cs_exec_set_constant_buffer(struct wined3d_cs *cs, const voi
@@ -1137,6 +1180,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 +375,7 @@ index 41d639c329..bb8eefaa19 100644
}
void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_shader_type type,
@@ -1119,7 +1159,7 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
@@ -1153,7 +1197,7 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
cs->ops->submit(cs);
}
@ -352,7 +384,7 @@ index 41d639c329..bb8eefaa19 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;
@@ -1196,6 +1236,8 @@ static void wined3d_cs_exec_set_texture(struct wined3d_cs *cs, const void *data)
@@ -1230,6 +1274,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 +393,7 @@ index 41d639c329..bb8eefaa19 100644
}
void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined3d_texture *texture)
@@ -1210,7 +1252,7 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
@@ -1244,7 +1290,7 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
cs->ops->submit(cs);
}
@ -370,7 +402,7 @@ index 41d639c329..bb8eefaa19 100644
{
const struct wined3d_cs_set_shader_resource_view *op = data;
struct wined3d_shader_resource_view *prev;
@@ -1227,6 +1269,8 @@ static void wined3d_cs_exec_set_shader_resource_view(struct wined3d_cs *cs, cons
@@ -1261,6 +1307,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 +411,7 @@ index 41d639c329..bb8eefaa19 100644
}
void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3d_shader_type type,
@@ -1243,7 +1287,7 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
@@ -1277,7 +1325,7 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
cs->ops->submit(cs);
}
@ -388,7 +420,7 @@ index 41d639c329..bb8eefaa19 100644
{
const struct wined3d_cs_set_unordered_access_view *op = data;
struct wined3d_unordered_access_view *prev;
@@ -1257,6 +1301,8 @@ static void wined3d_cs_exec_set_unordered_access_view(struct wined3d_cs *cs, con
@@ -1291,6 +1339,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 +429,7 @@ index 41d639c329..bb8eefaa19 100644
}
void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined3d_pipeline pipeline,
@@ -1273,7 +1319,7 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
@@ -1307,7 +1357,7 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
cs->ops->submit(cs);
}
@ -406,7 +438,7 @@ index 41d639c329..bb8eefaa19 100644
{
const struct wined3d_cs_set_sampler *op = data;
@@ -1282,6 +1328,8 @@ static void wined3d_cs_exec_set_sampler(struct wined3d_cs *cs, const void *data)
@@ -1316,6 +1366,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 +447,7 @@ index 41d639c329..bb8eefaa19 100644
}
void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type type,
@@ -1298,7 +1346,7 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
@@ -1332,7 +1384,7 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
cs->ops->submit(cs);
}
@ -424,7 +456,7 @@ index 41d639c329..bb8eefaa19 100644
{
const struct wined3d_cs_set_shader *op = data;
@@ -1308,6 +1356,8 @@ static void wined3d_cs_exec_set_shader(struct wined3d_cs *cs, const void *data)
@@ -1342,6 +1394,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 +465,7 @@ index 41d639c329..bb8eefaa19 100644
}
void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type type, struct wined3d_shader *shader)
@@ -1322,12 +1372,14 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
@@ -1356,12 +1410,14 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
cs->ops->submit(cs);
}
@ -449,7 +481,7 @@ index 41d639c329..bb8eefaa19 100644
}
void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
@@ -1342,12 +1394,14 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
@@ -1376,12 +1432,14 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
cs->ops->submit(cs);
}
@ -465,7 +497,7 @@ index 41d639c329..bb8eefaa19 100644
}
void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render_state state, DWORD value)
@@ -1362,12 +1416,14 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
@@ -1396,12 +1454,14 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
cs->ops->submit(cs);
}
@ -481,7 +513,7 @@ index 41d639c329..bb8eefaa19 100644
}
void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
@@ -1384,12 +1440,14 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
@@ -1418,12 +1478,14 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
cs->ops->submit(cs);
}
@ -497,7 +529,7 @@ index 41d639c329..bb8eefaa19 100644
}
void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
@@ -1406,13 +1464,15 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
@@ -1440,13 +1502,15 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
cs->ops->submit(cs);
}
@ -514,7 +546,7 @@ index 41d639c329..bb8eefaa19 100644
}
void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform_state state,
@@ -1428,12 +1488,14 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
@@ -1462,12 +1526,14 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
cs->ops->submit(cs);
}
@ -530,7 +562,7 @@ index 41d639c329..bb8eefaa19 100644
}
void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const struct wined3d_vec4 *plane)
@@ -1448,7 +1510,7 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
@@ -1482,7 +1548,7 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
cs->ops->submit(cs);
}
@ -539,7 +571,7 @@ index 41d639c329..bb8eefaa19 100644
{
const struct wined3d_cs_set_color_key *op = data;
struct wined3d_texture *texture = op->texture;
@@ -1509,6 +1571,8 @@ static void wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *dat
@@ -1543,6 +1609,8 @@ static void wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *dat
break;
}
}
@ -548,7 +580,7 @@ index 41d639c329..bb8eefaa19 100644
}
void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture *texture,
@@ -1531,12 +1595,14 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
@@ -1565,12 +1633,14 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
cs->ops->submit(cs);
}
@ -564,7 +596,7 @@ index 41d639c329..bb8eefaa19 100644
}
void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_material *material)
@@ -1550,7 +1616,7 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
@@ -1584,7 +1654,7 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
cs->ops->submit(cs);
}
@ -573,7 +605,7 @@ index 41d639c329..bb8eefaa19 100644
{
const struct wined3d_cs_set_light *op = data;
struct wined3d_light_info *light_info;
@@ -1564,7 +1630,7 @@ static void wined3d_cs_exec_set_light(struct wined3d_cs *cs, const void *data)
@@ -1598,7 +1668,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 +614,7 @@ index 41d639c329..bb8eefaa19 100644
}
hash_idx = LIGHTMAP_HASHFUNC(light_idx);
@@ -1585,6 +1651,8 @@ static void wined3d_cs_exec_set_light(struct wined3d_cs *cs, const void *data)
@@ -1619,6 +1689,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 +623,7 @@ index 41d639c329..bb8eefaa19 100644
}
void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light_info *light)
@@ -1598,7 +1666,7 @@ void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light
@@ -1632,7 +1704,7 @@ void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light
cs->ops->submit(cs);
}
@ -600,7 +632,7 @@ index 41d639c329..bb8eefaa19 100644
{
const struct wined3d_cs_set_light_enable *op = data;
struct wined3d_device *device = cs->device;
@@ -1608,7 +1676,7 @@ static void wined3d_cs_exec_set_light_enable(struct wined3d_cs *cs, const void *
@@ -1642,7 +1714,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 +641,7 @@ index 41d639c329..bb8eefaa19 100644
}
prev_idx = light_info->glIndex;
@@ -1618,6 +1686,8 @@ static void wined3d_cs_exec_set_light_enable(struct wined3d_cs *cs, const void *
@@ -1652,6 +1724,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 +650,7 @@ index 41d639c329..bb8eefaa19 100644
}
void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, unsigned int idx, BOOL enable)
@@ -1632,7 +1702,7 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, unsigned int idx, B
@@ -1666,7 +1740,7 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, unsigned int idx, B
cs->ops->submit(cs);
}
@ -627,7 +659,7 @@ index 41d639c329..bb8eefaa19 100644
{
struct wined3d_adapter *adapter = cs->device->adapter;
@@ -1640,6 +1710,8 @@ static void wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data)
@@ -1674,6 +1748,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 +668,7 @@ index 41d639c329..bb8eefaa19 100644
}
void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
@@ -1652,11 +1724,13 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
@@ -1686,11 +1762,13 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
cs->ops->submit(cs);
}
@ -651,7 +683,7 @@ index 41d639c329..bb8eefaa19 100644
}
static void wined3d_cs_emit_callback(struct wined3d_cs *cs, void (*callback)(void *object), void *object)
@@ -1681,12 +1755,14 @@ void wined3d_cs_init_object(struct wined3d_cs *cs, void (*callback)(void *object
@@ -1715,12 +1793,14 @@ void wined3d_cs_init_object(struct wined3d_cs *cs, void (*callback)(void *object
wined3d_cs_emit_callback(cs, callback, object);
}
@ -667,7 +699,7 @@ index 41d639c329..bb8eefaa19 100644
}
void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *query, DWORD flags)
@@ -1701,12 +1777,14 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
@@ -1735,12 +1815,14 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
cs->ops->submit(cs);
}
@ -683,7 +715,7 @@ index 41d639c329..bb8eefaa19 100644
}
BOOL wined3d_cs_emit_query_poll(struct wined3d_cs *cs, struct wined3d_query *query, DWORD flags)
@@ -1725,13 +1803,15 @@ BOOL wined3d_cs_emit_query_poll(struct wined3d_cs *cs, struct wined3d_query *que
@@ -1759,13 +1841,15 @@ BOOL wined3d_cs_emit_query_poll(struct wined3d_cs *cs, struct wined3d_query *que
return ret;
}
@ -700,7 +732,7 @@ index 41d639c329..bb8eefaa19 100644
}
void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource)
@@ -1747,13 +1827,15 @@ void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_reso
@@ -1781,13 +1865,15 @@ void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_reso
cs->ops->submit(cs);
}
@ -717,7 +749,7 @@ index 41d639c329..bb8eefaa19 100644
}
void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource)
@@ -1769,13 +1851,15 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou
@@ -1803,13 +1889,15 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou
cs->ops->submit(cs);
}
@ -734,7 +766,7 @@ index 41d639c329..bb8eefaa19 100644
}
HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource, unsigned int sub_resource_idx,
@@ -1798,12 +1882,14 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
@@ -1832,12 +1920,14 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
return hr;
}
@ -750,7 +782,7 @@ index 41d639c329..bb8eefaa19 100644
}
HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resource, unsigned int sub_resource_idx)
@@ -1822,7 +1908,7 @@ HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resourc
@@ -1856,7 +1946,7 @@ HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resourc
return hr;
}
@ -759,7 +791,7 @@ index 41d639c329..bb8eefaa19 100644
{
const struct wined3d_cs_blt_sub_resource *op = data;
@@ -1861,6 +1947,8 @@ static void wined3d_cs_exec_blt_sub_resource(struct wined3d_cs *cs, const void *
@@ -1895,6 +1985,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 +800,7 @@ index 41d639c329..bb8eefaa19 100644
}
void wined3d_cs_emit_blt_sub_resource(struct wined3d_cs *cs, struct wined3d_resource *dst_resource,
@@ -1890,7 +1978,7 @@ void wined3d_cs_emit_blt_sub_resource(struct wined3d_cs *cs, struct wined3d_reso
@@ -1924,7 +2016,7 @@ void wined3d_cs_emit_blt_sub_resource(struct wined3d_cs *cs, struct wined3d_reso
cs->ops->submit(cs);
}
@ -777,7 +809,7 @@ index 41d639c329..bb8eefaa19 100644
{
const struct wined3d_cs_update_sub_resource *op = data;
const struct wined3d_box *box = &op->box;
@@ -1940,6 +2028,7 @@ static void wined3d_cs_exec_update_sub_resource(struct wined3d_cs *cs, const voi
@@ -1974,6 +2066,7 @@ static void wined3d_cs_exec_update_sub_resource(struct wined3d_cs *cs, const voi
done:
wined3d_resource_release(op->resource);
@ -785,7 +817,7 @@ index 41d639c329..bb8eefaa19 100644
}
void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_resource *resource,
@@ -1984,10 +2073,11 @@ push_constant_info[] =
@@ -2018,10 +2111,11 @@ push_constant_info[] =
{FIELD_OFFSET(struct wined3d_state, ps_consts_b), sizeof(BOOL), WINED3D_SHADER_CONST_PS_B},
};
@ -798,7 +830,7 @@ index 41d639c329..bb8eefaa19 100644
unsigned int context_count;
unsigned int i;
size_t offset;
@@ -2003,6 +2093,8 @@ static void wined3d_cs_exec_push_constants(struct wined3d_cs *cs, const void *da
@@ -2037,6 +2131,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,25 +839,7 @@ index 41d639c329..bb8eefaa19 100644
}
void wined3d_cs_emit_push_constants(struct wined3d_cs *cs, enum wined3d_push_constants p,
@@ -2020,7 +2112,7 @@ void wined3d_cs_emit_push_constants(struct wined3d_cs *cs, enum wined3d_push_con
cs->ops->submit(cs);
}
-static void wined3d_cs_exec_clear_rtv(struct wined3d_cs *cs, const void *data)
+static UINT wined3d_cs_exec_clear_rtv(struct wined3d_cs *cs, const void *data)
{
const struct wined3d_cs_clear_rtv *op = data;
struct wined3d_device *device = cs->device;
@@ -2028,6 +2120,8 @@ static void wined3d_cs_exec_clear_rtv(struct wined3d_cs *cs, const void *data)
op->blitter->blitter_clear(device, op->view, &op->rect, op->flags, &op->color, op->depth, op->stencil);
wined3d_resource_release(op->view->resource);
+
+ return sizeof(*op);
}
void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarget_view *view,
@@ -2052,7 +2146,7 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
@@ -2054,7 +2150,7 @@ void wined3d_cs_emit_push_constants(struct wined3d_cs *cs, enum wined3d_push_con
cs->ops->submit(cs);
}
@ -834,7 +848,7 @@ index 41d639c329..bb8eefaa19 100644
{
const struct wined3d_cs_update_texture *op = data;
struct wined3d_context *context;
@@ -2063,6 +2157,8 @@ static void wined3d_cs_exec_update_texture(struct wined3d_cs *cs, const void *da
@@ -2065,6 +2161,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,7 +857,7 @@ index 41d639c329..bb8eefaa19 100644
}
void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_texture *src,
@@ -2081,11 +2177,13 @@ void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_textur
@@ -2083,11 +2181,13 @@ void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_textur
cs->ops->submit(cs);
}
@ -858,7 +872,7 @@ index 41d639c329..bb8eefaa19 100644
}
void wined3d_cs_emit_update_swap_interval(struct wined3d_cs *cs, struct wined3d_swapchain *swapchain)
@@ -2099,7 +2197,7 @@ void wined3d_cs_emit_update_swap_interval(struct wined3d_cs *cs, struct wined3d_
@@ -2101,7 +2201,7 @@ void wined3d_cs_emit_update_swap_interval(struct wined3d_cs *cs, struct wined3d_
cs->ops->submit_and_wait(cs);
}
@ -867,7 +881,7 @@ index 41d639c329..bb8eefaa19 100644
{
const struct wined3d_cs_texture_add_dirty_region *op = data;
struct wined3d_texture *texture = op->texture;
@@ -2117,6 +2215,8 @@ static void wined3d_cs_exec_texture_add_dirty_region(struct wined3d_cs *cs, cons
@@ -2119,6 +2219,8 @@ static void wined3d_cs_exec_texture_add_dirty_region(struct wined3d_cs *cs, cons
context_release(context);
wined3d_resource_release(&texture->resource);
@ -876,7 +890,7 @@ index 41d639c329..bb8eefaa19 100644
}
void wined3d_cs_emit_texture_add_dirty_region(struct wined3d_cs *cs,
@@ -2138,7 +2238,7 @@ void wined3d_cs_emit_texture_add_dirty_region(struct wined3d_cs *cs,
@@ -2140,7 +2242,7 @@ void wined3d_cs_emit_texture_add_dirty_region(struct wined3d_cs *cs,
cs->ops->submit(cs);
}
@ -885,7 +899,7 @@ index 41d639c329..bb8eefaa19 100644
{
/* WINED3D_CS_OP_SYNC */ wined3d_cs_exec_sync,
/* WINED3D_CS_OP_GLFINISH */ wined3d_cs_exec_glfinish,
@@ -2240,6 +2340,201 @@ static const struct wined3d_cs_ops wined3d_cs_st_ops =
@@ -2241,6 +2343,201 @@ static const struct wined3d_cs_ops wined3d_cs_st_ops =
wined3d_cs_st_submit,
};
@ -1087,7 +1101,7 @@ index 41d639c329..bb8eefaa19 100644
struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
{
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
@@ -2269,12 +2564,41 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
@@ -2270,12 +2567,41 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
return NULL;
}
@ -1130,10 +1144,10 @@ index 41d639c329..bb8eefaa19 100644
HeapFree(GetProcessHeap(), 0, cs->data);
HeapFree(GetProcessHeap(), 0, cs);
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index cb80c8521f..c6fb75ac12 100644
index 6a07197eb7..7cebd54adc 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -1304,7 +1304,7 @@ UINT CDECL wined3d_device_get_available_texture_mem(const struct wined3d_device
@@ -1307,7 +1307,7 @@ UINT CDECL wined3d_device_get_available_texture_mem(const struct wined3d_device
/* We can not acquire the context unless there is a swapchain. */
if (device->swapchains && gl_info->supported[NVX_GPU_MEMORY_INFO] &&
@ -1173,7 +1187,7 @@ index 1ce5937f17..4ef747ca89 100644
if (hkey) RegCloseKey( hkey );
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 4de44297ea..be616e9701 100644
index 7cef5c4dcb..99f598f4fe 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -390,6 +390,7 @@ struct wined3d_settings
@ -1184,7 +1198,7 @@ index 4de44297ea..be616e9701 100644
};
extern struct wined3d_settings wined3d_settings DECLSPEC_HIDDEN;
@@ -2804,11 +2805,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);
}
@ -1196,7 +1210,7 @@ index 4de44297ea..be616e9701 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,
@@ -3220,6 +3216,21 @@ enum wined3d_push_constants
@@ -3221,6 +3217,21 @@ enum wined3d_push_constants
WINED3D_PUSH_CONSTANTS_PS_B,
};
@ -1218,7 +1232,7 @@ index 4de44297ea..be616e9701 100644
struct wined3d_cs_ops
{
void *(*require_space)(struct wined3d_cs *cs, size_t size);
@@ -3237,9 +3248,21 @@ struct wined3d_cs
@@ -3238,9 +3249,21 @@ struct wined3d_cs
size_t data_size, start, end;
void *data;

View File

@ -1,4 +1,4 @@
From 980a986cec394b6fc4a577cbf0efc6147191b084 Mon Sep 17 00:00:00 2001
From 5eb8b32612f16ef0a657838d28262914af8771ec 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.
@ -9,10 +9,10 @@ Subject: wined3d: Introduce a separate priority queue.
2 files changed, 68 insertions(+), 57 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 310ddd108f..d7604e5d7c 100644
index b5d9c7390e..24713e411b 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -451,7 +451,7 @@ void wined3d_cs_emit_sync(struct wined3d_cs *cs)
@@ -442,7 +442,7 @@ void wined3d_cs_emit_sync(struct wined3d_cs *cs)
{
struct wined3d_cs_sync *op;
@ -21,7 +21,7 @@ index 310ddd108f..d7604e5d7c 100644
op->opcode = WINED3D_CS_OP_SYNC;
cs->ops->submit_and_wait(cs);
@@ -471,7 +471,7 @@ void wined3d_cs_emit_glfinish(struct wined3d_cs *cs)
@@ -462,7 +462,7 @@ void wined3d_cs_emit_glfinish(struct wined3d_cs *cs)
{
struct wined3d_cs_glfinish *op;
@ -30,7 +30,7 @@ index 310ddd108f..d7604e5d7c 100644
op->opcode = WINED3D_CS_OP_GLFINISH;
cs->ops->submit_and_wait(cs);
@@ -506,7 +506,7 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
@@ -497,7 +497,7 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
unsigned int i;
LONG pending;
@ -39,16 +39,25 @@ index 310ddd108f..d7604e5d7c 100644
op->opcode = WINED3D_CS_OP_PRESENT;
op->dst_window_override = dst_window_override;
op->swapchain = swapchain;
@@ -572,7 +572,7 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
struct wined3d_cs_clear *op;
@@ -563,7 +563,7 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
size_t size = FIELD_OFFSET(struct wined3d_cs_clear, rects[rect_count]);
unsigned int i;
- op = cs->ops->require_space(cs, FIELD_OFFSET(struct wined3d_cs_clear, rects[rect_count]));
+ op = cs->ops->require_space(cs, FIELD_OFFSET(struct wined3d_cs_clear, rects[rect_count]), 0);
- op = cs->ops->require_space(cs, size);
+ op = cs->ops->require_space(cs, size, 0);
op->opcode = WINED3D_CS_OP_CLEAR;
op->size = size;
op->flags = flags;
op->color = *color;
@@ -722,7 +722,7 @@ void wined3d_cs_emit_dispatch(struct wined3d_cs *cs,
@@ -601,7 +601,7 @@ void wined3d_cs_emit_clear_rendertarget_view(struct wined3d_cs *cs, struct wined
} *extra;
size_t size = FIELD_OFFSET(struct wined3d_cs_clear, rects[1]) + sizeof(*extra);
- op = cs->ops->require_space(cs, size);
+ op = cs->ops->require_space(cs, size, 0);
extra = (void *)&op->rects[1];
extra->fb.render_targets = &extra->rt;
op->fb = &extra->fb;
@@ -760,7 +760,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 +66,7 @@ index 310ddd108f..d7604e5d7c 100644
op->opcode = WINED3D_CS_OP_DISPATCH;
op->group_count_x = group_count_x;
op->group_count_y = group_count_y;
@@ -791,7 +791,7 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, GLenum primitive_type, int base
@@ -834,7 +834,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 +75,7 @@ index 310ddd108f..d7604e5d7c 100644
op->opcode = WINED3D_CS_OP_DRAW;
op->primitive_type = primitive_type;
op->base_vertex_idx = base_vertex_idx;
@@ -841,7 +841,7 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query
@@ -889,7 +889,7 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query
{
struct wined3d_cs_set_predication *op;
@ -75,7 +84,7 @@ index 310ddd108f..d7604e5d7c 100644
op->opcode = WINED3D_CS_OP_SET_PREDICATION;
op->predicate = predicate;
op->value = value;
@@ -863,7 +863,7 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
@@ -911,7 +911,7 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
{
struct wined3d_cs_set_viewport *op;
@ -84,7 +93,7 @@ index 310ddd108f..d7604e5d7c 100644
op->opcode = WINED3D_CS_OP_SET_VIEWPORT;
op->viewport = *viewport;
@@ -884,7 +884,7 @@ void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
@@ -932,7 +932,7 @@ void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
{
struct wined3d_cs_set_scissor_rect *op;
@ -93,7 +102,7 @@ index 310ddd108f..d7604e5d7c 100644
op->opcode = WINED3D_CS_OP_SET_SCISSOR_RECT;
op->rect = *rect;
@@ -906,7 +906,7 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
@@ -954,7 +954,7 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
{
struct wined3d_cs_set_rendertarget_view *op;
@ -102,7 +111,7 @@ index 310ddd108f..d7604e5d7c 100644
op->opcode = WINED3D_CS_OP_SET_RENDERTARGET_VIEW;
op->view_idx = view_idx;
op->view = view;
@@ -957,7 +957,7 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3
@@ -1005,7 +1005,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 +120,7 @@ index 310ddd108f..d7604e5d7c 100644
op->opcode = WINED3D_CS_OP_SET_DEPTH_STENCIL_VIEW;
op->view = view;
@@ -978,7 +978,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
@@ -1026,7 +1026,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
{
struct wined3d_cs_set_vertex_declaration *op;
@ -120,7 +129,7 @@ index 310ddd108f..d7604e5d7c 100644
op->opcode = WINED3D_CS_OP_SET_VERTEX_DECLARATION;
op->declaration = declaration;
@@ -1012,7 +1012,7 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
@@ -1060,7 +1060,7 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
{
struct wined3d_cs_set_stream_source *op;
@ -129,7 +138,7 @@ index 310ddd108f..d7604e5d7c 100644
op->opcode = WINED3D_CS_OP_SET_STREAM_SOURCE;
op->stream_idx = stream_idx;
op->buffer = buffer;
@@ -1040,7 +1040,7 @@ void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_i
@@ -1088,7 +1088,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 +147,7 @@ index 310ddd108f..d7604e5d7c 100644
op->opcode = WINED3D_CS_OP_SET_STREAM_SOURCE_FREQ;
op->stream_idx = stream_idx;
op->frequency = frequency;
@@ -1073,7 +1073,7 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
@@ -1123,7 +1123,7 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
{
struct wined3d_cs_set_stream_output *op;
@ -147,7 +156,7 @@ index 310ddd108f..d7604e5d7c 100644
op->opcode = WINED3D_CS_OP_SET_STREAM_OUTPUT;
op->stream_idx = stream_idx;
op->buffer = buffer;
@@ -1107,7 +1107,7 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
@@ -1157,7 +1157,7 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
{
struct wined3d_cs_set_index_buffer *op;
@ -156,7 +165,7 @@ index 310ddd108f..d7604e5d7c 100644
op->opcode = WINED3D_CS_OP_SET_INDEX_BUFFER;
op->buffer = buffer;
op->format_id = format_id;
@@ -1138,7 +1138,7 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
@@ -1188,7 +1188,7 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
{
struct wined3d_cs_set_constant_buffer *op;
@ -165,7 +174,7 @@ index 310ddd108f..d7604e5d7c 100644
op->opcode = WINED3D_CS_OP_SET_CONSTANT_BUFFER;
op->type = type;
op->cb_idx = cb_idx;
@@ -1232,7 +1232,7 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
@@ -1282,7 +1282,7 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
{
struct wined3d_cs_set_texture *op;
@ -174,7 +183,7 @@ index 310ddd108f..d7604e5d7c 100644
op->opcode = WINED3D_CS_OP_SET_TEXTURE;
op->stage = stage;
op->texture = texture;
@@ -1266,7 +1266,7 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
@@ -1316,7 +1316,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 +192,7 @@ index 310ddd108f..d7604e5d7c 100644
op->opcode = WINED3D_CS_OP_SET_SHADER_RESOURCE_VIEW;
op->type = type;
op->view_idx = view_idx;
@@ -1298,7 +1298,7 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
@@ -1348,7 +1348,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 +201,7 @@ index 310ddd108f..d7604e5d7c 100644
op->opcode = WINED3D_CS_OP_SET_UNORDERED_ACCESS_VIEW;
op->pipeline = pipeline;
op->view_idx = view_idx;
@@ -1325,7 +1325,7 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
@@ -1375,7 +1375,7 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
{
struct wined3d_cs_set_sampler *op;
@ -201,7 +210,7 @@ index 310ddd108f..d7604e5d7c 100644
op->opcode = WINED3D_CS_OP_SET_SAMPLER;
op->type = type;
op->sampler_idx = sampler_idx;
@@ -1352,7 +1352,7 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
@@ -1402,7 +1402,7 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
{
struct wined3d_cs_set_shader *op;
@ -210,7 +219,7 @@ index 310ddd108f..d7604e5d7c 100644
op->opcode = WINED3D_CS_OP_SET_SHADER;
op->type = type;
op->shader = shader;
@@ -1375,7 +1375,7 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
@@ -1425,7 +1425,7 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
{
struct wined3d_cs_set_rasterizer_state *op;
@ -219,7 +228,7 @@ index 310ddd108f..d7604e5d7c 100644
op->opcode = WINED3D_CS_OP_SET_RASTERIZER_STATE;
op->state = rasterizer_state;
@@ -1396,7 +1396,7 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
@@ -1446,7 +1446,7 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
{
struct wined3d_cs_set_render_state *op;
@ -228,7 +237,7 @@ index 310ddd108f..d7604e5d7c 100644
op->opcode = WINED3D_CS_OP_SET_RENDER_STATE;
op->state = state;
op->value = value;
@@ -1419,7 +1419,7 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
@@ -1469,7 +1469,7 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
{
struct wined3d_cs_set_texture_state *op;
@ -237,7 +246,7 @@ index 310ddd108f..d7604e5d7c 100644
op->opcode = WINED3D_CS_OP_SET_TEXTURE_STATE;
op->stage = stage;
op->state = state;
@@ -1443,7 +1443,7 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
@@ -1493,7 +1493,7 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
{
struct wined3d_cs_set_sampler_state *op;
@ -246,7 +255,7 @@ index 310ddd108f..d7604e5d7c 100644
op->opcode = WINED3D_CS_OP_SET_SAMPLER_STATE;
op->sampler_idx = sampler_idx;
op->state = state;
@@ -1468,7 +1468,7 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
@@ -1518,7 +1518,7 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
{
struct wined3d_cs_set_transform *op;
@ -255,7 +264,7 @@ index 310ddd108f..d7604e5d7c 100644
op->opcode = WINED3D_CS_OP_SET_TRANSFORM;
op->state = state;
op->matrix = *matrix;
@@ -1490,7 +1490,7 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
@@ -1540,7 +1540,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 +273,7 @@ index 310ddd108f..d7604e5d7c 100644
op->opcode = WINED3D_CS_OP_SET_CLIP_PLANE;
op->plane_idx = plane_idx;
op->plane = *plane;
@@ -1568,7 +1568,7 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
@@ -1618,7 +1618,7 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
{
struct wined3d_cs_set_color_key *op;
@ -273,7 +282,7 @@ index 310ddd108f..d7604e5d7c 100644
op->opcode = WINED3D_CS_OP_SET_COLOR_KEY;
op->texture = texture;
op->flags = flags;
@@ -1597,7 +1597,7 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
@@ -1647,7 +1647,7 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
{
struct wined3d_cs_set_material *op;
@ -282,7 +291,7 @@ index 310ddd108f..d7604e5d7c 100644
op->opcode = WINED3D_CS_OP_SET_MATERIAL;
op->material = *material;
@@ -1647,7 +1647,7 @@ void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light
@@ -1697,7 +1697,7 @@ void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light
{
struct wined3d_cs_set_light *op;
@ -291,7 +300,7 @@ index 310ddd108f..d7604e5d7c 100644
op->opcode = WINED3D_CS_OP_SET_LIGHT;
op->light = *light;
@@ -1682,7 +1682,7 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, unsigned int idx, B
@@ -1732,7 +1732,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 +309,7 @@ index 310ddd108f..d7604e5d7c 100644
op->opcode = WINED3D_CS_OP_SET_LIGHT_ENABLE;
op->idx = idx;
op->enable = enable;
@@ -1706,7 +1706,7 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
@@ -1756,7 +1756,7 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
{
struct wined3d_cs_reset_state *op;
@ -309,7 +318,7 @@ index 310ddd108f..d7604e5d7c 100644
op->opcode = WINED3D_CS_OP_RESET_STATE;
cs->ops->submit(cs);
@@ -1725,7 +1725,7 @@ static void wined3d_cs_emit_callback(struct wined3d_cs *cs, void (*callback)(voi
@@ -1775,7 +1775,7 @@ static void wined3d_cs_emit_callback(struct wined3d_cs *cs, void (*callback)(voi
{
struct wined3d_cs_callback *op;
@ -318,7 +327,7 @@ index 310ddd108f..d7604e5d7c 100644
op->opcode = WINED3D_CS_OP_CALLBACK;
op->callback = callback;
op->object = object;
@@ -1757,7 +1757,7 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
@@ -1807,7 +1807,7 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
{
struct wined3d_cs_query_issue *op;
@ -327,7 +336,7 @@ index 310ddd108f..d7604e5d7c 100644
op->opcode = WINED3D_CS_OP_QUERY_ISSUE;
op->query = query;
op->flags = flags;
@@ -1780,7 +1780,7 @@ BOOL wined3d_cs_emit_query_poll(struct wined3d_cs *cs, struct wined3d_query *que
@@ -1830,7 +1830,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 +345,7 @@ index 310ddd108f..d7604e5d7c 100644
op->opcode = WINED3D_CS_OP_QUERY_POLL;
op->query = query;
op->flags = flags;
@@ -1806,7 +1806,7 @@ void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_reso
@@ -1856,7 +1856,7 @@ void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_reso
{
struct wined3d_cs_preload_resource *op;
@ -345,7 +354,7 @@ index 310ddd108f..d7604e5d7c 100644
op->opcode = WINED3D_CS_OP_PRELOAD_RESOURCE;
op->resource = resource;
@@ -1830,7 +1830,7 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou
@@ -1880,7 +1880,7 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou
{
struct wined3d_cs_unload_resource *op;
@ -354,7 +363,7 @@ index 310ddd108f..d7604e5d7c 100644
op->opcode = WINED3D_CS_OP_UNLOAD_RESOURCE;
op->resource = resource;
@@ -1856,7 +1856,7 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
@@ -1906,7 +1906,7 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
struct wined3d_cs_map *op;
HRESULT hr;
@ -363,7 +372,7 @@ index 310ddd108f..d7604e5d7c 100644
op->opcode = WINED3D_CS_OP_MAP;
op->resource = resource;
op->sub_resource_idx = sub_resource_idx;
@@ -1885,7 +1885,7 @@ HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resourc
@@ -1935,7 +1935,7 @@ HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resourc
struct wined3d_cs_unmap *op;
HRESULT hr;
@ -372,7 +381,7 @@ index 310ddd108f..d7604e5d7c 100644
op->opcode = WINED3D_CS_OP_UNMAP;
op->resource = resource;
op->sub_resource_idx = sub_resource_idx;
@@ -1946,7 +1946,7 @@ void wined3d_cs_emit_blt_sub_resource(struct wined3d_cs *cs, struct wined3d_reso
@@ -1996,7 +1996,7 @@ void wined3d_cs_emit_blt_sub_resource(struct wined3d_cs *cs, struct wined3d_reso
{
struct wined3d_cs_blt_sub_resource *op;
@ -381,7 +390,7 @@ index 310ddd108f..d7604e5d7c 100644
op->opcode = WINED3D_CS_OP_BLT_SUB_RESOURCE;
op->dst_resource = dst_resource;
op->dst_sub_resource_idx = dst_sub_resource_idx;
@@ -2025,7 +2025,7 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
@@ -2075,7 +2075,7 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
{
struct wined3d_cs_update_sub_resource *op;
@ -390,7 +399,7 @@ index 310ddd108f..d7604e5d7c 100644
op->opcode = WINED3D_CS_OP_UPDATE_SUB_RESOURCE;
op->resource = resource;
op->sub_resource_idx = sub_resource_idx;
@@ -2090,7 +2090,7 @@ void wined3d_cs_emit_push_constants(struct wined3d_cs *cs, enum wined3d_push_con
@@ -2140,7 +2140,7 @@ void wined3d_cs_emit_push_constants(struct wined3d_cs *cs, enum wined3d_push_con
{
struct wined3d_cs_push_constants *op;
@ -399,16 +408,7 @@ index 310ddd108f..d7604e5d7c 100644
op->opcode = WINED3D_CS_OP_PUSH_CONSTANTS;
op->p = p;
op->start_idx = start_idx;
@@ -2121,7 +2121,7 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
{
struct wined3d_cs_clear_rtv *op;
- op = cs->ops->require_space(cs, sizeof(*op));
+ op = cs->ops->require_space(cs, sizeof(*op), 0);
op->opcode = WINED3D_CS_OP_CLEAR_RTV;
op->view = view;
op->rect = *rect;
@@ -2157,7 +2157,7 @@ void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_textur
@@ -2170,7 +2170,7 @@ void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_textur
{
struct wined3d_cs_update_texture *op;
@ -417,7 +417,7 @@ index 310ddd108f..d7604e5d7c 100644
op->opcode = WINED3D_CS_OP_UPDATE_TEXTURE;
op->src = src;
op->dst = dst;
@@ -2181,7 +2181,7 @@ void wined3d_cs_emit_update_swap_interval(struct wined3d_cs *cs, struct wined3d_
@@ -2194,7 +2194,7 @@ void wined3d_cs_emit_update_swap_interval(struct wined3d_cs *cs, struct wined3d_
{
struct wined3d_cs_update_swap_interval *op;
@ -426,7 +426,7 @@ index 310ddd108f..d7604e5d7c 100644
op->opcode = WINED3D_CS_OP_UPDATE_SWAP_INTERVAL;
op->swapchain = swapchain;
@@ -2219,7 +2219,7 @@ void wined3d_cs_emit_texture_add_dirty_region(struct wined3d_cs *cs,
@@ -2232,7 +2232,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));
@ -435,7 +435,7 @@ index 310ddd108f..d7604e5d7c 100644
op->opcode = WINED3D_CS_OP_TEXTURE_ADD_DIRTY_REGION;
op->texture = texture;
op->sub_resource_idx = sub_resource_idx;
@@ -2280,7 +2280,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2292,7 +2292,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,
};
@ -444,7 +444,7 @@ index 310ddd108f..d7604e5d7c 100644
{
if (size > (cs->data_size - cs->end))
{
@@ -2364,6 +2364,8 @@ static struct wined3d_cs_block *wined3d_cs_dequeue_command(struct wined3d_cs *cs
@@ -2376,6 +2376,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 (;;)
{
@ -453,7 +453,7 @@ index 310ddd108f..d7604e5d7c 100644
if ((block = wined3d_cs_list_dequeue(&cs->exec_list)))
return block;
}
@@ -2391,7 +2393,7 @@ static void wined3d_cs_list_cleanup(struct wined3d_cs_list *list)
@@ -2403,7 +2405,7 @@ static void wined3d_cs_list_cleanup(struct wined3d_cs_list *list)
DeleteCriticalSection(&list->lock);
}
@ -462,7 +462,7 @@ index 310ddd108f..d7604e5d7c 100644
{
struct wined3d_cs_block *block;
@@ -2405,26 +2407,28 @@ static struct wined3d_cs_block *wined3d_cs_get_block(struct wined3d_cs *cs)
@@ -2417,26 +2419,28 @@ static struct wined3d_cs_block *wined3d_cs_get_block(struct wined3d_cs *cs)
}
block->pos = 0;
@ -495,7 +495,7 @@ index 310ddd108f..d7604e5d7c 100644
cs->current_block = block;
}
@@ -2436,10 +2440,13 @@ static void *wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size)
@@ -2448,10 +2452,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)
{
@ -510,7 +510,7 @@ index 310ddd108f..d7604e5d7c 100644
cs->current_block = NULL;
}
@@ -2453,7 +2460,7 @@ static void wined3d_cs_mt_submit_and_wait(struct wined3d_cs *cs)
@@ -2465,7 +2472,7 @@ static void wined3d_cs_mt_submit_and_wait(struct wined3d_cs *cs)
block = cs->current_block;
block->fence = &fence;
@ -519,7 +519,7 @@ index 310ddd108f..d7604e5d7c 100644
cs->current_block = NULL;
/* A busy wait should be fine, we're not supposed to have to wait very
@@ -2475,7 +2482,7 @@ static void wined3d_cs_mt_emit_stop(struct wined3d_cs *cs)
@@ -2487,7 +2494,7 @@ static void wined3d_cs_mt_emit_stop(struct wined3d_cs *cs)
assert(cs->thread_id != GetCurrentThreadId());
assert(cs->ops == &wined3d_cs_mt_ops);
@ -528,7 +528,7 @@ index 310ddd108f..d7604e5d7c 100644
op->opcode = WINED3D_CS_OP_STOP;
cs->ops->submit(cs);
@@ -2561,6 +2568,7 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
@@ -2573,6 +2580,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);
@ -536,7 +536,7 @@ index 310ddd108f..d7604e5d7c 100644
if (!(cs->thread = CreateThread(NULL, 0, wined3d_cs_run, cs, 0, &cs->thread_id)))
{
@@ -2586,6 +2594,7 @@ void wined3d_cs_destroy(struct wined3d_cs *cs)
@@ -2598,6 +2606,7 @@ void wined3d_cs_destroy(struct wined3d_cs *cs)
WaitForSingleObject(cs->thread, INFINITE);
CloseHandle(cs->thread);
@ -545,10 +545,10 @@ index 310ddd108f..d7604e5d7c 100644
wined3d_cs_list_cleanup(&cs->free_list);
}
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 4e8fca716e..a6a51fea0a 100644
index 99f598f4fe..21172d7a6b 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3227,13 +3227,14 @@ struct wined3d_cs_block
@@ -3228,13 +3228,14 @@ struct wined3d_cs_block
{
struct list entry;
UINT pos;
@ -564,7 +564,7 @@ index 4e8fca716e..a6a51fea0a 100644
void (*submit)(struct wined3d_cs *cs);
void (*submit_and_wait)(struct wined3d_cs *cs);
};
@@ -3253,6 +3254,7 @@ struct wined3d_cs
@@ -3254,6 +3255,7 @@ struct wined3d_cs
struct wined3d_cs_block *current_block;
struct wined3d_cs_list free_list;
struct wined3d_cs_list exec_list;

View File

@ -1,4 +1,4 @@
From ec94556fda1517b698ed180ebd06f20bf59d2438 Mon Sep 17 00:00:00 2001
From 3968647ea08b56327b34d00da606dcf2e3688d2f Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Wed, 8 Feb 2017 12:32:55 +0100
Subject: wined3d: Do not immediately submit stateblock updates.
@ -9,10 +9,10 @@ Subject: wined3d: Do not immediately submit stateblock updates.
2 files changed, 36 insertions(+), 28 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 75907ff6146..ffea25e50c0 100644
index f6c2315400..5d53fd5696 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -856,7 +856,7 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query
@@ -894,7 +894,7 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query
op->predicate = predicate;
op->value = value;
@ -21,7 +21,7 @@ index 75907ff6146..ffea25e50c0 100644
}
static UINT wined3d_cs_exec_set_viewport(struct wined3d_cs *cs, const void *data)
@@ -877,7 +877,7 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
@@ -915,7 +915,7 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
op->opcode = WINED3D_CS_OP_SET_VIEWPORT;
op->viewport = *viewport;
@ -30,7 +30,7 @@ index 75907ff6146..ffea25e50c0 100644
}
static UINT wined3d_cs_exec_set_scissor_rect(struct wined3d_cs *cs, const void *data)
@@ -898,7 +898,7 @@ void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
@@ -936,7 +936,7 @@ void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
op->opcode = WINED3D_CS_OP_SET_SCISSOR_RECT;
op->rect = *rect;
@ -39,7 +39,7 @@ index 75907ff6146..ffea25e50c0 100644
}
static UINT wined3d_cs_exec_set_rendertarget_view(struct wined3d_cs *cs, const void *data)
@@ -921,7 +921,7 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
@@ -959,7 +959,7 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
op->view_idx = view_idx;
op->view = view;
@ -48,7 +48,7 @@ index 75907ff6146..ffea25e50c0 100644
}
static UINT wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const void *data)
@@ -971,7 +971,7 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3
@@ -1009,7 +1009,7 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3
op->opcode = WINED3D_CS_OP_SET_DEPTH_STENCIL_VIEW;
op->view = view;
@ -57,7 +57,7 @@ index 75907ff6146..ffea25e50c0 100644
}
static UINT wined3d_cs_exec_set_vertex_declaration(struct wined3d_cs *cs, const void *data)
@@ -992,7 +992,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
@@ -1030,7 +1030,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
op->opcode = WINED3D_CS_OP_SET_VERTEX_DECLARATION;
op->declaration = declaration;
@ -66,7 +66,7 @@ index 75907ff6146..ffea25e50c0 100644
}
static UINT wined3d_cs_exec_set_stream_source(struct wined3d_cs *cs, const void *data)
@@ -1029,7 +1029,7 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
@@ -1067,7 +1067,7 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
op->offset = offset;
op->stride = stride;
@ -75,7 +75,7 @@ index 75907ff6146..ffea25e50c0 100644
}
static UINT wined3d_cs_exec_set_stream_source_freq(struct wined3d_cs *cs, const void *data)
@@ -1056,7 +1056,7 @@ void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_i
@@ -1094,7 +1094,7 @@ void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_i
op->frequency = frequency;
op->flags = flags;
@ -84,7 +84,7 @@ index 75907ff6146..ffea25e50c0 100644
}
static UINT wined3d_cs_exec_set_stream_output(struct wined3d_cs *cs, const void *data)
@@ -1089,7 +1089,7 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
@@ -1129,7 +1129,7 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
op->buffer = buffer;
op->offset = offset;
@ -93,7 +93,7 @@ index 75907ff6146..ffea25e50c0 100644
}
static UINT wined3d_cs_exec_set_index_buffer(struct wined3d_cs *cs, const void *data)
@@ -1123,7 +1123,7 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
@@ -1163,7 +1163,7 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
op->format_id = format_id;
op->offset = offset;
@ -102,7 +102,7 @@ index 75907ff6146..ffea25e50c0 100644
}
static UINT wined3d_cs_exec_set_constant_buffer(struct wined3d_cs *cs, const void *data)
@@ -1154,7 +1154,7 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
@@ -1194,7 +1194,7 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
op->cb_idx = cb_idx;
op->buffer = buffer;
@ -111,7 +111,7 @@ index 75907ff6146..ffea25e50c0 100644
}
static UINT wined3d_cs_exec_set_texture(struct wined3d_cs *cs, const void *data)
@@ -1247,7 +1247,7 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
@@ -1287,7 +1287,7 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
op->stage = stage;
op->texture = texture;
@ -120,7 +120,7 @@ index 75907ff6146..ffea25e50c0 100644
}
static UINT wined3d_cs_exec_set_shader_resource_view(struct wined3d_cs *cs, const void *data)
@@ -1282,7 +1282,7 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
@@ -1322,7 +1322,7 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
op->view_idx = view_idx;
op->view = view;
@ -129,7 +129,7 @@ index 75907ff6146..ffea25e50c0 100644
}
static UINT wined3d_cs_exec_set_unordered_access_view(struct wined3d_cs *cs, const void *data)
@@ -1314,7 +1314,7 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
@@ -1354,7 +1354,7 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
op->view_idx = view_idx;
op->view = view;
@ -138,7 +138,7 @@ index 75907ff6146..ffea25e50c0 100644
}
static UINT wined3d_cs_exec_set_sampler(struct wined3d_cs *cs, const void *data)
@@ -1341,7 +1341,7 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
@@ -1381,7 +1381,7 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
op->sampler_idx = sampler_idx;
op->sampler = sampler;
@ -147,7 +147,7 @@ index 75907ff6146..ffea25e50c0 100644
}
static UINT wined3d_cs_exec_set_shader(struct wined3d_cs *cs, const void *data)
@@ -1367,7 +1367,7 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
@@ -1407,7 +1407,7 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
op->type = type;
op->shader = shader;
@ -156,7 +156,7 @@ index 75907ff6146..ffea25e50c0 100644
}
static UINT wined3d_cs_exec_set_rasterizer_state(struct wined3d_cs *cs, const void *data)
@@ -1389,7 +1389,7 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
@@ -1429,7 +1429,7 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
op->opcode = WINED3D_CS_OP_SET_RASTERIZER_STATE;
op->state = rasterizer_state;
@ -165,7 +165,7 @@ index 75907ff6146..ffea25e50c0 100644
}
static UINT wined3d_cs_exec_set_render_state(struct wined3d_cs *cs, const void *data)
@@ -1411,7 +1411,7 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
@@ -1451,7 +1451,7 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
op->state = state;
op->value = value;
@ -174,7 +174,7 @@ index 75907ff6146..ffea25e50c0 100644
}
static UINT wined3d_cs_exec_set_texture_state(struct wined3d_cs *cs, const void *data)
@@ -1435,7 +1435,7 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
@@ -1475,7 +1475,7 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
op->state = state;
op->value = value;
@ -183,7 +183,7 @@ index 75907ff6146..ffea25e50c0 100644
}
static UINT wined3d_cs_exec_set_sampler_state(struct wined3d_cs *cs, const void *data)
@@ -1459,7 +1459,7 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
@@ -1499,7 +1499,7 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
op->state = state;
op->value = value;
@ -192,7 +192,7 @@ index 75907ff6146..ffea25e50c0 100644
}
static UINT wined3d_cs_exec_set_transform(struct wined3d_cs *cs, const void *data)
@@ -1483,7 +1483,7 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
@@ -1523,7 +1523,7 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
op->state = state;
op->matrix = *matrix;
@ -201,7 +201,7 @@ index 75907ff6146..ffea25e50c0 100644
}
static UINT wined3d_cs_exec_set_clip_plane(struct wined3d_cs *cs, const void *data)
@@ -1505,7 +1505,7 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
@@ -1545,7 +1545,7 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
op->plane_idx = plane_idx;
op->plane = *plane;
@ -210,7 +210,7 @@ index 75907ff6146..ffea25e50c0 100644
}
static UINT wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *data)
@@ -1590,7 +1590,7 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
@@ -1630,7 +1630,7 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
else
op->set = 0;
@ -219,7 +219,7 @@ index 75907ff6146..ffea25e50c0 100644
}
static UINT wined3d_cs_exec_set_material(struct wined3d_cs *cs, const void *data)
@@ -1611,7 +1611,7 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
@@ -1651,7 +1651,7 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
op->opcode = WINED3D_CS_OP_SET_MATERIAL;
op->material = *material;
@ -228,7 +228,7 @@ index 75907ff6146..ffea25e50c0 100644
}
static UINT wined3d_cs_exec_set_light(struct wined3d_cs *cs, const void *data)
@@ -1661,7 +1661,7 @@ void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light
@@ -1701,7 +1701,7 @@ void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light
op->opcode = WINED3D_CS_OP_SET_LIGHT;
op->light = *light;
@ -237,7 +237,7 @@ index 75907ff6146..ffea25e50c0 100644
}
static UINT wined3d_cs_exec_set_light_enable(struct wined3d_cs *cs, const void *data)
@@ -1697,7 +1697,7 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, unsigned int idx, B
@@ -1737,7 +1737,7 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, unsigned int idx, B
op->idx = idx;
op->enable = enable;
@ -246,7 +246,7 @@ index 75907ff6146..ffea25e50c0 100644
}
static UINT wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data)
@@ -1719,7 +1719,7 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
@@ -1759,7 +1759,7 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
op = cs->ops->require_space(cs, sizeof(*op), 0);
op->opcode = WINED3D_CS_OP_RESET_STATE;
@ -255,7 +255,7 @@ index 75907ff6146..ffea25e50c0 100644
}
static UINT wined3d_cs_exec_callback(struct wined3d_cs *cs, const void *data)
@@ -2111,7 +2111,7 @@ void wined3d_cs_emit_push_constants(struct wined3d_cs *cs, enum wined3d_push_con
@@ -2151,7 +2151,7 @@ void wined3d_cs_emit_push_constants(struct wined3d_cs *cs, enum wined3d_push_con
op->count = count;
memcpy(op->constants, constants, count * push_constant_info[p].size);
@ -263,8 +263,8 @@ index 75907ff6146..ffea25e50c0 100644
+ cs->ops->submit_delayed(cs);
}
static UINT wined3d_cs_exec_clear_rtv(struct wined3d_cs *cs, const void *data)
@@ -2397,6 +2397,7 @@ static const struct wined3d_cs_ops wined3d_cs_st_ops =
static UINT wined3d_cs_exec_update_texture(struct wined3d_cs *cs, const void *data)
@@ -2345,6 +2345,7 @@ static const struct wined3d_cs_ops wined3d_cs_st_ops =
wined3d_cs_st_require_space,
wined3d_cs_st_submit,
wined3d_cs_st_submit,
@ -272,7 +272,7 @@ index 75907ff6146..ffea25e50c0 100644
};
static void wined3d_cs_list_enqueue(struct wined3d_cs_list *list, struct wined3d_cs_block *block)
@@ -2573,11 +2574,17 @@ static void wined3d_cs_mt_submit_and_wait(struct wined3d_cs *cs)
@@ -2521,11 +2522,17 @@ static void wined3d_cs_mt_submit_and_wait(struct wined3d_cs *cs)
while (!InterlockedCompareExchange(&fence, TRUE, TRUE));
}
@ -291,10 +291,10 @@ index 75907ff6146..ffea25e50c0 100644
static void wined3d_cs_mt_emit_stop(struct wined3d_cs *cs)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 893768527b1..367e17fb7a7 100644
index 4c518e2a09..c6b8c59d1e 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3231,6 +3231,7 @@ struct wined3d_cs_ops
@@ -3239,6 +3239,7 @@ struct wined3d_cs_ops
void *(*require_space)(struct wined3d_cs *cs, size_t size, int priority);
void (*submit)(struct wined3d_cs *cs);
void (*submit_and_wait)(struct wined3d_cs *cs);

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
From 1c8b23cabb6ae115226a5adf3e88bdda4ab84776 Mon Sep 17 00:00:00 2001
From 908b5f8f2adabefde41d520582937ba85421d7c4 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Tue, 3 Mar 2015 19:20:40 +0100
Subject: ws2_32: Reuse old async ws2_async_io structures if possible.
@ -8,10 +8,10 @@ Subject: ws2_32: Reuse old async ws2_async_io structures if possible.
1 file changed, 21 insertions(+), 6 deletions(-)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
index 5bfdecf..4538948 100644
index 22ff4797f8..c83a760718 100644
--- a/dlls/ws2_32/socket.c
+++ b/dlls/ws2_32/socket.c
@@ -333,6 +333,7 @@ static inline const char *debugstr_sockaddr( const struct WS_sockaddr *a )
@@ -473,6 +473,7 @@ static inline const char *debugstr_optval(const char *optval, int optlenval)
struct ws2_async_io
{
struct ws2_async_io *next;
@ -19,7 +19,7 @@ index 5bfdecf..4538948 100644
};
struct ws2_async_shutdown
@@ -394,16 +395,30 @@ static struct ws2_async_io *alloc_async_io( DWORD size )
@@ -548,16 +549,30 @@ static struct ws2_async_io *alloc_async_io( DWORD size )
{
/* first free remaining previous fileinfos */
@ -55,7 +55,7 @@ index 5bfdecf..4538948 100644
+ return io;
}
/****************************************************************/
typedef NTSTATUS async_callback_t( void *user, IO_STATUS_BLOCK *io, NTSTATUS status, void **apc, void **arg );
--
2.3.0
2.11.0