Rebase against 06c5a9ab55751b1c66ea0847aea4d4a45d8d343c.

This commit is contained in:
Sebastian Lackner
2017-02-10 16:41:25 +01:00
parent 253835e7c3
commit 2b415aff4f
14 changed files with 811 additions and 599 deletions

View File

@@ -1,16 +1,16 @@
From c17d78b9e0ee2ea345d74cfc1bb5b76c97ea4623 Mon Sep 17 00:00:00 2001
From 52baf7a72c18b2949f3a6552ec38ffe7ef1c1451 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Tue, 1 Oct 2013 15:30:26 +0200
Subject: wined3d: Give the cs its own state
---
dlls/wined3d/cs.c | 78 ++++++++++++++++++++++++++++--------------
dlls/wined3d/cs.c | 76 +++++++++++++++++++++++++++++-------------
dlls/wined3d/device.c | 4 +++
dlls/wined3d/wined3d_private.h | 4 ++-
3 files changed, 60 insertions(+), 26 deletions(-)
3 files changed, 59 insertions(+), 25 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index b832b7e0733..e9d238d262f 100644
index 9501609da1f..a0c32dd65f8 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -76,6 +76,7 @@ enum wined3d_cs_op
@@ -21,7 +21,7 @@ index b832b7e0733..e9d238d262f 100644
WINED3D_CS_OP_STOP,
};
@@ -376,6 +377,12 @@ struct wined3d_cs_push_constants
@@ -377,6 +378,12 @@ struct wined3d_cs_push_constants
BYTE constants[1];
};
@@ -34,7 +34,7 @@ index b832b7e0733..e9d238d262f 100644
static inline BOOL wined3d_cs_process_block(struct wined3d_cs *cs, struct wined3d_cs_block *block);
static void wined3d_cs_mt_submit(struct wined3d_cs *cs);
@@ -522,7 +529,7 @@ static UINT wined3d_cs_exec_clear(struct wined3d_cs *cs, const void *data)
@@ -523,7 +530,7 @@ static UINT wined3d_cs_exec_clear(struct wined3d_cs *cs, const void *data)
size_t size = FIELD_OFFSET(struct wined3d_cs_clear, rects[op->rect_count]);
device = cs->device;
@@ -43,29 +43,25 @@ index b832b7e0733..e9d238d262f 100644
wined3d_get_draw_rect(state, &draw_rect);
device_clear_render_targets(device, device->adapter->gl_info.limits.buffers,
&device->fb, op->rect_count, op->rects, &draw_rect, op->flags,
@@ -642,10 +649,10 @@ static UINT wined3d_cs_exec_dispatch(struct wined3d_cs *cs, const void *data)
@@ -681,7 +688,7 @@ static void release_unordered_access_resources(const struct wined3d_shader *shad
static UINT wined3d_cs_exec_dispatch(struct wined3d_cs *cs, const void *data)
{
- struct wined3d_state *state = &cs->device->state;
+ struct wined3d_state *state = &cs->state;
const struct wined3d_cs_dispatch *op = data;
- dispatch_compute(cs->device, &cs->device->state,
+ dispatch_compute(cs->device, &cs->state,
op->group_count_x, op->group_count_y, op->group_count_z);
- release_shader_resources(&cs->device->state, 1u << WINED3D_SHADER_TYPE_COMPUTE);
+ release_shader_resources(&cs->state, 1u << WINED3D_SHADER_TYPE_COMPUTE);
return sizeof(*op);
}
@@ -668,7 +675,7 @@ void wined3d_cs_emit_dispatch(struct wined3d_cs *cs,
dispatch_compute(cs->device, state,
@@ -715,7 +722,7 @@ void wined3d_cs_emit_dispatch(struct wined3d_cs *cs,
static UINT wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
{
- struct wined3d_state *state = &cs->device->state;
+ struct wined3d_state *state = &cs->state;
const struct wined3d_cs_draw *op = data;
struct wined3d_shader *shader;
unsigned int i;
@@ -1189,6 +1196,34 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
@@ -1210,6 +1217,34 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
cs->ops->submit(cs);
}
@@ -100,7 +96,7 @@ index b832b7e0733..e9d238d262f 100644
static UINT wined3d_cs_exec_set_shader_resource_view(struct wined3d_cs *cs, const void *data)
{
const struct wined3d_cs_set_shader_resource_view *op = data;
@@ -1854,6 +1889,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -1878,6 +1913,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_UNMAP */ wined3d_cs_exec_unmap,
/* WINED3D_CS_OP_GLFINISH */ wined3d_cs_exec_glfinish,
/* WINED3D_CS_OP_PUSH_CONSTANTS */ wined3d_cs_exec_push_constants,
@@ -108,7 +104,7 @@ index b832b7e0733..e9d238d262f 100644
};
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
@@ -1998,6 +2034,7 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
@@ -2022,6 +2058,7 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
if (!(cs = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*cs))))
return NULL;
@@ -116,7 +112,7 @@ index b832b7e0733..e9d238d262f 100644
if (!(cs->fb.render_targets = wined3d_calloc(gl_info->limits.buffers, sizeof(*cs->fb.render_targets))))
{
@@ -2013,21 +2050,12 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
@@ -2037,21 +2074,12 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
cs->data_size = WINED3D_INITIAL_CS_SIZE;
if (!(cs->data = HeapAlloc(GetProcessHeap(), 0, cs->data_size)))
@@ -140,7 +136,7 @@ index b832b7e0733..e9d238d262f 100644
}
if (wined3d_settings.cs_multithreaded)
@@ -2040,17 +2068,19 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
@@ -2064,17 +2092,19 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
if (!(cs->thread = CreateThread(NULL, 0, wined3d_cs_run, cs, 0, &cs->thread_id)))
{
ERR("Failed to create wined3d command stream thread.\n");
@@ -167,7 +163,7 @@ index b832b7e0733..e9d238d262f 100644
}
void wined3d_cs_destroy(struct wined3d_cs *cs)
@@ -2075,9 +2105,7 @@ void wined3d_cs_destroy(struct wined3d_cs *cs)
@@ -2099,9 +2129,7 @@ void wined3d_cs_destroy(struct wined3d_cs *cs)
#endif
}
@@ -179,10 +175,10 @@ index b832b7e0733..e9d238d262f 100644
HeapFree(GetProcessHeap(), 0, cs->data);
HeapFree(GetProcessHeap(), 0, cs);
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 831f36c9870..268d1e93857 100644
index df80b784749..35b107306c0 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -3648,6 +3648,7 @@ HRESULT CDECL wined3d_device_draw_primitive(struct wined3d_device *device, UINT
@@ -3662,6 +3662,7 @@ HRESULT CDECL wined3d_device_draw_primitive(struct wined3d_device *device, UINT
{
TRACE("device %p, start_vertex %u, vertex_count %u.\n", device, start_vertex, vertex_count);
@@ -190,7 +186,7 @@ index 831f36c9870..268d1e93857 100644
wined3d_cs_emit_draw(device->cs, 0, start_vertex, vertex_count, 0, 0, FALSE);
return WINED3D_OK;
@@ -3659,6 +3660,7 @@ void CDECL wined3d_device_draw_primitive_instanced(struct wined3d_device *device
@@ -3673,6 +3674,7 @@ void CDECL wined3d_device_draw_primitive_instanced(struct wined3d_device *device
TRACE("device %p, start_vertex %u, vertex_count %u, start_instance %u, instance_count %u.\n",
device, start_vertex, vertex_count, start_instance, instance_count);
@@ -198,7 +194,7 @@ index 831f36c9870..268d1e93857 100644
wined3d_cs_emit_draw(device->cs, 0, start_vertex, vertex_count, start_instance, instance_count, FALSE);
}
@@ -3676,6 +3678,7 @@ HRESULT CDECL wined3d_device_draw_indexed_primitive(struct wined3d_device *devic
@@ -3690,6 +3692,7 @@ HRESULT CDECL wined3d_device_draw_indexed_primitive(struct wined3d_device *devic
return WINED3DERR_INVALIDCALL;
}
@@ -206,7 +202,7 @@ index 831f36c9870..268d1e93857 100644
wined3d_cs_emit_draw(device->cs, device->state.base_vertex_index, start_idx, index_count, 0, 0, TRUE);
return WINED3D_OK;
@@ -3687,6 +3690,7 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device
@@ -3701,6 +3704,7 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device
TRACE("device %p, start_idx %u, index_count %u, start_instance %u, instance_count %u.\n",
device, start_idx, index_count, start_instance, instance_count);
@@ -215,10 +211,10 @@ index 831f36c9870..268d1e93857 100644
start_idx, index_count, start_instance, instance_count, TRUE);
}
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index e7437a38023..0085339d6a8 100644
index 03cbdf7daae..1c7f8ecad73 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3124,7 +3124,7 @@ struct wined3d_cs_block
@@ -3163,7 +3163,7 @@ struct wined3d_cs_block
{
struct list entry;
UINT pos;
@@ -227,7 +223,7 @@ index e7437a38023..0085339d6a8 100644
};
struct wined3d_cs_ops
@@ -3182,6 +3182,8 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
@@ -3221,6 +3221,8 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
WORD flags, const struct wined3d_color_key *color_key) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_shader_type type,
UINT cb_idx, struct wined3d_buffer *buffer) DECLSPEC_HIDDEN;

View File

@@ -1,4 +1,4 @@
From c0bc4f7688ba8dbc3458d78237d4b2b998901c40 Mon Sep 17 00:00:00 2001
From 72a55c637885a2362af6c091a82bf9e0b0f313bb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Mon, 29 Apr 2013 18:49:53 +0200
Subject: wined3d: Send blits through the command stream.
@@ -6,15 +6,15 @@ Subject: wined3d: Send blits through the command stream.
This needs more work. This patch breaks error handling, and the split
between surface_blt and surface_blt_ugly isn't particularly nice.
---
dlls/d3d11/tests/d3d11.c | 2 +-
dlls/d3d11/tests/d3d11.c | 6 +-
dlls/wined3d/cs.c | 54 +++++++++
dlls/wined3d/device.c | 26 +++++
dlls/wined3d/surface.c | 249 +++++++++++++++++++++++++----------------
dlls/wined3d/wined3d_private.h | 7 ++
5 files changed, 240 insertions(+), 98 deletions(-)
5 files changed, 242 insertions(+), 100 deletions(-)
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
index 40e0241a463..eb67dfc07fd 100644
index c1a99ce0ab9..a05dcb1fae3 100644
--- a/dlls/d3d11/tests/d3d11.c
+++ b/dlls/d3d11/tests/d3d11.c
@@ -9533,7 +9533,7 @@ static void test_draw_uav_only(void)
@@ -26,8 +26,21 @@ index 40e0241a463..eb67dfc07fd 100644
ID3D11PixelShader_Release(ps);
ID3D11Texture2D_Release(texture);
@@ -13463,10 +13463,10 @@ static void test_ps_cs_uav_binding(void)
input.x = 4.0f;
ID3D11DeviceContext_UpdateSubresource(context, (ID3D11Resource *)ps_cb, 0, NULL, &input, 0, 0);
ID3D11DeviceContext_Dispatch(context, 1, 1, 1);
- todo_wine check_texture_float(cs_texture, 8.0f, 2);
+ check_texture_float(cs_texture, 8.0f, 2);
check_texture_float(ps_texture, 2.0f, 2);
draw_quad(&test_context);
- todo_wine check_texture_float(cs_texture, 8.0f, 2);
+ check_texture_float(cs_texture, 8.0f, 2);
check_texture_float(ps_texture, 4.0f, 2);
ID3D11ComputeShader_Release(cs);
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index e738c6ff058..30020d62c0c 100644
index 1fa4fe7eb83..ceef9294cd8 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -79,6 +79,7 @@ enum wined3d_cs_op
@@ -38,7 +51,7 @@ index e738c6ff058..30020d62c0c 100644
WINED3D_CS_OP_STOP,
};
@@ -398,6 +399,18 @@ struct wined3d_cs_set_light_enable
@@ -399,6 +400,18 @@ struct wined3d_cs_set_light_enable
BOOL enable;
};
@@ -57,7 +70,7 @@ index e738c6ff058..30020d62c0c 100644
static inline BOOL wined3d_cs_process_block(struct wined3d_cs *cs, struct wined3d_cs_block *block);
static void wined3d_cs_mt_submit(struct wined3d_cs *cs);
@@ -2028,6 +2041,46 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, UINT idx, BOOL enab
@@ -2052,6 +2065,46 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, UINT idx, BOOL enab
cs->ops->submit(cs);
}
@@ -104,7 +117,7 @@ index e738c6ff058..30020d62c0c 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_FENCE */ wined3d_cs_exec_fence,
@@ -2072,6 +2125,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2096,6 +2149,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_SET_PRIMITIVE_TYPE */ wined3d_cs_exec_set_primitive_type,
/* WINED3D_CS_OP_SET_LIGHT */ wined3d_cs_exec_set_light,
/* WINED3D_CS_OP_SET_LIGHT_ENABLE */ wined3d_cs_exec_set_light_enable,
@@ -113,10 +126,10 @@ index e738c6ff058..30020d62c0c 100644
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 71701a816da..e1a02212900 100644
index 07543965df2..5ae2d202c83 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -4070,6 +4070,7 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
@@ -4084,6 +4084,7 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
struct wined3d_texture *dst_texture, *src_texture;
RECT dst_rect, src_rect;
HRESULT hr;
@@ -124,7 +137,7 @@ index 71701a816da..e1a02212900 100644
TRACE("device %p, dst_resource %p, dst_sub_resource_idx %u, dst_x %u, dst_y %u, dst_z %u, "
"src_resource %p, src_sub_resource_idx %u, src_box %s.\n",
@@ -4157,6 +4158,14 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
@@ -4171,6 +4172,14 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
if (src_box)
{
@@ -139,7 +152,7 @@ index 71701a816da..e1a02212900 100644
SetRect(&src_rect, src_box->left, src_box->top, src_box->right, src_box->bottom);
}
else
@@ -4170,6 +4179,23 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
@@ -4184,6 +4193,23 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
SetRect(&dst_rect, dst_x, dst_y, dst_x + (src_rect.right - src_rect.left),
dst_y + (src_rect.bottom - src_rect.top));
@@ -164,10 +177,10 @@ index 71701a816da..e1a02212900 100644
src_texture, src_sub_resource_idx, &src_rect, 0, NULL, WINED3D_TEXF_POINT)))
WARN("Failed to blit, hr %#x.\n", hr);
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 3369d8777df..e19f63db4c2 100644
index 4fe16917296..4ddcdcb58b8 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -3886,7 +3886,7 @@ const struct blit_shader cpu_blit = {
@@ -3891,7 +3891,7 @@ const struct blit_shader cpu_blit = {
cpu_blit_blit_surface,
};
@@ -176,7 +189,7 @@ index 3369d8777df..e19f63db4c2 100644
struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags,
const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter)
{
@@ -3896,9 +3896,8 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
@@ -3901,9 +3901,8 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
struct wined3d_texture *dst_texture = dst_surface->container;
struct wined3d_device *device = dst_texture->resource.device;
struct wined3d_swapchain *src_swapchain, *dst_swapchain;
@@ -188,7 +201,7 @@ index 3369d8777df..e19f63db4c2 100644
DWORD src_ds_flags, dst_ds_flags;
BOOL scale, convert;
@@ -3911,84 +3910,17 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
@@ -3916,84 +3915,17 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
| WINED3D_BLT_DO_NOT_WAIT
| WINED3D_BLT_ALPHA_TEST;
@@ -278,7 +291,7 @@ index 3369d8777df..e19f63db4c2 100644
}
if (!device->d3d_initialized)
@@ -4013,11 +3945,6 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
@@ -4018,11 +3950,6 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
goto fallback;
}
@@ -290,7 +303,7 @@ index 3369d8777df..e19f63db4c2 100644
dst_swapchain = dst_texture->swapchain;
/* This isn't strictly needed. FBO blits for example could deal with
@@ -4053,22 +3980,16 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
@@ -4058,22 +3985,16 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
TRACE("Depth fill.\n");
if (!surface_convert_depth_to_float(dst_surface, fx->fill_color, &depth))
@@ -316,7 +329,7 @@ index 3369d8777df..e19f63db4c2 100644
}
}
else
@@ -4104,7 +4025,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
@@ -4109,7 +4030,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
goto fallback;
if (SUCCEEDED(surface_color_fill(dst_surface, dst_rect, &color)))
@@ -325,7 +338,7 @@ index 3369d8777df..e19f63db4c2 100644
}
else
{
@@ -4147,7 +4068,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
@@ -4152,7 +4073,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
context, dst_texture->resource.draw_binding);
context_release(context);
}
@@ -334,7 +347,7 @@ index 3369d8777df..e19f63db4c2 100644
}
}
}
@@ -4171,7 +4092,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
@@ -4176,7 +4097,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
wined3d_swapchain_present(dst_swapchain, NULL, NULL, dst_swapchain->win_handle, 0);
dst_swapchain->desc.swap_effect = swap_effect;
@@ -343,7 +356,7 @@ index 3369d8777df..e19f63db4c2 100644
}
if (fbo_blit_supported(&device->adapter->gl_info, blit_op,
@@ -4192,7 +4113,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
@@ -4197,7 +4118,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
wined3d_texture_invalidate_location(dst_texture, dst_sub_resource_idx,
~dst_texture->resource.draw_binding);
@@ -352,7 +365,7 @@ index 3369d8777df..e19f63db4c2 100644
}
blitter = wined3d_select_blitter(&device->adapter->gl_info, &device->adapter->d3d_info, blit_op,
@@ -4202,7 +4123,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
@@ -4207,7 +4128,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
{
blitter->blit_surface(device, blit_op, filter, src_surface,
src_rect, dst_surface, dst_rect, color_key);
@@ -361,7 +374,7 @@ index 3369d8777df..e19f63db4c2 100644
}
}
}
@@ -4210,9 +4131,143 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
@@ -4215,9 +4136,143 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
fallback:
/* Special cases for render targets. */
if (SUCCEEDED(surface_blt_special(dst_surface, dst_rect, src_surface, src_rect, flags, fx, filter)))
@@ -508,10 +521,10 @@ index 3369d8777df..e19f63db4c2 100644
+ return WINED3D_OK;
+}
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index c28dd691a14..84c592249aa 100644
index d8fcecb82d9..605e2bf50d0 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2991,6 +2991,9 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
@@ -3030,6 +3030,9 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
void wined3d_surface_upload_data(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info,
const struct wined3d_format *format, const RECT *src_rect, UINT src_pitch, const POINT *dst_point,
BOOL srgb, const struct wined3d_const_bo_address *data) DECLSPEC_HIDDEN;
@@ -521,7 +534,7 @@ index c28dd691a14..84c592249aa 100644
void draw_textured_quad(const struct wined3d_surface *src_surface, struct wined3d_context *context,
const RECT *src_rect, const RECT *dst_rect, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
@@ -3161,6 +3164,10 @@ static inline void wined3d_resource_wait_idle(struct wined3d_resource *resource)
@@ -3200,6 +3203,10 @@ static inline void wined3d_resource_wait_idle(struct wined3d_resource *resource)
struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device) DECLSPEC_HIDDEN;
void wined3d_cs_destroy(struct wined3d_cs *cs) DECLSPEC_HIDDEN;

View File

@@ -1,4 +1,4 @@
From 8a285168481d772c9c1f7be5441359fb16a88505 Mon Sep 17 00:00:00 2001
From b8980974b1117ed0b1b792118e64265d2de984ff Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 10 Oct 2013 16:29:42 +0200
Subject: wined3d: Create dummy textures through the CS.
@@ -6,13 +6,127 @@ Subject: wined3d: Create dummy textures through the CS.
Hacky version. Just good enough to see if the double context during init is what makes fglrx
crash.
---
dlls/d3d11/tests/d3d11.c | 34 +++++++++++++++++-----------------
dlls/wined3d/cs.c | 28 ++++++++++++++++++++++++++++
dlls/wined3d/device.c | 10 ++++------
dlls/wined3d/wined3d_private.h | 2 ++
3 files changed, 34 insertions(+), 6 deletions(-)
4 files changed, 51 insertions(+), 23 deletions(-)
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
index 045e2fa54f2..2e67b720f56 100644
--- a/dlls/d3d11/tests/d3d11.c
+++ b/dlls/d3d11/tests/d3d11.c
@@ -13205,12 +13205,12 @@ static void test_cs_uav_store(void)
ID3D11DeviceContext_CSSetShader(context, cs, NULL, 0);
ID3D11DeviceContext_Dispatch(context, 1, 1, 1);
- todo_wine check_texture_float(texture, 1.0f, 2);
+ check_texture_float(texture, 1.0f, 2);
input.x = 0.5f;
ID3D11DeviceContext_UpdateSubresource(context, (ID3D11Resource *)cb, 0, NULL, &input, 0, 0);
ID3D11DeviceContext_Dispatch(context, 1, 1, 1);
- todo_wine check_texture_float(texture, 0.5f, 2);
+ check_texture_float(texture, 0.5f, 2);
ID3D11ComputeShader_Release(cs);
@@ -13218,19 +13218,19 @@ static void test_cs_uav_store(void)
ID3D11DeviceContext_UpdateSubresource(context, (ID3D11Resource *)cb, 0, NULL, &input, 0, 0);
ID3D11DeviceContext_CSSetShader(context, NULL, NULL, 0);
ID3D11DeviceContext_Dispatch(context, 1, 1, 1);
- todo_wine check_texture_float(texture, 0.5f, 2);
+ check_texture_float(texture, 0.5f, 2);
hr = ID3D11Device_CreateComputeShader(device, cs_1_group_code, sizeof(cs_1_group_code), NULL, &cs);
ok(SUCCEEDED(hr), "Failed to create compute shader, hr %#x.\n", hr);
ID3D11DeviceContext_CSSetShader(context, cs, NULL, 0);
ID3D11DeviceContext_Dispatch(context, 1, 1, 1);
- todo_wine check_texture_float(texture, 2.0f, 2);
+ check_texture_float(texture, 2.0f, 2);
input.x = 4.0f;
ID3D11DeviceContext_UpdateSubresource(context, (ID3D11Resource *)cb, 0, NULL, &input, 0, 0);
ID3D11DeviceContext_Dispatch(context, 1, 1, 1);
- todo_wine check_texture_float(texture, 4.0f, 2);
+ check_texture_float(texture, 4.0f, 2);
ID3D11ComputeShader_Release(cs);
@@ -13241,17 +13241,17 @@ static void test_cs_uav_store(void)
input.x = 1.0f;
ID3D11DeviceContext_UpdateSubresource(context, (ID3D11Resource *)cb, 0, NULL, &input, 0, 0);
ID3D11DeviceContext_Dispatch(context, texture_desc.Width, texture_desc.Height, 1);
- todo_wine check_texture_float(texture, 1.0f, 2);
+ check_texture_float(texture, 1.0f, 2);
input.x = 0.5f;
ID3D11DeviceContext_UpdateSubresource(context, (ID3D11Resource *)cb, 0, NULL, &input, 0, 0);
ID3D11DeviceContext_Dispatch(context, 16, 32, 1);
SetRect(&rect, 0, 0, 16, 32);
- todo_wine check_texture_sub_resource_float(texture, 0, &rect, 0.5f, 2);
+ check_texture_sub_resource_float(texture, 0, &rect, 0.5f, 2);
SetRect(&rect, 0, 32, texture_desc.Width, texture_desc.Height);
- todo_wine check_texture_sub_resource_float(texture, 0, &rect, 1.0f, 2);
+ check_texture_sub_resource_float(texture, 0, &rect, 1.0f, 2);
SetRect(&rect, 16, 0, texture_desc.Width, texture_desc.Height);
- todo_wine check_texture_sub_resource_float(texture, 0, &rect, 1.0f, 2);
+ check_texture_sub_resource_float(texture, 0, &rect, 1.0f, 2);
ID3D11ComputeShader_Release(cs);
@@ -13263,16 +13263,16 @@ static void test_cs_uav_store(void)
ID3D11DeviceContext_UpdateSubresource(context, (ID3D11Resource *)cb, 0, NULL, &input, 0, 0);
ID3D11DeviceContext_Dispatch(context, 15, 15, 1);
SetRect(&rect, 0, 0, 60, 60);
- todo_wine check_texture_sub_resource_float(texture, 0, &rect, 0.6f, 2);
+ check_texture_sub_resource_float(texture, 0, &rect, 0.6f, 2);
SetRect(&rect, 0, 60, texture_desc.Width, texture_desc.Height);
- todo_wine check_texture_sub_resource_float(texture, 0, &rect, 1.0f, 2);
+ check_texture_sub_resource_float(texture, 0, &rect, 1.0f, 2);
SetRect(&rect, 60, 0, texture_desc.Width, texture_desc.Height);
- todo_wine check_texture_sub_resource_float(texture, 0, &rect, 1.0f, 2);
+ check_texture_sub_resource_float(texture, 0, &rect, 1.0f, 2);
input.x = 0.7f;
ID3D11DeviceContext_UpdateSubresource(context, (ID3D11Resource *)cb, 0, NULL, &input, 0, 0);
ID3D11DeviceContext_Dispatch(context, 16, 16, 1);
- todo_wine check_texture_float(texture, 0.7f, 2);
+ check_texture_float(texture, 0.7f, 2);
ID3D11ComputeShader_Release(cs);
@@ -13283,12 +13283,12 @@ static void test_cs_uav_store(void)
input.x = 0.3f;
ID3D11DeviceContext_UpdateSubresource(context, (ID3D11Resource *)cb, 0, NULL, &input, 0, 0);
ID3D11DeviceContext_Dispatch(context, 1, 1, 1);
- todo_wine check_texture_float(texture, 0.3f, 2);
+ check_texture_float(texture, 0.3f, 2);
input.x = 0.1f;
ID3D11DeviceContext_UpdateSubresource(context, (ID3D11Resource *)cb, 0, NULL, &input, 0, 0);
ID3D11DeviceContext_Dispatch(context, 2, 2, 2);
- todo_wine check_texture_float(texture, 0.1f, 2);
+ check_texture_float(texture, 0.1f, 2);
ID3D11ComputeShader_Release(cs);
@@ -13441,10 +13441,10 @@ static void test_ps_cs_uav_binding(void)
ID3D11DeviceContext_PSSetShader(context, ps, NULL, 0);
ID3D11DeviceContext_Dispatch(context, 1, 1, 1);
- todo_wine check_texture_float(cs_texture, 1.0f, 2);
+ check_texture_float(cs_texture, 1.0f, 2);
check_texture_float(ps_texture, 0.0f, 2);
draw_quad(&test_context);
- todo_wine check_texture_float(cs_texture, 1.0f, 2);
+ check_texture_float(cs_texture, 1.0f, 2);
check_texture_float(ps_texture, 1.0f, 2);
input.x = 0.5f;
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index abc509b6e3b..4316e1b767b 100644
index 9b267871a37..3a6bfe4d38a 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -85,6 +85,7 @@ enum wined3d_cs_op
@@ -23,7 +137,7 @@ index abc509b6e3b..4316e1b767b 100644
WINED3D_CS_OP_STOP,
};
@@ -451,6 +452,11 @@ struct wined3d_cs_get_release_dc
@@ -452,6 +453,11 @@ struct wined3d_cs_get_release_dc
HRESULT *hr;
};
@@ -35,7 +149,7 @@ index abc509b6e3b..4316e1b767b 100644
static inline BOOL wined3d_cs_process_block(struct wined3d_cs *cs, struct wined3d_cs_block *block);
static void wined3d_cs_mt_submit(struct wined3d_cs *cs);
@@ -2299,6 +2305,27 @@ HRESULT wined3d_cs_emit_release_dc(struct wined3d_cs *cs, struct wined3d_texture
@@ -2323,6 +2329,27 @@ HRESULT wined3d_cs_emit_release_dc(struct wined3d_cs *cs, struct wined3d_texture
return hr;
}
@@ -63,7 +177,7 @@ index abc509b6e3b..4316e1b767b 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_FENCE */ wined3d_cs_exec_fence,
@@ -2349,6 +2376,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2373,6 +2400,7 @@ static UINT (* 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_GET_DC */ wined3d_cs_exec_get_dc,
/* WINED3D_CS_OP_RELEASE_DC */ wined3d_cs_exec_release_dc,
@@ -72,7 +186,7 @@ index abc509b6e3b..4316e1b767b 100644
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 7ad88637f08..f3b74bb5a45 100644
index b62d3ba473f..4f5a45c1f60 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -607,7 +607,7 @@ out:
@@ -104,7 +218,7 @@ index 7ad88637f08..f3b74bb5a45 100644
/* Clear the screen */
if (swapchain->back_buffers && swapchain->back_buffers[0])
clear_flags |= WINED3DCLEAR_TARGET;
@@ -4752,7 +4750,7 @@ static HRESULT create_primary_opengl_context(struct wined3d_device *device, stru
@@ -4758,7 +4756,7 @@ static HRESULT create_primary_opengl_context(struct wined3d_device *device, stru
swapchain->context[0] = context;
swapchain->num_contexts = 1;
@@ -114,10 +228,10 @@ index 7ad88637f08..f3b74bb5a45 100644
context_release(context);
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index a2b8a9ebf92..9d8268e8b32 100644
index 1ccb02544ce..e6d349b8186 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2633,6 +2633,7 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
@@ -2672,6 +2672,7 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
void device_invalidate_state(const struct wined3d_device *device, DWORD state) DECLSPEC_HIDDEN;
void device_exec_update_texture(struct wined3d_context *context, struct wined3d_texture *src_texture,
struct wined3d_texture *dst_texture) DECLSPEC_HIDDEN;
@@ -125,7 +239,7 @@ index a2b8a9ebf92..9d8268e8b32 100644
static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD state)
{
@@ -3180,6 +3181,7 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
@@ -3219,6 +3220,7 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
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 blit_shader *blitter) DECLSPEC_HIDDEN;

View File

@@ -1,4 +1,4 @@
From 905a31e15556a725e6ab9ee0e8e32d46474a820b Mon Sep 17 00:00:00 2001
From 089e84881f1704b8280ee66ec74a06d641b07450 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 20 Dec 2012 13:09:17 +0100
Subject: wined3d: Move the framebuffer into wined3d_state
@@ -41,7 +41,7 @@ index 85ed462c78d..1191a6d5873 100644
}
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 3a728162eb4..bc27695c08e 100644
index 31725b27c88..c1cbaa677a0 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -1726,6 +1726,11 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
@@ -117,7 +117,7 @@ index 3a728162eb4..bc27695c08e 100644
}
static BOOL fixed_get_input(BYTE usage, BYTE usage_idx, unsigned int *regnum)
@@ -3507,7 +3518,7 @@ BOOL context_apply_draw_state(struct wined3d_context *context,
@@ -3506,7 +3517,7 @@ BOOL context_apply_draw_state(struct wined3d_context *context,
const struct wined3d_device *device, const struct wined3d_state *state)
{
const struct StateEntry *state_table = context->state_table;
@@ -127,10 +127,10 @@ index 3a728162eb4..bc27695c08e 100644
WORD map;
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 553a58b7219..947ed482eca 100644
index 4778b73b0dc..6d1ab033b4d 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -621,7 +621,7 @@ static UINT wined3d_cs_exec_present(struct wined3d_cs *cs, const void *data)
@@ -622,7 +622,7 @@ static UINT wined3d_cs_exec_present(struct wined3d_cs *cs, const void *data)
wined3d_swapchain_set_window(swapchain, op->dst_window_override);
swapchain->swapchain_ops->swapchain_present(swapchain, &op->src_rect, &op->dst_rect, op->flags,
@@ -139,7 +139,7 @@ index 553a58b7219..947ed482eca 100644
InterlockedDecrement(&cs->pending_presents);
@@ -684,19 +684,19 @@ static UINT wined3d_cs_exec_clear(struct wined3d_cs *cs, const void *data)
@@ -685,19 +685,19 @@ static UINT wined3d_cs_exec_clear(struct wined3d_cs *cs, const void *data)
state = &cs->state;
wined3d_get_draw_rect(state, &draw_rect);
device_clear_render_targets(device, device->adapter->gl_info.limits.buffers,
@@ -163,7 +163,7 @@ index 553a58b7219..947ed482eca 100644
return size;
}
@@ -721,12 +721,12 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
@@ -722,12 +722,12 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
{
for (i = 0; i < cs->device->adapter->gl_info.limits.buffers; ++i)
{
@@ -179,7 +179,7 @@ index 553a58b7219..947ed482eca 100644
cs->ops->submit(cs);
}
@@ -856,11 +856,11 @@ static UINT wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
@@ -902,11 +902,11 @@ static UINT wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
}
for (i = 0; i < cs->device->adapter->gl_info.limits.buffers; ++i)
{
@@ -193,9 +193,9 @@ index 553a58b7219..947ed482eca 100644
+ if (state->fb.depth_stencil)
+ wined3d_resource_release(state->fb.depth_stencil->resource);
release_shader_resources(state, ~(1u << WINED3D_SHADER_TYPE_COMPUTE));
if ((shader = state->shader[WINED3D_SHADER_TYPE_PIXEL]))
{
@@ -911,11 +911,11 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned i
release_unordered_access_resources(state->shader[WINED3D_SHADER_TYPE_PIXEL],
state->unordered_access_view[WINED3D_PIPELINE_GRAPHICS]);
@@ -944,11 +944,11 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned i
}
for (i = 0; i < cs->device->adapter->gl_info.limits.buffers; ++i)
{
@@ -209,9 +209,9 @@ index 553a58b7219..947ed482eca 100644
+ if (state->fb.depth_stencil)
+ wined3d_resource_acquire(state->fb.depth_stencil->resource);
acquire_shader_resources(state, ~(1u << WINED3D_SHADER_TYPE_COMPUTE));
if ((shader = state->shader[WINED3D_SHADER_TYPE_PIXEL]))
{
@@ -1003,7 +1003,7 @@ static UINT wined3d_cs_exec_set_rendertarget_view(struct wined3d_cs *cs, const v
acquire_unordered_access_resources(state->shader[WINED3D_SHADER_TYPE_PIXEL],
state->unordered_access_view[WINED3D_PIPELINE_GRAPHICS]);
@@ -1024,7 +1024,7 @@ static UINT wined3d_cs_exec_set_rendertarget_view(struct wined3d_cs *cs, const v
{
const struct wined3d_cs_set_rendertarget_view *op = data;
@@ -220,7 +220,7 @@ index 553a58b7219..947ed482eca 100644
device_invalidate_state(cs->device, STATE_FRAMEBUFFER);
return sizeof(*op);
@@ -1028,7 +1028,7 @@ static UINT wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
@@ -1049,7 +1049,7 @@ static UINT wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
struct wined3d_device *device = cs->device;
struct wined3d_rendertarget_view *prev;
@@ -229,7 +229,7 @@ index 553a58b7219..947ed482eca 100644
{
struct wined3d_surface *prev_surface = wined3d_rendertarget_view_get_surface(prev);
@@ -1040,7 +1040,7 @@ static UINT wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
@@ -1061,7 +1061,7 @@ static UINT wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
}
}
@@ -238,7 +238,7 @@ index 553a58b7219..947ed482eca 100644
if (!prev != !op->view)
{
@@ -1699,11 +1699,13 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
@@ -1721,11 +1721,13 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
static UINT wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data)
{
struct wined3d_adapter *adapter = cs->device->adapter;
@@ -254,7 +254,7 @@ index 553a58b7219..947ed482eca 100644
return sizeof(struct wined3d_cs_reset_state);
}
@@ -2793,15 +2795,13 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
@@ -2815,15 +2817,13 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
return NULL;
cs->tls_idx = TLS_OUT_OF_INDEXES;
@@ -272,7 +272,7 @@ index 553a58b7219..947ed482eca 100644
cs->ops = &wined3d_cs_st_ops;
cs->device = device;
@@ -2834,7 +2834,6 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
@@ -2856,7 +2856,6 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
err:
state_cleanup(&cs->state);
if (cs->tls_idx != TLS_OUT_OF_INDEXES) TlsFree(cs->tls_idx);
@@ -280,7 +280,7 @@ index 553a58b7219..947ed482eca 100644
HeapFree(GetProcessHeap(), 0, cs->data);
HeapFree(GetProcessHeap(), 0, cs);
return NULL;
@@ -2863,7 +2862,6 @@ void wined3d_cs_destroy(struct wined3d_cs *cs)
@@ -2885,7 +2884,6 @@ void wined3d_cs_destroy(struct wined3d_cs *cs)
}
TlsFree(cs->tls_idx);
@@ -289,7 +289,7 @@ index 553a58b7219..947ed482eca 100644
HeapFree(GetProcessHeap(), 0, cs);
}
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 4ae48f5de17..7c6b5052ecf 100644
index c0f6f0421bb..c643b111aa2 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -955,7 +955,7 @@ static void device_init_swapchain_state(struct wined3d_device *device, struct wi
@@ -389,7 +389,7 @@ index 4ae48f5de17..7c6b5052ecf 100644
return;
if (src_view->resource->type == WINED3D_RTYPE_BUFFER)
{
@@ -3447,6 +3422,8 @@ HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device)
@@ -3537,6 +3512,8 @@ HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device)
HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_count,
const RECT *rects, DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil)
{
@@ -398,7 +398,7 @@ index 4ae48f5de17..7c6b5052ecf 100644
TRACE("device %p, rect_count %u, rects %p, flags %#x, color %s, depth %.8e, stencil %u.\n",
device, rect_count, rects, flags, debug_color(color), depth, stencil);
@@ -3458,7 +3435,7 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
@@ -3548,7 +3525,7 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
if (flags & (WINED3DCLEAR_ZBUFFER | WINED3DCLEAR_STENCIL))
{
@@ -407,7 +407,7 @@ index 4ae48f5de17..7c6b5052ecf 100644
if (!ds)
{
WARN("Clearing depth and/or stencil without a depth stencil buffer attached, returning WINED3DERR_INVALIDCALL\n");
@@ -3467,8 +3444,8 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
@@ -3557,8 +3534,8 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
}
else if (flags & WINED3DCLEAR_TARGET)
{
@@ -418,7 +418,7 @@ index 4ae48f5de17..7c6b5052ecf 100644
{
WARN("Silently ignoring depth and target clear with mismatching sizes\n");
return WINED3D_OK;
@@ -3818,8 +3795,8 @@ HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device
@@ -3908,8 +3885,8 @@ HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device
if (state->render_states[WINED3D_RS_ZENABLE] || state->render_states[WINED3D_RS_ZWRITEENABLE]
|| state->render_states[WINED3D_RS_STENCILENABLE])
{
@@ -429,7 +429,7 @@ index 4ae48f5de17..7c6b5052ecf 100644
if (ds && rt && (ds->width < rt->width || ds->height < rt->height))
{
@@ -4254,20 +4231,21 @@ struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(co
@@ -4344,20 +4321,21 @@ struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(co
return NULL;
}
@@ -453,7 +453,7 @@ index 4ae48f5de17..7c6b5052ecf 100644
TRACE("device %p, view_idx %u, view %p, set_viewport %#x.\n",
device, view_idx, view, set_viewport);
@@ -4304,13 +4282,13 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
@@ -4394,13 +4372,13 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
}
@@ -469,7 +469,7 @@ index 4ae48f5de17..7c6b5052ecf 100644
wined3d_cs_emit_set_rendertarget_view(device->cs, view_idx, view);
/* Release after the assignment, to prevent device_resource_released()
* from seeing the surface as still in use. */
@@ -4322,18 +4300,19 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
@@ -4412,18 +4390,19 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
void CDECL wined3d_device_set_depth_stencil_view(struct wined3d_device *device, struct wined3d_rendertarget_view *view)
{
@@ -491,7 +491,7 @@ index 4ae48f5de17..7c6b5052ecf 100644
wined3d_rendertarget_view_incref(view);
wined3d_cs_emit_set_depth_stencil_view(device->cs, view);
if (prev)
@@ -4680,10 +4659,9 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
@@ -4770,10 +4749,9 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
wined3d_texture_decref(device->cursor_texture);
device->cursor_texture = NULL;
}
@@ -503,7 +503,7 @@ index 4ae48f5de17..7c6b5052ecf 100644
{
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
{
@@ -4694,6 +4672,11 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
@@ -4784,6 +4762,11 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
if (reset_state)
{
@@ -515,7 +515,7 @@ index 4ae48f5de17..7c6b5052ecf 100644
LIST_FOR_EACH_ENTRY_SAFE(resource, cursor, &device->resources, struct wined3d_resource, resource_list_entry)
{
TRACE("Enumerating resource %p.\n", resource);
@@ -4858,27 +4841,28 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
@@ -4952,27 +4935,28 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
if (device->d3d_initialized)
delete_opengl_contexts(device, swapchain);
@@ -551,7 +551,7 @@ index 4ae48f5de17..7c6b5052ecf 100644
wined3d_cs_emit_set_scissor_rect(device->cs, &state->scissor_rect);
}
@@ -4970,11 +4954,11 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
@@ -5064,11 +5048,11 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
{
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
{
@@ -565,7 +565,7 @@ index 4ae48f5de17..7c6b5052ecf 100644
ERR("Resource %p is still in use as depth/stencil buffer.\n", resource);
}
@@ -5100,8 +5084,12 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d,
@@ -5194,8 +5178,12 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d,
device->blitter = adapter->blitter;
@@ -594,10 +594,10 @@ index 49804131efb..28b4c5a48da 100644
struct wined3d_event_query *ib_query = NULL;
struct wined3d_rendertarget_view *dsv, *rtv;
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index bc041179b55..985261b6a73 100644
index 82e9fb7ea30..88dc4ee9cc6 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -1612,7 +1612,7 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
@@ -1629,7 +1629,7 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
const struct wined3d_vec4 correction_params =
{
/* Position is relative to the framebuffer, not the viewport. */
@@ -607,10 +607,10 @@ index bc041179b55..985261b6a73 100644
0.0f,
0.0f,
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
index 490c985acf1..b84e43d6294 100644
index 814da178862..09ebbfa53c6 100644
--- a/dlls/wined3d/shader.c
+++ b/dlls/wined3d/shader.c
@@ -3219,7 +3219,7 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3
@@ -3231,7 +3231,7 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3
UINT i;
memset(args, 0, sizeof(*args)); /* FIXME: Make sure all bits are set. */
@@ -620,7 +620,7 @@ index 490c985acf1..b84e43d6294 100644
static unsigned int warned = 0;
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index 2e556c798fd..66e4eb4fd89 100644
index d1884c8e354..985e24fb2d1 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -152,7 +152,7 @@ static void state_zenable(struct wined3d_context *context, const struct wined3d_
@@ -724,7 +724,7 @@ index 2e556c798fd..66e4eb4fd89 100644
else
gl_info->gl_ops.gl.p_glDisable(GL_FRAMEBUFFER_SRGB);
diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c
index ed39a15c7be..913d630cf97 100644
index 8221b99977d..3c7b4b8a664 100644
--- a/dlls/wined3d/stateblock.c
+++ b/dlls/wined3d/stateblock.c
@@ -431,6 +431,7 @@ void state_unbind_resources(struct wined3d_state *state)
@@ -735,8 +735,8 @@ index ed39a15c7be..913d630cf97 100644
unsigned int i, j;
if ((decl = state->vertex_declaration))
@@ -516,6 +517,31 @@ void state_unbind_resources(struct wined3d_state *state)
wined3d_unordered_access_view_decref(uav);
@@ -519,6 +520,31 @@ void state_unbind_resources(struct wined3d_state *state)
}
}
}
+
@@ -767,7 +767,7 @@ index ed39a15c7be..913d630cf97 100644
}
void state_cleanup(struct wined3d_state *state)
@@ -540,6 +566,8 @@ void state_cleanup(struct wined3d_state *state)
@@ -543,6 +569,8 @@ void state_cleanup(struct wined3d_state *state)
HeapFree(GetProcessHeap(), 0, light);
}
}
@@ -776,7 +776,7 @@ index ed39a15c7be..913d630cf97 100644
}
ULONG CDECL wined3d_stateblock_decref(struct wined3d_stateblock *stateblock)
@@ -1254,32 +1282,41 @@ static void state_init_default(struct wined3d_state *state, const struct wined3d
@@ -1257,32 +1285,41 @@ static void state_init_default(struct wined3d_state *state, const struct wined3d
}
}
@@ -837,10 +837,10 @@ index e65630fafc8..c5ad5bd8475 100644
struct wined3d_texture *src_texture;
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
index d1c5ef51fd5..cffe9f43b42 100644
index dde75a36be5..718808861bc 100644
--- a/dlls/wined3d/utils.c
+++ b/dlls/wined3d/utils.c
@@ -4645,7 +4645,7 @@ void get_projection_matrix(const struct wined3d_context *context, const struct w
@@ -4651,7 +4651,7 @@ void get_projection_matrix(const struct wined3d_context *context, const struct w
float y_offset = flip
? (center_offset - (2.0f * y) - h) / h
: (center_offset - (2.0f * y) - h) / -h;
@@ -849,7 +849,7 @@ index d1c5ef51fd5..cffe9f43b42 100644
state->render_states[WINED3D_RS_ZENABLE] : WINED3D_ZB_FALSE;
float z_scale = zenable ? clip_control ? 1.0f : 2.0f : 0.0f;
float z_offset = zenable ? clip_control ? 0.0f : -1.0f : 0.0f;
@@ -5444,7 +5444,7 @@ void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d
@@ -5450,7 +5450,7 @@ void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d
break;
}
}
@@ -859,10 +859,10 @@ index d1c5ef51fd5..cffe9f43b42 100644
|| !state->render_states[WINED3D_RS_CLIPPLANEENABLE])
{
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index f0777c9bd34..811fb28e2c9 100644
index ad8a3516ac7..8fc67581cf2 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -1540,6 +1540,36 @@ struct wined3d_timestamp_query
@@ -1552,6 +1552,36 @@ struct wined3d_timestamp_query
void context_alloc_timestamp_query(struct wined3d_context *context, struct wined3d_timestamp_query *query) DECLSPEC_HIDDEN;
void context_free_timestamp_query(struct wined3d_timestamp_query *query) DECLSPEC_HIDDEN;
@@ -899,7 +899,7 @@ index f0777c9bd34..811fb28e2c9 100644
struct wined3d_context
{
const struct wined3d_gl_info *gl_info;
@@ -1555,6 +1585,7 @@ struct wined3d_context
@@ -1567,6 +1597,7 @@ struct wined3d_context
DWORD numDirtyEntries;
DWORD isStateDirty[STATE_HIGHEST / (sizeof(DWORD) * CHAR_BIT) + 1]; /* Bitmap to find out quickly if a state is dirty */
unsigned int dirty_compute_states[STATE_COMPUTE_COUNT / (sizeof(unsigned int) * CHAR_BIT) + 1];
@@ -907,7 +907,7 @@ index f0777c9bd34..811fb28e2c9 100644
struct wined3d_device *device;
struct wined3d_swapchain *swapchain;
@@ -1667,12 +1698,6 @@ struct wined3d_context
@@ -1680,12 +1711,6 @@ struct wined3d_context
GLuint dummy_arbfp_prog;
};
@@ -920,7 +920,7 @@ index f0777c9bd34..811fb28e2c9 100644
typedef void (*APPLYSTATEFUNC)(struct wined3d_context *ctx, const struct wined3d_state *state, DWORD state_id);
struct StateEntry
@@ -2494,7 +2519,7 @@ struct wined3d_stream_state
@@ -2508,7 +2533,7 @@ struct wined3d_stream_state
struct wined3d_state
{
DWORD flags;
@@ -929,7 +929,7 @@ index f0777c9bd34..811fb28e2c9 100644
struct wined3d_vertex_declaration *vertex_declaration;
struct wined3d_stream_output stream_output[MAX_STREAM_OUT];
@@ -2608,7 +2633,6 @@ struct wined3d_device
@@ -2622,7 +2647,6 @@ struct wined3d_device
struct wine_rb_tree samplers;
/* Render Target Support */
@@ -937,7 +937,7 @@ index f0777c9bd34..811fb28e2c9 100644
struct wined3d_rendertarget_view *auto_depth_stencil_view;
/* For rendering to a texture using glCopyTexImage */
@@ -3150,9 +3174,8 @@ struct wined3d_stateblock
@@ -3164,9 +3188,8 @@ struct wined3d_stateblock
void stateblock_init_contained_states(struct wined3d_stateblock *stateblock) DECLSPEC_HIDDEN;
void state_cleanup(struct wined3d_state *state) DECLSPEC_HIDDEN;
@@ -949,7 +949,7 @@ index f0777c9bd34..811fb28e2c9 100644
void state_unbind_resources(struct wined3d_state *state) DECLSPEC_HIDDEN;
enum wined3d_push_constants
@@ -3188,7 +3211,6 @@ struct wined3d_cs
@@ -3202,7 +3225,6 @@ struct wined3d_cs
{
const struct wined3d_cs_ops *ops;
struct wined3d_device *device;

View File

@@ -1,4 +1,4 @@
From 74653b2cabe0b7abbab5682cbd0bf7e2c9b94d06 Mon Sep 17 00:00:00 2001
From 520d1bc8ae2e65db6244cf3b2c5115d1cfcc519e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Tue, 7 Feb 2017 22:37:58 +0100
Subject: wined3d: Map vertex buffers through cs.
@@ -10,7 +10,7 @@ Subject: wined3d: Map vertex buffers through cs.
3 files changed, 76 insertions(+), 44 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 36b07d1a54a..4cbab2a91f8 100644
index 359f0ad4645..38e465b8f04 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -94,6 +94,7 @@ enum wined3d_cs_op
@@ -21,7 +21,7 @@ index 36b07d1a54a..4cbab2a91f8 100644
WINED3D_CS_OP_STOP,
};
@@ -525,6 +526,13 @@ struct wined3d_cs_delete_gl_contexts
@@ -526,6 +527,13 @@ struct wined3d_cs_delete_gl_contexts
struct wined3d_swapchain *swapchain;
};
@@ -35,7 +35,7 @@ index 36b07d1a54a..4cbab2a91f8 100644
static inline BOOL wined3d_cs_process_block(struct wined3d_cs *cs, struct wined3d_cs_block *block);
static void wined3d_cs_mt_submit(struct wined3d_cs *cs);
@@ -2623,6 +2631,70 @@ void wined3d_cs_emit_delete_opengl_contexts(struct wined3d_cs *cs, struct wined3
@@ -2639,6 +2647,70 @@ void wined3d_cs_emit_delete_opengl_contexts(struct wined3d_cs *cs, struct wined3
cs->ops->submit_and_wait(cs);
}
@@ -106,7 +106,7 @@ index 36b07d1a54a..4cbab2a91f8 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_FENCE */ wined3d_cs_exec_fence,
@@ -2682,6 +2754,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2698,6 +2770,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_CREATE_BUFFER_TEXTURE */ wined3d_cs_exec_create_buffer_texture,
/* WINED3D_CS_OP_CREATE_TEXTURE_VIEW */ wined3d_cs_exec_create_texture_view,
/* WINED3D_CS_OP_DELETE_GL_CONTEXTS */ wined3d_cs_exec_delete_gl_contexts,
@@ -115,18 +115,18 @@ index 36b07d1a54a..4cbab2a91f8 100644
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index b990682a921..1bafbcac067 100644
index b392878e2f9..44ac8ccef42 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -2837,7 +2837,6 @@ void CDECL wined3d_device_set_unordered_access_view(struct wined3d_device *devic
wined3d_unordered_access_view_decref(prev);
@@ -2851,7 +2851,6 @@ void CDECL wined3d_device_set_unordered_access_view(struct wined3d_device *devic
wined3d_device_set_pipeline_unordered_access_view(device, WINED3D_PIPELINE_GRAPHICS, idx, uav);
}
-/* Context activation is done by the caller. */
#define copy_and_next(dest, src, size) memcpy(dest, src, size); dest += (size)
static HRESULT process_vertices_strided(const struct wined3d_device *device, DWORD dwDestIndex, DWORD dwCount,
const struct wined3d_stream_info *stream_info, struct wined3d_buffer *dest, DWORD flags,
@@ -3113,14 +3112,8 @@ HRESULT CDECL wined3d_device_process_vertices(struct wined3d_device *device,
@@ -3127,14 +3126,8 @@ HRESULT CDECL wined3d_device_process_vertices(struct wined3d_device *device,
UINT src_start_idx, UINT dst_idx, UINT vertex_count, struct wined3d_buffer *dst_buffer,
const struct wined3d_vertex_declaration *declaration, DWORD flags, DWORD dst_fvf)
{
@@ -141,7 +141,7 @@ index b990682a921..1bafbcac067 100644
TRACE("device %p, src_start_idx %u, dst_idx %u, vertex_count %u, "
"dst_buffer %p, declaration %p, flags %#x, dst_fvf %#x.\n",
@@ -3130,47 +3123,11 @@ HRESULT CDECL wined3d_device_process_vertices(struct wined3d_device *device,
@@ -3144,47 +3137,11 @@ HRESULT CDECL wined3d_device_process_vertices(struct wined3d_device *device,
if (declaration)
FIXME("Output vertex declaration not implemented yet.\n");
@@ -191,10 +191,10 @@ index b990682a921..1bafbcac067 100644
}
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 7035d537604..110fbfde605 100644
index 6063aa7f390..d47aa20d5a4 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3316,6 +3316,8 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
@@ -3355,6 +3355,8 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
struct wined3d_map_desc *map_desc, const struct wined3d_box *box, unsigned int flags) DECLSPEC_HIDDEN;
HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resource,
unsigned int sub_resource_idx) DECLSPEC_HIDDEN;

View File

@@ -1,4 +1,4 @@
From 89cc09a36e085038a253e08566bbc170403d058f Mon Sep 17 00:00:00 2001
From e1eaf7bf2dd1a7bfedad34b222aaa83423781191 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.
@@ -8,10 +8,10 @@ Subject: wined3d: Do not immediately submit stateblock updates.
1 file changed, 58 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index dc1dfad5207..da20da75a36 100644
index 6ea1ef1b089..e108ab0bcbc 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -1000,8 +1000,6 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query
@@ -1021,8 +1021,6 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query
op->opcode = WINED3D_CS_OP_SET_PREDICATION;
op->predicate = predicate;
op->value = value;
@@ -20,7 +20,7 @@ index dc1dfad5207..da20da75a36 100644
}
static UINT wined3d_cs_exec_set_viewport(struct wined3d_cs *cs, const void *data)
@@ -1021,8 +1019,6 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
@@ -1042,8 +1040,6 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
op = cs->ops->require_space(cs, sizeof(*op), 0);
op->opcode = WINED3D_CS_OP_SET_VIEWPORT;
op->viewport = *viewport;
@@ -29,7 +29,7 @@ index dc1dfad5207..da20da75a36 100644
}
static UINT wined3d_cs_exec_set_scissor_rect(struct wined3d_cs *cs, const void *data)
@@ -1042,8 +1038,6 @@ void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
@@ -1063,8 +1059,6 @@ void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
op = cs->ops->require_space(cs, sizeof(*op), 0);
op->opcode = WINED3D_CS_OP_SET_SCISSOR_RECT;
op->rect = *rect;
@@ -38,7 +38,7 @@ index dc1dfad5207..da20da75a36 100644
}
static UINT wined3d_cs_exec_set_rendertarget_view(struct wined3d_cs *cs, const void *data)
@@ -1065,8 +1059,6 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
@@ -1086,8 +1080,6 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
op->opcode = WINED3D_CS_OP_SET_RENDERTARGET_VIEW;
op->view_idx = view_idx;
op->view = view;
@@ -47,7 +47,7 @@ index dc1dfad5207..da20da75a36 100644
}
static UINT wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const void *data)
@@ -1115,8 +1107,6 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3
@@ -1136,8 +1128,6 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3
op = cs->ops->require_space(cs, sizeof(*op), 0);
op->opcode = WINED3D_CS_OP_SET_DEPTH_STENCIL_VIEW;
op->view = view;
@@ -56,7 +56,7 @@ index dc1dfad5207..da20da75a36 100644
}
static UINT wined3d_cs_exec_set_vertex_declaration(struct wined3d_cs *cs, const void *data)
@@ -1136,8 +1126,6 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
@@ -1157,8 +1147,6 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
op = cs->ops->require_space(cs, sizeof(*op), 0);
op->opcode = WINED3D_CS_OP_SET_VERTEX_DECLARATION;
op->declaration = declaration;
@@ -65,7 +65,7 @@ index dc1dfad5207..da20da75a36 100644
}
static UINT wined3d_cs_exec_set_stream_source(struct wined3d_cs *cs, const void *data)
@@ -1173,8 +1161,6 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
@@ -1194,8 +1182,6 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
op->buffer = buffer;
op->offset = offset;
op->stride = stride;
@@ -74,7 +74,7 @@ index dc1dfad5207..da20da75a36 100644
}
static UINT wined3d_cs_exec_set_stream_source_freq(struct wined3d_cs *cs, const void *data)
@@ -1200,8 +1186,6 @@ void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_i
@@ -1221,8 +1207,6 @@ void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_i
op->stream_idx = stream_idx;
op->frequency = frequency;
op->flags = flags;
@@ -83,7 +83,7 @@ index dc1dfad5207..da20da75a36 100644
}
static UINT wined3d_cs_exec_set_stream_output(struct wined3d_cs *cs, const void *data)
@@ -1233,8 +1217,6 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
@@ -1254,8 +1238,6 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
op->stream_idx = stream_idx;
op->buffer = buffer;
op->offset = offset;
@@ -92,7 +92,7 @@ index dc1dfad5207..da20da75a36 100644
}
static UINT wined3d_cs_exec_set_index_buffer(struct wined3d_cs *cs, const void *data)
@@ -1267,8 +1249,6 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
@@ -1288,8 +1270,6 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
op->buffer = buffer;
op->format_id = format_id;
op->offset = offset;
@@ -101,7 +101,7 @@ index dc1dfad5207..da20da75a36 100644
}
static UINT wined3d_cs_exec_set_constant_buffer(struct wined3d_cs *cs, const void *data)
@@ -1298,8 +1278,6 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
@@ -1319,8 +1299,6 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
op->type = type;
op->cb_idx = cb_idx;
op->buffer = buffer;
@@ -110,7 +110,7 @@ index dc1dfad5207..da20da75a36 100644
}
static UINT wined3d_cs_exec_set_texture(struct wined3d_cs *cs, const void *data)
@@ -1391,8 +1369,6 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
@@ -1412,8 +1390,6 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
op->opcode = WINED3D_CS_OP_SET_TEXTURE;
op->stage = stage;
op->texture = texture;
@@ -119,16 +119,7 @@ index dc1dfad5207..da20da75a36 100644
}
static UINT wined3d_cs_exec_set_shader_resource_view(struct wined3d_cs *cs, const void *data)
@@ -1414,8 +1390,6 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, unsigned i
op->opcode = WINED3D_CS_OP_SET_UNORDERED_ACCESS_VIEW;
op->view_idx = view_idx;
op->view = view;
-
- cs->ops->submit(cs);
}
static UINT wined3d_cs_exec_set_unordered_access_view(struct wined3d_cs *cs, const void *data)
@@ -1446,8 +1420,6 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
@@ -1437,8 +1413,6 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
op->type = type;
op->view_idx = view_idx;
op->view = view;
@@ -136,8 +127,17 @@ index dc1dfad5207..da20da75a36 100644
- cs->ops->submit(cs);
}
static UINT wined3d_cs_exec_set_unordered_access_view(struct wined3d_cs *cs, const void *data)
@@ -1469,8 +1443,6 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
op->pipeline = pipeline;
op->view_idx = view_idx;
op->view = view;
-
- cs->ops->submit(cs);
}
static UINT wined3d_cs_exec_set_sampler(struct wined3d_cs *cs, const void *data)
@@ -1470,8 +1442,6 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
@@ -1493,8 +1465,6 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
op->type = type;
op->sampler_idx = sampler_idx;
op->sampler = sampler;
@@ -146,7 +146,7 @@ index dc1dfad5207..da20da75a36 100644
}
static UINT wined3d_cs_exec_set_shader(struct wined3d_cs *cs, const void *data)
@@ -1493,8 +1463,6 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
@@ -1517,8 +1487,6 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
op->opcode = WINED3D_CS_OP_SET_SHADER;
op->type = type;
op->shader = shader;
@@ -155,7 +155,7 @@ index dc1dfad5207..da20da75a36 100644
}
static UINT wined3d_cs_exec_set_rasterizer_state(struct wined3d_cs *cs, const void *data)
@@ -1515,8 +1483,6 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
@@ -1539,8 +1507,6 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
op = cs->ops->require_space(cs, sizeof(*op), 0);
op->opcode = WINED3D_CS_OP_SET_RASTERIZER_STATE;
op->state = rasterizer_state;
@@ -164,7 +164,7 @@ index dc1dfad5207..da20da75a36 100644
}
static UINT wined3d_cs_exec_set_render_state(struct wined3d_cs *cs, const void *data)
@@ -1537,8 +1503,6 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
@@ -1561,8 +1527,6 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
op->opcode = WINED3D_CS_OP_SET_RENDER_STATE;
op->state = state;
op->value = value;
@@ -173,7 +173,7 @@ index dc1dfad5207..da20da75a36 100644
}
static UINT wined3d_cs_exec_set_texture_state(struct wined3d_cs *cs, const void *data)
@@ -1561,8 +1525,6 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
@@ -1585,8 +1549,6 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
op->stage = stage;
op->state = state;
op->value = value;
@@ -182,7 +182,7 @@ index dc1dfad5207..da20da75a36 100644
}
static UINT wined3d_cs_exec_set_sampler_state(struct wined3d_cs *cs, const void *data)
@@ -1585,8 +1547,6 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
@@ -1609,8 +1571,6 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
op->sampler_idx = sampler_idx;
op->state = state;
op->value = value;
@@ -191,7 +191,7 @@ index dc1dfad5207..da20da75a36 100644
}
static UINT wined3d_cs_exec_set_transform(struct wined3d_cs *cs, const void *data)
@@ -1609,8 +1569,6 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
@@ -1633,8 +1593,6 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
op->opcode = WINED3D_CS_OP_SET_TRANSFORM;
op->state = state;
op->matrix = *matrix;
@@ -200,7 +200,7 @@ index dc1dfad5207..da20da75a36 100644
}
static UINT wined3d_cs_exec_set_clip_plane(struct wined3d_cs *cs, const void *data)
@@ -1631,8 +1589,6 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
@@ -1655,8 +1613,6 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
op->opcode = WINED3D_CS_OP_SET_CLIP_PLANE;
op->plane_idx = plane_idx;
op->plane = *plane;
@@ -209,7 +209,7 @@ index dc1dfad5207..da20da75a36 100644
}
static UINT wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *data)
@@ -1716,8 +1672,6 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
@@ -1740,8 +1696,6 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
}
else
op->set = 0;
@@ -218,7 +218,7 @@ index dc1dfad5207..da20da75a36 100644
}
static UINT wined3d_cs_exec_set_material(struct wined3d_cs *cs, const void *data)
@@ -1737,8 +1691,6 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
@@ -1761,8 +1715,6 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
op = cs->ops->require_space(cs, sizeof(*op), 0);
op->opcode = WINED3D_CS_OP_SET_MATERIAL;
op->material = *material;
@@ -227,7 +227,7 @@ index dc1dfad5207..da20da75a36 100644
}
static UINT wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data)
@@ -1761,8 +1713,6 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
@@ -1785,8 +1737,6 @@ 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;
@@ -236,7 +236,7 @@ index dc1dfad5207..da20da75a36 100644
}
static UINT wined3d_cs_exec_destroy_object(struct wined3d_cs *cs, const void *data)
@@ -2021,8 +1971,6 @@ void wined3d_cs_emit_push_constants(struct wined3d_cs *cs, enum wined3d_push_con
@@ -2045,8 +1995,6 @@ void wined3d_cs_emit_push_constants(struct wined3d_cs *cs, enum wined3d_push_con
op->start_idx = start_idx;
op->count = count;
memcpy(op->constants, constants, count * push_constant_info[p].size);
@@ -245,7 +245,7 @@ index dc1dfad5207..da20da75a36 100644
}
static UINT wined3d_cs_exec_set_primitive_type(struct wined3d_cs *cs, const void *data)
@@ -2047,8 +1995,6 @@ void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs, GLenum primitive_
@@ -2071,8 +2019,6 @@ void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs, GLenum primitive_
op = cs->ops->require_space(cs, sizeof(*op), 0);
op->opcode = WINED3D_CS_OP_SET_PRIMITIVE_TYPE;
op->gl_primitive_type = primitive_type;
@@ -254,7 +254,7 @@ index dc1dfad5207..da20da75a36 100644
}
static UINT wined3d_cs_exec_set_light(struct wined3d_cs *cs, const void *data)
@@ -2107,8 +2053,6 @@ void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light
@@ -2131,8 +2077,6 @@ void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light
op = cs->ops->require_space(cs, sizeof(*op), 0);
op->opcode = WINED3D_CS_OP_SET_LIGHT;
op->light = *light;
@@ -263,7 +263,7 @@ index dc1dfad5207..da20da75a36 100644
}
static UINT wined3d_cs_exec_set_light_enable(struct wined3d_cs *cs, const void *data)
@@ -2197,8 +2141,6 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, UINT idx, BOOL enab
@@ -2221,8 +2165,6 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, UINT idx, BOOL enab
op->opcode = WINED3D_CS_OP_SET_LIGHT_ENABLE;
op->idx = idx;
op->enable = enable;

File diff suppressed because it is too large Load Diff