mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
wined3d-CSMT_Main: Make float constant updates consistent with the rest of the code.
This commit is contained in:
parent
16e6b1c3e3
commit
9aefba7af5
@ -1,16 +1,16 @@
|
||||
From e316999cb425711836f63f85a78f13bcc458643e Mon Sep 17 00:00:00 2001
|
||||
From 5d9fe669f53bba48569e58eab46b21da0e0b322d Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Tue, 20 Aug 2013 15:12:26 +0200
|
||||
Subject: wined3d: Send float constant updates through the command stream
|
||||
|
||||
---
|
||||
dlls/wined3d/cs.c | 76 +++++++++++++++++++++++++++++++++++++++---
|
||||
dlls/wined3d/cs.c | 74 +++++++++++++++++++++++++++++++++++++++---
|
||||
dlls/wined3d/device.c | 6 ++--
|
||||
dlls/wined3d/wined3d_private.h | 2 ++
|
||||
3 files changed, 78 insertions(+), 6 deletions(-)
|
||||
3 files changed, 76 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 55cd5d6..ef4341c 100644
|
||||
index 55cd5d6..2668244 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -64,6 +64,8 @@ enum wined3d_cs_op
|
||||
@ -22,21 +22,22 @@ index 55cd5d6..ef4341c 100644
|
||||
WINED3D_CS_OP_STOP,
|
||||
};
|
||||
|
||||
@@ -280,6 +282,13 @@ struct wined3d_cs_stateblock
|
||||
@@ -280,6 +282,14 @@ struct wined3d_cs_stateblock
|
||||
struct wined3d_state state;
|
||||
};
|
||||
|
||||
+struct wined3d_cs_set_consts_f
|
||||
+{
|
||||
+ enum wined3d_cs_op opcode;
|
||||
+ UINT start_register, vector4f_count;
|
||||
+ struct wined3d_vec4 constants;
|
||||
+ unsigned int start_idx;
|
||||
+ unsigned int count;
|
||||
+ struct wined3d_vec4 constants[1];
|
||||
+};
|
||||
+
|
||||
/* FIXME: The list synchronization probably isn't particularly fast. */
|
||||
static void wined3d_cs_list_enqueue(struct wined3d_cs_list *list, struct wined3d_cs_block *block)
|
||||
{
|
||||
@@ -922,11 +931,9 @@ static UINT wined3d_cs_exec_transfer_stateblock(struct wined3d_cs *cs, const voi
|
||||
@@ -922,11 +932,9 @@ static UINT wined3d_cs_exec_transfer_stateblock(struct wined3d_cs *cs, const voi
|
||||
|
||||
memcpy(cs->state.vs_consts_b, op->state.vs_consts_b, sizeof(cs->state.vs_consts_b));
|
||||
memcpy(cs->state.vs_consts_i, op->state.vs_consts_i, sizeof(cs->state.vs_consts_i));
|
||||
@ -48,7 +49,7 @@ index 55cd5d6..ef4341c 100644
|
||||
|
||||
memcpy(cs->state.lights, op->state.lights, sizeof(cs->state.lights));
|
||||
|
||||
@@ -948,11 +955,9 @@ void wined3d_cs_emit_transfer_stateblock(struct wined3d_cs *cs, const struct win
|
||||
@@ -948,11 +956,9 @@ void wined3d_cs_emit_transfer_stateblock(struct wined3d_cs *cs, const struct win
|
||||
|
||||
memcpy(op->state.vs_consts_b, state->vs_consts_b, sizeof(op->state.vs_consts_b));
|
||||
memcpy(op->state.vs_consts_i, state->vs_consts_i, sizeof(op->state.vs_consts_i));
|
||||
@ -60,7 +61,7 @@ index 55cd5d6..ef4341c 100644
|
||||
|
||||
/* FIXME: This is not ideal. CS is still running synchronously, so this is ok.
|
||||
* It will go away soon anyway. */
|
||||
@@ -1032,6 +1037,67 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
@@ -1032,6 +1038,64 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -69,13 +70,12 @@ index 55cd5d6..ef4341c 100644
|
||||
+ const struct wined3d_cs_set_consts_f *op = data;
|
||||
+ struct wined3d_device *device = cs->device;
|
||||
+
|
||||
+ memcpy(cs->state.vs_consts_f + op->start_register, &op->constants,
|
||||
+ sizeof(*cs->state.vs_consts_f) * op->vector4f_count);
|
||||
+ memcpy(&cs->state.vs_consts_f[op->start_idx], op->constants, sizeof(op->constants[0]) * op->count);
|
||||
+
|
||||
+ device->shader_backend->shader_update_float_vertex_constants(device,
|
||||
+ op->start_register, op->vector4f_count);
|
||||
+ op->start_idx, op->count);
|
||||
+
|
||||
+ return sizeof(*op) + sizeof(op->constants) * (op->vector4f_count - 1);
|
||||
+ return sizeof(*op) + sizeof(op->constants[0]) * (op->count - 1);
|
||||
+}
|
||||
+
|
||||
+static UINT wined3d_cs_exec_set_ps_consts_f(struct wined3d_cs *cs, const void *data)
|
||||
@ -83,22 +83,20 @@ index 55cd5d6..ef4341c 100644
|
||||
+ const struct wined3d_cs_set_consts_f *op = data;
|
||||
+ struct wined3d_device *device = cs->device;
|
||||
+
|
||||
+ memcpy(cs->state.ps_consts_f + op->start_register, &op->constants,
|
||||
+ sizeof(*cs->state.ps_consts_f) * op->vector4f_count);
|
||||
+ memcpy(&cs->state.ps_consts_f[op->start_idx], op->constants, sizeof(op->constants[0]) * op->count);
|
||||
+
|
||||
+ device->shader_backend->shader_update_float_pixel_constants(device,
|
||||
+ op->start_register, op->vector4f_count);
|
||||
+ op->start_idx, op->count);
|
||||
+
|
||||
+ return sizeof(*op) + sizeof(op->constants) * (op->vector4f_count - 1);
|
||||
+ return sizeof(*op) + sizeof(op->constants[0]) * (op->count - 1);
|
||||
+}
|
||||
+
|
||||
+void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, UINT start_register,
|
||||
+ const struct wined3d_vec4 *constants, UINT vector4f_count, enum wined3d_shader_type type)
|
||||
+void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, unsigned int start_idx, unsigned int count,
|
||||
+ const struct wined3d_vec4 *constants, enum wined3d_shader_type type)
|
||||
+{
|
||||
+ struct wined3d_cs_set_consts_f *op;
|
||||
+ UINT extra_space = vector4f_count - 1;
|
||||
+
|
||||
+ op = cs->ops->require_space(cs, sizeof(*op) + sizeof(op->constants) * extra_space);
|
||||
+ op = cs->ops->require_space(cs, sizeof(*op) + sizeof(op->constants[0]) * (count - 1));
|
||||
+ switch (type)
|
||||
+ {
|
||||
+ case WINED3D_SHADER_TYPE_PIXEL:
|
||||
@ -118,9 +116,9 @@ index 55cd5d6..ef4341c 100644
|
||||
+ case WINED3D_SHADER_TYPE_COUNT:
|
||||
+ break;
|
||||
+ }
|
||||
+ op->start_register = start_register;
|
||||
+ op->vector4f_count = vector4f_count;
|
||||
+ memcpy(&op->constants, constants, sizeof(*constants) * vector4f_count);
|
||||
+ op->start_idx = start_idx;
|
||||
+ op->count = count;
|
||||
+ memcpy(op->constants, constants, sizeof(op->constants[0]) * count);
|
||||
+
|
||||
+ cs->ops->submit(cs);
|
||||
+}
|
||||
@ -128,7 +126,7 @@ index 55cd5d6..ef4341c 100644
|
||||
static UINT wined3d_cs_exec_set_render_state(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
const struct wined3d_cs_set_render_state *op = data;
|
||||
@@ -1308,6 +1374,8 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -1308,6 +1372,8 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_SET_MATERIAL */ wined3d_cs_exec_set_material,
|
||||
/* WINED3D_CS_OP_RESET_STATE */ wined3d_cs_exec_reset_state,
|
||||
/* WINED3D_CS_OP_STATEBLOCK */ wined3d_cs_exec_transfer_stateblock,
|
||||
@ -138,39 +136,39 @@ index 55cd5d6..ef4341c 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 46cf23a..241b450 100644
|
||||
index 5c10851..0142691 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -2495,7 +2495,8 @@ HRESULT CDECL wined3d_device_set_vs_consts_f(struct wined3d_device *device,
|
||||
@@ -2501,7 +2501,8 @@ HRESULT CDECL wined3d_device_set_vs_consts_f(struct wined3d_device *device,
|
||||
memset(&device->recording->changed.vs_consts_f[start_idx], 1,
|
||||
count * sizeof(*device->recording->changed.vs_consts_f));
|
||||
else
|
||||
- device->shader_backend->shader_update_float_vertex_constants(device, start_idx, count);
|
||||
+ wined3d_cs_emit_set_consts_f(device->cs, start_idx, constants, count,
|
||||
+ wined3d_cs_emit_set_consts_f(device->cs, start_idx, count, constants,
|
||||
+ WINED3D_SHADER_TYPE_VERTEX);
|
||||
|
||||
return WINED3D_OK;
|
||||
}
|
||||
@@ -2723,7 +2724,8 @@ HRESULT CDECL wined3d_device_set_ps_consts_f(struct wined3d_device *device,
|
||||
@@ -2735,7 +2736,8 @@ HRESULT CDECL wined3d_device_set_ps_consts_f(struct wined3d_device *device,
|
||||
memset(&device->recording->changed.ps_consts_f[start_idx], 1,
|
||||
count * sizeof(*device->recording->changed.ps_consts_f));
|
||||
else
|
||||
- device->shader_backend->shader_update_float_pixel_constants(device, start_idx, count);
|
||||
+ wined3d_cs_emit_set_consts_f(device->cs, start_idx, constants, count,
|
||||
+ wined3d_cs_emit_set_consts_f(device->cs, start_idx, count, constants,
|
||||
+ WINED3D_SHADER_TYPE_PIXEL);
|
||||
|
||||
return WINED3D_OK;
|
||||
}
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 1a5f8fc..125fb6d 100644
|
||||
index b167921..796a3d0 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2951,6 +2951,8 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
|
||||
@@ -2949,6 +2949,8 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
|
||||
void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs,
|
||||
struct wined3d_vertex_declaration *declaration) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_viewport *viewport) DECLSPEC_HIDDEN;
|
||||
+void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, UINT start_register, const struct wined3d_vec4 *constants,
|
||||
+ UINT vector4f_count, enum wined3d_shader_type type) DECLSPEC_HIDDEN;
|
||||
+void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
+ unsigned int count, const struct wined3d_vec4 *constants, enum wined3d_shader_type type) DECLSPEC_HIDDEN;
|
||||
|
||||
/* Direct3D terminology with little modifications. We do not have an issued state
|
||||
* because only the driver knows about it, but we have a created state because d3d
|
||||
|
@ -1,4 +1,4 @@
|
||||
From e0ed0ad66e50a6d3da09f93ddf8743d9bf396eef Mon Sep 17 00:00:00 2001
|
||||
From fd2e3ce4d0b4737c9f540bf06c830b01887d6046 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Thu, 4 Apr 2013 11:50:09 +0200
|
||||
Subject: wined3d: Request a glFinish before modifying resources outside the cs
|
||||
@ -51,7 +51,7 @@ index 2ae620c..a50bba4 100644
|
||||
/* Filter redundant WINED3D_MAP_DISCARD maps. The 3DMark2001 multitexture
|
||||
* fill rate test seems to depend on this. When we map a buffer with
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index ef4341c..c4cf1ad 100644
|
||||
index 2668244..aefd308 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -66,6 +66,7 @@ enum wined3d_cs_op
|
||||
@ -62,8 +62,8 @@ index ef4341c..c4cf1ad 100644
|
||||
WINED3D_CS_OP_STOP,
|
||||
};
|
||||
|
||||
@@ -289,6 +290,11 @@ struct wined3d_cs_set_consts_f
|
||||
struct wined3d_vec4 constants;
|
||||
@@ -290,6 +291,11 @@ struct wined3d_cs_set_consts_f
|
||||
struct wined3d_vec4 constants[1];
|
||||
};
|
||||
|
||||
+struct wined3d_cs_finish
|
||||
@ -74,7 +74,7 @@ index ef4341c..c4cf1ad 100644
|
||||
/* FIXME: The list synchronization probably isn't particularly fast. */
|
||||
static void wined3d_cs_list_enqueue(struct wined3d_cs_list *list, struct wined3d_cs_block *block)
|
||||
{
|
||||
@@ -1344,6 +1350,29 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
@@ -1342,6 +1348,29 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -104,7 +104,7 @@ index ef4341c..c4cf1ad 100644
|
||||
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_FENCE */ wined3d_cs_exec_fence,
|
||||
@@ -1376,6 +1405,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -1374,6 +1403,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_STATEBLOCK */ wined3d_cs_exec_transfer_stateblock,
|
||||
/* WINED3D_CS_OP_SET_VS_CONSTS_F */ wined3d_cs_exec_set_vs_consts_f,
|
||||
/* WINED3D_CS_OP_SET_PS_CONSTS_F */ wined3d_cs_exec_set_ps_consts_f,
|
||||
@ -113,10 +113,10 @@ index ef4341c..c4cf1ad 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 681ba4e..c3de90f 100644
|
||||
index 0142691..565b107 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -2862,6 +2862,13 @@ static HRESULT process_vertices_strided(const struct wined3d_device *device, DWO
|
||||
@@ -2897,6 +2897,13 @@ static HRESULT process_vertices_strided(const struct wined3d_device *device, DWO
|
||||
return hr;
|
||||
}
|
||||
|
||||
@ -130,7 +130,7 @@ index 681ba4e..c3de90f 100644
|
||||
wined3d_device_get_transform(device, WINED3D_TS_VIEW, &view_mat);
|
||||
wined3d_device_get_transform(device, WINED3D_TS_PROJECTION, &proj_mat);
|
||||
wined3d_device_get_transform(device, WINED3D_TS_WORLD_MATRIX(0), &world_mat);
|
||||
@@ -3654,6 +3661,13 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
|
||||
@@ -3689,6 +3696,13 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
|
||||
++src_skip_levels;
|
||||
}
|
||||
|
||||
@ -144,7 +144,7 @@ index 681ba4e..c3de90f 100644
|
||||
/* Make sure that the destination texture is loaded. */
|
||||
context = context_acquire(device, NULL);
|
||||
wined3d_texture_load(dst_texture, context, FALSE);
|
||||
@@ -4184,6 +4198,13 @@ HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *devi
|
||||
@@ -4219,6 +4233,13 @@ HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *devi
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@ -158,7 +158,7 @@ index 681ba4e..c3de90f 100644
|
||||
if (blit_op == WINED3D_BLIT_OP_COLOR_FILL)
|
||||
return blitter->color_fill(device, view, rect, color);
|
||||
else
|
||||
@@ -4507,6 +4528,13 @@ void CDECL wined3d_device_evict_managed_resources(struct wined3d_device *device)
|
||||
@@ -4542,6 +4563,13 @@ void CDECL wined3d_device_evict_managed_resources(struct wined3d_device *device)
|
||||
|
||||
TRACE("device %p.\n", device);
|
||||
|
||||
@ -172,7 +172,7 @@ index 681ba4e..c3de90f 100644
|
||||
LIST_FOR_EACH_ENTRY_SAFE(resource, cursor, &device->resources, struct wined3d_resource, resource_list_entry)
|
||||
{
|
||||
TRACE("Checking resource %p for eviction.\n", resource);
|
||||
@@ -4629,6 +4657,13 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
@@ -4664,6 +4692,13 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
TRACE("device %p, swapchain_desc %p, mode %p, callback %p, reset_state %#x.\n",
|
||||
device, swapchain_desc, mode, callback, reset_state);
|
||||
|
||||
@ -187,10 +187,10 @@ index 681ba4e..c3de90f 100644
|
||||
{
|
||||
ERR("Failed to get the first implicit swapchain.\n");
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index c5504da..ba1e795 100644
|
||||
index 2e23a93..a1dd0f6 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -4067,6 +4067,13 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
@@ -4219,6 +4219,13 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
flags &= ~WINED3D_BLT_DO_NOT_WAIT;
|
||||
}
|
||||
|
||||
@ -205,7 +205,7 @@ index c5504da..ba1e795 100644
|
||||
{
|
||||
WARN("D3D not initialized, using fallback.\n");
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index 0c7fca1..aae0b00 100644
|
||||
index 666f8b2..dc2a19f 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -1631,6 +1631,13 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
|
||||
@ -237,13 +237,13 @@ index 0c7fca1..aae0b00 100644
|
||||
context = context_acquire(device, NULL);
|
||||
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 29cf744..51aaefd 100644
|
||||
index 796a3d0..09f421d 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2951,6 +2951,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs,
|
||||
void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_viewport *viewport) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, UINT start_register, const struct wined3d_vec4 *constants,
|
||||
UINT vector4f_count, enum wined3d_shader_type type) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
unsigned int count, const struct wined3d_vec4 *constants, enum wined3d_shader_type type) DECLSPEC_HIDDEN;
|
||||
+void wined3d_cs_emit_glfinish(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
|
||||
|
||||
/* Direct3D terminology with little modifications. We do not have an issued state
|
||||
|
@ -1,4 +1,4 @@
|
||||
From c98269c7fe3179ea29ce581df1ebf93f1acdbe58 Mon Sep 17 00:00:00 2001
|
||||
From 3aef880f23c9c43e315ea57087dac9c38dd09907 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Sun, 7 Apr 2013 17:33:20 +0200
|
||||
Subject: wined3d: Send base vertex index updates through the cs
|
||||
@ -10,7 +10,7 @@ Subject: wined3d: Send base vertex index updates through the cs
|
||||
3 files changed, 50 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 96053d7..4a49206 100644
|
||||
index 12bbcff..bbe0d4f 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -67,6 +67,7 @@ enum wined3d_cs_op
|
||||
@ -21,7 +21,7 @@ index 96053d7..4a49206 100644
|
||||
WINED3D_CS_OP_STOP,
|
||||
};
|
||||
|
||||
@@ -295,6 +296,12 @@ struct wined3d_cs_finish
|
||||
@@ -296,6 +297,12 @@ struct wined3d_cs_finish
|
||||
enum wined3d_cs_op opcode;
|
||||
};
|
||||
|
||||
@ -34,7 +34,7 @@ index 96053d7..4a49206 100644
|
||||
/* FIXME: The list synchronization probably isn't particularly fast. */
|
||||
static void wined3d_cs_list_enqueue(struct wined3d_cs_list *list, struct wined3d_cs_block *block)
|
||||
{
|
||||
@@ -488,6 +495,21 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
@@ -489,6 +496,21 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
static UINT wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
const struct wined3d_cs_draw *op = data;
|
||||
@ -56,7 +56,7 @@ index 96053d7..4a49206 100644
|
||||
|
||||
draw_primitive(cs->device, &cs->state, op->start_idx, op->index_count,
|
||||
op->start_instance, op->instance_count, op->indexed);
|
||||
@@ -932,8 +954,6 @@ static UINT wined3d_cs_exec_transfer_stateblock(struct wined3d_cs *cs, const voi
|
||||
@@ -933,8 +955,6 @@ static UINT wined3d_cs_exec_transfer_stateblock(struct wined3d_cs *cs, const voi
|
||||
/* Don't memcpy the entire struct, we'll remove single items as we add dedicated
|
||||
* ops for setting states */
|
||||
|
||||
@ -65,7 +65,7 @@ index 96053d7..4a49206 100644
|
||||
cs->state.gl_primitive_type = op->state.gl_primitive_type;
|
||||
|
||||
memcpy(cs->state.vs_consts_b, op->state.vs_consts_b, sizeof(cs->state.vs_consts_b));
|
||||
@@ -956,8 +976,6 @@ void wined3d_cs_emit_transfer_stateblock(struct wined3d_cs *cs, const struct win
|
||||
@@ -957,8 +977,6 @@ void wined3d_cs_emit_transfer_stateblock(struct wined3d_cs *cs, const struct win
|
||||
|
||||
/* Don't memcpy the entire struct, we'll remove single items as we add dedicated
|
||||
* ops for setting states */
|
||||
@ -74,7 +74,7 @@ index 96053d7..4a49206 100644
|
||||
op->state.gl_primitive_type = state->gl_primitive_type;
|
||||
|
||||
memcpy(op->state.vs_consts_b, state->vs_consts_b, sizeof(op->state.vs_consts_b));
|
||||
@@ -1374,6 +1392,28 @@ void wined3d_cs_emit_glfinish(struct wined3d_cs *cs)
|
||||
@@ -1372,6 +1390,28 @@ void wined3d_cs_emit_glfinish(struct wined3d_cs *cs)
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -103,7 +103,7 @@ index 96053d7..4a49206 100644
|
||||
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_FENCE */ wined3d_cs_exec_fence,
|
||||
@@ -1407,6 +1447,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -1405,6 +1445,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_SET_VS_CONSTS_F */ wined3d_cs_exec_set_vs_consts_f,
|
||||
/* WINED3D_CS_OP_SET_PS_CONSTS_F */ wined3d_cs_exec_set_ps_consts_f,
|
||||
/* WINED3D_CS_OP_GLFINISH */ wined3d_cs_exec_glfinish,
|
||||
@ -112,10 +112,10 @@ index 96053d7..4a49206 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 15af27f..8a7028b 100644
|
||||
index 10599bf..7e83e7c 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -1947,6 +1947,9 @@ void CDECL wined3d_device_set_base_vertex_index(struct wined3d_device *device, I
|
||||
@@ -1970,6 +1970,9 @@ void CDECL wined3d_device_set_base_vertex_index(struct wined3d_device *device, I
|
||||
TRACE("device %p, base_index %d.\n", device, base_index);
|
||||
|
||||
device->update_state->base_vertex_index = base_index;
|
||||
@ -125,7 +125,7 @@ index 15af27f..8a7028b 100644
|
||||
}
|
||||
|
||||
INT CDECL wined3d_device_get_base_vertex_index(const struct wined3d_device *device)
|
||||
@@ -3462,12 +3465,6 @@ HRESULT CDECL wined3d_device_draw_primitive(struct wined3d_device *device, UINT
|
||||
@@ -3497,12 +3500,6 @@ HRESULT CDECL wined3d_device_draw_primitive(struct wined3d_device *device, UINT
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@ -138,7 +138,7 @@ index 15af27f..8a7028b 100644
|
||||
wined3d_cs_emit_transfer_stateblock(device->cs, &device->state);
|
||||
wined3d_cs_emit_draw(device->cs, start_vertex, vertex_count, 0, 0, FALSE);
|
||||
|
||||
@@ -3485,8 +3482,6 @@ void CDECL wined3d_device_draw_primitive_instanced(struct wined3d_device *device
|
||||
@@ -3520,8 +3517,6 @@ void CDECL wined3d_device_draw_primitive_instanced(struct wined3d_device *device
|
||||
|
||||
HRESULT CDECL wined3d_device_draw_indexed_primitive(struct wined3d_device *device, UINT start_idx, UINT index_count)
|
||||
{
|
||||
@ -147,7 +147,7 @@ index 15af27f..8a7028b 100644
|
||||
TRACE("device %p, start_idx %u, index_count %u.\n", device, start_idx, index_count);
|
||||
|
||||
if (!device->state.index_buffer)
|
||||
@@ -3505,12 +3500,6 @@ HRESULT CDECL wined3d_device_draw_indexed_primitive(struct wined3d_device *devic
|
||||
@@ -3540,12 +3535,6 @@ HRESULT CDECL wined3d_device_draw_indexed_primitive(struct wined3d_device *devic
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@ -161,12 +161,12 @@ index 15af27f..8a7028b 100644
|
||||
wined3d_cs_emit_transfer_stateblock(device->cs, &device->state);
|
||||
wined3d_cs_emit_draw(device->cs, start_idx, index_count, 0, 0, TRUE);
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index ac5d5e6..baf43d0 100644
|
||||
index 55b8ad4..08fd9a8 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2950,6 +2950,8 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
|
||||
void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, UINT start_register, const struct wined3d_vec4 *constants,
|
||||
UINT vector4f_count, enum wined3d_shader_type type) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
unsigned int count, const struct wined3d_vec4 *constants, enum wined3d_shader_type type) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_glfinish(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
|
||||
+void wined3d_cs_emit_set_base_vertex_index(struct wined3d_cs *cs,
|
||||
+ UINT base_vertex_index) DECLSPEC_HIDDEN;
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 1be883772a9bdd7a69891a8accacd2c03cf0c062 Mon Sep 17 00:00:00 2001
|
||||
From 60240619668343b3c9e6c7aac3b3f053a0d3aa5b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Tue, 9 Apr 2013 21:50:30 +0200
|
||||
Subject: wined3d: Send bool constant updates through the command stream
|
||||
@ -10,7 +10,7 @@ Subject: wined3d: Send bool constant updates through the command stream
|
||||
3 files changed, 76 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index a409d48..675e81e 100644
|
||||
index 4f4f21b..4c9e11e 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -65,7 +65,9 @@ enum wined3d_cs_op
|
||||
@ -23,8 +23,8 @@ index a409d48..675e81e 100644
|
||||
WINED3D_CS_OP_GLFINISH,
|
||||
WINED3D_CS_OP_SET_BASE_VERTEX_INDEX,
|
||||
WINED3D_CS_OP_SET_PRIMITIVE_TYPE,
|
||||
@@ -292,6 +294,14 @@ struct wined3d_cs_set_consts_f
|
||||
struct wined3d_vec4 constants;
|
||||
@@ -293,6 +295,14 @@ struct wined3d_cs_set_consts_f
|
||||
struct wined3d_vec4 constants[1];
|
||||
};
|
||||
|
||||
+struct wined3d_cs_set_consts_b
|
||||
@ -38,7 +38,7 @@ index a409d48..675e81e 100644
|
||||
struct wined3d_cs_finish
|
||||
{
|
||||
enum wined3d_cs_op opcode;
|
||||
@@ -960,10 +970,8 @@ static UINT wined3d_cs_exec_transfer_stateblock(struct wined3d_cs *cs, const voi
|
||||
@@ -961,10 +971,8 @@ static UINT wined3d_cs_exec_transfer_stateblock(struct wined3d_cs *cs, const voi
|
||||
|
||||
/* Don't memcpy the entire struct, we'll remove single items as we add dedicated
|
||||
* ops for setting states */
|
||||
@ -49,7 +49,7 @@ index a409d48..675e81e 100644
|
||||
memcpy(cs->state.ps_consts_i, op->state.ps_consts_i, sizeof(cs->state.ps_consts_i));
|
||||
|
||||
memcpy(cs->state.lights, op->state.lights, sizeof(cs->state.lights));
|
||||
@@ -980,10 +988,8 @@ void wined3d_cs_emit_transfer_stateblock(struct wined3d_cs *cs, const struct win
|
||||
@@ -981,10 +989,8 @@ void wined3d_cs_emit_transfer_stateblock(struct wined3d_cs *cs, const struct win
|
||||
|
||||
/* Don't memcpy the entire struct, we'll remove single items as we add dedicated
|
||||
* ops for setting states */
|
||||
@ -60,7 +60,7 @@ index a409d48..675e81e 100644
|
||||
memcpy(op->state.ps_consts_i, state->ps_consts_i, sizeof(op->state.ps_consts_i));
|
||||
|
||||
/* FIXME: This is not ideal. CS is still running synchronously, so this is ok.
|
||||
@@ -1145,6 +1151,62 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
|
||||
@@ -1143,6 +1149,62 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
|
||||
op->value = value;
|
||||
|
||||
cs->ops->submit(cs);
|
||||
@ -123,7 +123,7 @@ index a409d48..675e81e 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_texture_state(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1473,7 +1535,9 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -1471,7 +1533,9 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_RESET_STATE */ wined3d_cs_exec_reset_state,
|
||||
/* WINED3D_CS_OP_STATEBLOCK */ wined3d_cs_exec_transfer_stateblock,
|
||||
/* WINED3D_CS_OP_SET_VS_CONSTS_F */ wined3d_cs_exec_set_vs_consts_f,
|
||||
@ -134,7 +134,7 @@ index a409d48..675e81e 100644
|
||||
/* WINED3D_CS_OP_SET_BASE_VERTEX_INDEX */ wined3d_cs_exec_set_base_vertex_index,
|
||||
/* WINED3D_CS_OP_SET_PRIMITIVE_TYPE */ wined3d_cs_exec_set_primitive_type,
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 1dde384..3c9c737 100644
|
||||
index 799d235..dfb4ceb 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -2353,7 +2353,7 @@ struct wined3d_sampler * CDECL wined3d_device_get_vs_sampler(const struct wined3
|
||||
@ -167,7 +167,7 @@ index 1dde384..3c9c737 100644
|
||||
|
||||
return WINED3D_OK;
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index d490198..69a7dac 100644
|
||||
index 834a551..4fd446e 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2369,6 +2369,7 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
|
||||
@ -180,8 +180,8 @@ index d490198..69a7dac 100644
|
||||
{
|
||||
@@ -2949,6 +2950,8 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs,
|
||||
void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_viewport *viewport) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, UINT start_register, const struct wined3d_vec4 *constants,
|
||||
UINT vector4f_count, enum wined3d_shader_type type) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
unsigned int count, const struct wined3d_vec4 *constants, enum wined3d_shader_type type) DECLSPEC_HIDDEN;
|
||||
+void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
+ unsigned int count, const BOOL *constants, enum wined3d_shader_type type) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_glfinish(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 609309679395d581e84f6e12a796f1e0e83947bc Mon Sep 17 00:00:00 2001
|
||||
From 707777525757c44e81b04ef97cf88015a2a7fa7d Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Wed, 10 Apr 2013 14:20:47 +0200
|
||||
Subject: wined3d: Send int constant updates through the command stream
|
||||
@ -10,7 +10,7 @@ Subject: wined3d: Send int constant updates through the command stream
|
||||
3 files changed, 74 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 675e81e..b4b6bb9 100644
|
||||
index 4c9e11e..03bed96 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -66,8 +66,10 @@ enum wined3d_cs_op
|
||||
@ -24,7 +24,7 @@ index 675e81e..b4b6bb9 100644
|
||||
WINED3D_CS_OP_GLFINISH,
|
||||
WINED3D_CS_OP_SET_BASE_VERTEX_INDEX,
|
||||
WINED3D_CS_OP_SET_PRIMITIVE_TYPE,
|
||||
@@ -302,6 +304,14 @@ struct wined3d_cs_set_consts_b
|
||||
@@ -303,6 +305,14 @@ struct wined3d_cs_set_consts_b
|
||||
BOOL constants[1];
|
||||
};
|
||||
|
||||
@ -39,7 +39,7 @@ index 675e81e..b4b6bb9 100644
|
||||
struct wined3d_cs_finish
|
||||
{
|
||||
enum wined3d_cs_op opcode;
|
||||
@@ -970,9 +980,6 @@ static UINT wined3d_cs_exec_transfer_stateblock(struct wined3d_cs *cs, const voi
|
||||
@@ -971,9 +981,6 @@ static UINT wined3d_cs_exec_transfer_stateblock(struct wined3d_cs *cs, const voi
|
||||
|
||||
/* Don't memcpy the entire struct, we'll remove single items as we add dedicated
|
||||
* ops for setting states */
|
||||
@ -49,7 +49,7 @@ index 675e81e..b4b6bb9 100644
|
||||
|
||||
memcpy(cs->state.lights, op->state.lights, sizeof(cs->state.lights));
|
||||
|
||||
@@ -988,9 +995,6 @@ void wined3d_cs_emit_transfer_stateblock(struct wined3d_cs *cs, const struct win
|
||||
@@ -989,9 +996,6 @@ void wined3d_cs_emit_transfer_stateblock(struct wined3d_cs *cs, const struct win
|
||||
|
||||
/* Don't memcpy the entire struct, we'll remove single items as we add dedicated
|
||||
* ops for setting states */
|
||||
@ -59,7 +59,7 @@ index 675e81e..b4b6bb9 100644
|
||||
|
||||
/* FIXME: This is not ideal. CS is still running synchronously, so this is ok.
|
||||
* It will go away soon anyway. */
|
||||
@@ -1209,6 +1213,62 @@ void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
@@ -1207,6 +1211,62 @@ void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -122,7 +122,7 @@ index 675e81e..b4b6bb9 100644
|
||||
static UINT wined3d_cs_exec_set_texture_state(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
const struct wined3d_cs_set_texture_state *op = data;
|
||||
@@ -1536,8 +1596,10 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -1534,8 +1594,10 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_STATEBLOCK */ wined3d_cs_exec_transfer_stateblock,
|
||||
/* WINED3D_CS_OP_SET_VS_CONSTS_F */ wined3d_cs_exec_set_vs_consts_f,
|
||||
/* WINED3D_CS_OP_SET_VS_CONSTS_B */ wined3d_cs_exec_set_vs_consts_b,
|
||||
@ -134,7 +134,7 @@ index 675e81e..b4b6bb9 100644
|
||||
/* WINED3D_CS_OP_SET_BASE_VERTEX_INDEX */ wined3d_cs_exec_set_base_vertex_index,
|
||||
/* WINED3D_CS_OP_SET_PRIMITIVE_TYPE */ wined3d_cs_exec_set_primitive_type,
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 3c9c737..0b07ad5 100644
|
||||
index dfb4ceb..c9828b1 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -2440,7 +2440,8 @@ HRESULT CDECL wined3d_device_set_vs_consts_i(struct wined3d_device *device,
|
||||
@ -158,11 +158,11 @@ index 3c9c737..0b07ad5 100644
|
||||
|
||||
return WINED3D_OK;
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 69a7dac..81d4226 100644
|
||||
index 4fd446e..2a31939 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2952,6 +2952,8 @@ void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, UINT start_register, co
|
||||
UINT vector4f_count, enum wined3d_shader_type type) DECLSPEC_HIDDEN;
|
||||
@@ -2952,6 +2952,8 @@ void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
unsigned int count, const struct wined3d_vec4 *constants, enum wined3d_shader_type type) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
unsigned int count, const BOOL *constants, enum wined3d_shader_type type) DECLSPEC_HIDDEN;
|
||||
+void wined3d_cs_emit_set_consts_i(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 4537d2dac1f5396dd8455ff63ae2aa8747c247f3 Mon Sep 17 00:00:00 2001
|
||||
From 9277f0a72356d1f9bfa2849fdf597ae7abf39bc8 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Thu, 4 Jul 2013 23:33:14 +0200
|
||||
Subject: wined3d: Replace the linked lists with a ringbuffer
|
||||
@ -9,7 +9,7 @@ Subject: wined3d: Replace the linked lists with a ringbuffer
|
||||
2 files changed, 161 insertions(+), 222 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 7e504ab..42cee7c 100644
|
||||
index e109406..7c032dc 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -22,20 +22,10 @@
|
||||
@ -35,7 +35,7 @@ index 7e504ab..42cee7c 100644
|
||||
WINED3D_CS_OP_FENCE,
|
||||
WINED3D_CS_OP_PRESENT,
|
||||
WINED3D_CS_OP_CLEAR,
|
||||
@@ -381,99 +371,30 @@ struct wined3d_cs_texture_unmap
|
||||
@@ -382,99 +372,30 @@ struct wined3d_cs_texture_unmap
|
||||
unsigned int sub_resource_idx;
|
||||
};
|
||||
|
||||
@ -149,7 +149,7 @@ index 7e504ab..42cee7c 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_fence(struct wined3d_cs *cs, const void *data)
|
||||
@@ -494,14 +415,14 @@ static void wined3d_cs_emit_fence(struct wined3d_cs *cs, BOOL *signalled)
|
||||
@@ -495,14 +416,14 @@ static void wined3d_cs_emit_fence(struct wined3d_cs *cs, BOOL *signalled)
|
||||
op = cs->ops->require_space(cs, sizeof(*op));
|
||||
op->opcode = WINED3D_CS_OP_FENCE;
|
||||
op->signalled = signalled;
|
||||
@ -166,7 +166,7 @@ index 7e504ab..42cee7c 100644
|
||||
|
||||
/* A busy wait should be fine, we're not supposed to have to wait very
|
||||
* long. */
|
||||
@@ -540,7 +461,7 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
|
||||
@@ -541,7 +462,7 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
|
||||
|
||||
pending = InterlockedIncrement(&cs->pending_presents);
|
||||
|
||||
@ -175,7 +175,7 @@ index 7e504ab..42cee7c 100644
|
||||
|
||||
while (pending > 1)
|
||||
pending = InterlockedCompareExchange(&cs->pending_presents, 0, 0);
|
||||
@@ -566,8 +487,8 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
@@ -567,8 +488,8 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil)
|
||||
{
|
||||
struct wined3d_cs_clear *op;
|
||||
@ -186,7 +186,7 @@ index 7e504ab..42cee7c 100644
|
||||
op->opcode = WINED3D_CS_OP_CLEAR;
|
||||
op->flags = flags;
|
||||
op->color = *color;
|
||||
@@ -576,7 +497,7 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
@@ -577,7 +498,7 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
op->rect_count = rect_count;
|
||||
memcpy(op->rects, rects, sizeof(*rects) * rect_count);
|
||||
|
||||
@ -195,7 +195,7 @@ index 7e504ab..42cee7c 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
|
||||
@@ -617,7 +538,7 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, UINT start_idx, UINT index_coun
|
||||
@@ -618,7 +539,7 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, UINT start_idx, UINT index_coun
|
||||
op->instance_count = instance_count;
|
||||
op->indexed = indexed;
|
||||
|
||||
@ -204,7 +204,7 @@ index 7e504ab..42cee7c 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_predication(struct wined3d_cs *cs, const void *data)
|
||||
@@ -639,7 +560,7 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query
|
||||
@@ -640,7 +561,7 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query
|
||||
op->predicate = predicate;
|
||||
op->value = value;
|
||||
|
||||
@ -213,7 +213,7 @@ index 7e504ab..42cee7c 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_viewport(struct wined3d_cs *cs, const void *data)
|
||||
@@ -660,7 +581,7 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
|
||||
@@ -661,7 +582,7 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
|
||||
op->opcode = WINED3D_CS_OP_SET_VIEWPORT;
|
||||
op->viewport = *viewport;
|
||||
|
||||
@ -222,7 +222,7 @@ index 7e504ab..42cee7c 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_scissor_rect(struct wined3d_cs *cs, const void *data)
|
||||
@@ -681,7 +602,7 @@ void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
|
||||
@@ -682,7 +603,7 @@ void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
|
||||
op->opcode = WINED3D_CS_OP_SET_SCISSOR_RECT;
|
||||
op->rect = *rect;
|
||||
|
||||
@ -231,7 +231,7 @@ index 7e504ab..42cee7c 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_rendertarget_view(struct wined3d_cs *cs, const void *data)
|
||||
@@ -704,7 +625,7 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
|
||||
@@ -705,7 +626,7 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
|
||||
op->view_idx = view_idx;
|
||||
op->view = view;
|
||||
|
||||
@ -240,7 +240,7 @@ index 7e504ab..42cee7c 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const void *data)
|
||||
@@ -758,7 +679,7 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3
|
||||
@@ -759,7 +680,7 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3
|
||||
op->opcode = WINED3D_CS_OP_SET_DEPTH_STENCIL_VIEW;
|
||||
op->view = view;
|
||||
|
||||
@ -249,7 +249,7 @@ index 7e504ab..42cee7c 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_vertex_declaration(struct wined3d_cs *cs, const void *data)
|
||||
@@ -779,7 +700,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
|
||||
@@ -780,7 +701,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
|
||||
op->opcode = WINED3D_CS_OP_SET_VERTEX_DECLARATION;
|
||||
op->declaration = declaration;
|
||||
|
||||
@ -258,7 +258,7 @@ index 7e504ab..42cee7c 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_stream_source(struct wined3d_cs *cs, const void *data)
|
||||
@@ -816,7 +737,7 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -817,7 +738,7 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
|
||||
op->offset = offset;
|
||||
op->stride = stride;
|
||||
|
||||
@ -267,7 +267,7 @@ index 7e504ab..42cee7c 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_stream_source_freq(struct wined3d_cs *cs, const void *data)
|
||||
@@ -843,7 +764,7 @@ void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_i
|
||||
@@ -844,7 +765,7 @@ void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_i
|
||||
op->frequency = frequency;
|
||||
op->flags = flags;
|
||||
|
||||
@ -276,7 +276,7 @@ index 7e504ab..42cee7c 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_stream_output(struct wined3d_cs *cs, const void *data)
|
||||
@@ -876,7 +797,7 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -877,7 +798,7 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
|
||||
op->buffer = buffer;
|
||||
op->offset = offset;
|
||||
|
||||
@ -285,7 +285,7 @@ index 7e504ab..42cee7c 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_index_buffer(struct wined3d_cs *cs, const void *data)
|
||||
@@ -908,7 +829,7 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
|
||||
@@ -909,7 +830,7 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
|
||||
op->buffer = buffer;
|
||||
op->format_id = format_id;
|
||||
|
||||
@ -294,7 +294,7 @@ index 7e504ab..42cee7c 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_constant_buffer(struct wined3d_cs *cs, const void *data)
|
||||
@@ -939,7 +860,7 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
|
||||
@@ -940,7 +861,7 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
|
||||
op->cb_idx = cb_idx;
|
||||
op->buffer = buffer;
|
||||
|
||||
@ -303,7 +303,7 @@ index 7e504ab..42cee7c 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_texture(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1031,7 +952,7 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
|
||||
@@ -1032,7 +953,7 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
|
||||
op->opcode = WINED3D_CS_OP_SET_TEXTURE;
|
||||
op->stage = stage;
|
||||
op->texture = texture;
|
||||
@ -312,7 +312,7 @@ index 7e504ab..42cee7c 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_shader_resource_view(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1055,7 +976,7 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
|
||||
@@ -1056,7 +977,7 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
|
||||
op->view_idx = view_idx;
|
||||
op->view = view;
|
||||
|
||||
@ -321,7 +321,7 @@ index 7e504ab..42cee7c 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_sampler(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1079,7 +1000,7 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
@@ -1080,7 +1001,7 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
op->sampler_idx = sampler_idx;
|
||||
op->sampler = sampler;
|
||||
|
||||
@ -330,7 +330,7 @@ index 7e504ab..42cee7c 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_shader(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1102,7 +1023,7 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
@@ -1103,7 +1024,7 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
op->type = type;
|
||||
op->shader = shader;
|
||||
|
||||
@ -339,27 +339,27 @@ index 7e504ab..42cee7c 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_vs_consts_f(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1138,8 +1059,9 @@ void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, UINT start_register,
|
||||
@@ -1136,8 +1057,9 @@ void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
const struct wined3d_vec4 *constants, enum wined3d_shader_type type)
|
||||
{
|
||||
struct wined3d_cs_set_consts_f *op;
|
||||
UINT extra_space = vector4f_count - 1;
|
||||
+ size_t size = sizeof(*op) + sizeof(op->constants) * extra_space;
|
||||
+ size_t size = sizeof(*op) + sizeof(op->constants[0]) * (count - 1);
|
||||
|
||||
- op = cs->ops->require_space(cs, sizeof(*op) + sizeof(op->constants) * extra_space);
|
||||
- op = cs->ops->require_space(cs, sizeof(*op) + sizeof(op->constants[0]) * (count - 1));
|
||||
+ op = cs->ops->require_space(cs, size);
|
||||
switch (type)
|
||||
{
|
||||
case WINED3D_SHADER_TYPE_PIXEL:
|
||||
@@ -1163,7 +1085,7 @@ void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, UINT start_register,
|
||||
op->vector4f_count = vector4f_count;
|
||||
memcpy(&op->constants, constants, sizeof(*constants) * vector4f_count);
|
||||
@@ -1161,7 +1083,7 @@ void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
op->count = count;
|
||||
memcpy(op->constants, constants, sizeof(op->constants[0]) * count);
|
||||
|
||||
- cs->ops->submit(cs);
|
||||
+ cs->ops->submit(cs, size);
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_render_state(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1185,8 +1107,8 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
|
||||
@@ -1183,8 +1105,8 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
|
||||
op->state = state;
|
||||
op->value = value;
|
||||
|
||||
@ -370,7 +370,7 @@ index 7e504ab..42cee7c 100644
|
||||
|
||||
static UINT wined3d_cs_exec_set_vs_consts_b(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
@@ -1216,8 +1138,9 @@ void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
@@ -1214,8 +1136,9 @@ void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
unsigned int count, const BOOL *constants, enum wined3d_shader_type type)
|
||||
{
|
||||
struct wined3d_cs_set_consts_b *op;
|
||||
@ -381,7 +381,7 @@ index 7e504ab..42cee7c 100644
|
||||
switch (type)
|
||||
{
|
||||
case WINED3D_SHADER_TYPE_PIXEL:
|
||||
@@ -1241,7 +1164,7 @@ void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
@@ -1239,7 +1162,7 @@ void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
op->count = count;
|
||||
memcpy(op->constants, constants, sizeof(op->constants[0]) * count);
|
||||
|
||||
@ -390,7 +390,7 @@ index 7e504ab..42cee7c 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_vs_consts_i(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1272,8 +1195,9 @@ void wined3d_cs_emit_set_consts_i(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
@@ -1270,8 +1193,9 @@ void wined3d_cs_emit_set_consts_i(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
const struct wined3d_ivec4 *constants, enum wined3d_shader_type type)
|
||||
{
|
||||
struct wined3d_cs_set_consts_i *op;
|
||||
@ -401,7 +401,7 @@ index 7e504ab..42cee7c 100644
|
||||
switch (type)
|
||||
{
|
||||
case WINED3D_SHADER_TYPE_PIXEL:
|
||||
@@ -1297,7 +1221,7 @@ void wined3d_cs_emit_set_consts_i(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
@@ -1295,7 +1219,7 @@ void wined3d_cs_emit_set_consts_i(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
op->count = count;
|
||||
memcpy(op->constants, constants, sizeof(op->constants[0]) * count);
|
||||
|
||||
@ -410,7 +410,7 @@ index 7e504ab..42cee7c 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_texture_state(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1321,7 +1245,7 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
|
||||
@@ -1319,7 +1243,7 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
|
||||
op->state = state;
|
||||
op->value = value;
|
||||
|
||||
@ -419,7 +419,7 @@ index 7e504ab..42cee7c 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_sampler_state(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1345,7 +1269,7 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
|
||||
@@ -1343,7 +1267,7 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
|
||||
op->state = state;
|
||||
op->value = value;
|
||||
|
||||
@ -428,7 +428,7 @@ index 7e504ab..42cee7c 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_transform(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1369,7 +1293,7 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
|
||||
@@ -1367,7 +1291,7 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
|
||||
op->state = state;
|
||||
op->matrix = *matrix;
|
||||
|
||||
@ -437,7 +437,7 @@ index 7e504ab..42cee7c 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_clip_plane(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1391,7 +1315,7 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
|
||||
@@ -1389,7 +1313,7 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
|
||||
op->plane_idx = plane_idx;
|
||||
op->plane = *plane;
|
||||
|
||||
@ -446,7 +446,7 @@ index 7e504ab..42cee7c 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1476,7 +1400,7 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
|
||||
@@ -1474,7 +1398,7 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
|
||||
else
|
||||
op->set = 0;
|
||||
|
||||
@ -455,7 +455,7 @@ index 7e504ab..42cee7c 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_material(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1497,7 +1421,7 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
|
||||
@@ -1495,7 +1419,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;
|
||||
|
||||
@ -464,7 +464,7 @@ index 7e504ab..42cee7c 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1521,7 +1445,7 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
@@ -1519,7 +1443,7 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
op = cs->ops->require_space(cs, sizeof(*op));
|
||||
op->opcode = WINED3D_CS_OP_RESET_STATE;
|
||||
|
||||
@ -473,7 +473,7 @@ index 7e504ab..42cee7c 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_glfinish(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1547,7 +1471,7 @@ void wined3d_cs_emit_glfinish(struct wined3d_cs *cs)
|
||||
@@ -1545,7 +1469,7 @@ void wined3d_cs_emit_glfinish(struct wined3d_cs *cs)
|
||||
op = cs->ops->require_space(cs, sizeof(*op));
|
||||
op->opcode = WINED3D_CS_OP_GLFINISH;
|
||||
|
||||
@ -482,7 +482,7 @@ index 7e504ab..42cee7c 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_base_vertex_index(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1569,7 +1493,7 @@ void wined3d_cs_emit_set_base_vertex_index(struct wined3d_cs *cs,
|
||||
@@ -1567,7 +1491,7 @@ void wined3d_cs_emit_set_base_vertex_index(struct wined3d_cs *cs,
|
||||
op->opcode = WINED3D_CS_OP_SET_BASE_VERTEX_INDEX;
|
||||
op->base_vertex_index = base_vertex_index;
|
||||
|
||||
@ -491,7 +491,7 @@ index 7e504ab..42cee7c 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_primitive_type(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1595,7 +1519,7 @@ void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs, GLenum primitive_
|
||||
@@ -1593,7 +1517,7 @@ void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs, GLenum primitive_
|
||||
op->opcode = WINED3D_CS_OP_SET_PRIMITIVE_TYPE;
|
||||
op->gl_primitive_type = primitive_type;
|
||||
|
||||
@ -500,7 +500,7 @@ index 7e504ab..42cee7c 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_light(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1652,7 +1576,7 @@ void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light
|
||||
@@ -1650,7 +1574,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;
|
||||
|
||||
@ -509,7 +509,7 @@ index 7e504ab..42cee7c 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_light_enable(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1741,7 +1665,7 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, UINT idx, BOOL enab
|
||||
@@ -1739,7 +1663,7 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, UINT idx, BOOL enab
|
||||
op->idx = idx;
|
||||
op->enable = enable;
|
||||
|
||||
@ -518,7 +518,7 @@ index 7e504ab..42cee7c 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_blt(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1773,7 +1697,7 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
|
||||
@@ -1771,7 +1695,7 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
|
||||
if (fx)
|
||||
op->fx = *fx;
|
||||
|
||||
@ -527,7 +527,7 @@ index 7e504ab..42cee7c 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_clear_rtv(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1806,7 +1730,7 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
|
||||
@@ -1804,7 +1728,7 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
|
||||
op->stencil = stencil;
|
||||
op->blitter = blitter;
|
||||
|
||||
@ -536,7 +536,7 @@ index 7e504ab..42cee7c 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_texture_map(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1831,12 +1755,14 @@ void *wined3d_cs_emit_texture_map(struct wined3d_cs *cs, struct wined3d_texture
|
||||
@@ -1829,12 +1753,14 @@ void *wined3d_cs_emit_texture_map(struct wined3d_cs *cs, struct wined3d_texture
|
||||
op->flags = flags;
|
||||
op->mem = &ret;
|
||||
|
||||
@ -552,7 +552,7 @@ index 7e504ab..42cee7c 100644
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -1859,11 +1785,13 @@ void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture
|
||||
@@ -1857,11 +1783,13 @@ void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture
|
||||
op->texture = texture;
|
||||
op->sub_resource_idx = sub_resource_idx;
|
||||
|
||||
@ -567,7 +567,7 @@ index 7e504ab..42cee7c 100644
|
||||
/* WINED3D_CS_OP_FENCE */ wined3d_cs_exec_fence,
|
||||
/* WINED3D_CS_OP_PRESENT */ wined3d_cs_exec_present,
|
||||
/* WINED3D_CS_OP_CLEAR */ wined3d_cs_exec_clear,
|
||||
@@ -1908,42 +1836,59 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -1906,42 +1834,59 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_TEXTURE_UNMAP */ wined3d_cs_exec_texture_unmap,
|
||||
};
|
||||
|
||||
@ -650,7 +650,7 @@ index 7e504ab..42cee7c 100644
|
||||
};
|
||||
|
||||
/* FIXME: wined3d_device_uninit_3d() should either flush and wait, or be an
|
||||
@@ -1955,9 +1900,38 @@ static void wined3d_cs_emit_stop(struct wined3d_cs *cs)
|
||||
@@ -1953,9 +1898,38 @@ static void wined3d_cs_emit_stop(struct wined3d_cs *cs)
|
||||
op = wined3d_cs_mt_require_space(cs, sizeof(*op));
|
||||
op->opcode = WINED3D_CS_OP_STOP;
|
||||
|
||||
@ -690,7 +690,7 @@ index 7e504ab..42cee7c 100644
|
||||
void wined3d_cs_switch_onscreen_ds(struct wined3d_cs *cs,
|
||||
struct wined3d_context *context, struct wined3d_surface *depth_stencil)
|
||||
{
|
||||
@@ -1981,31 +1955,32 @@ void wined3d_cs_switch_onscreen_ds(struct wined3d_cs *cs,
|
||||
@@ -1979,31 +1953,32 @@ void wined3d_cs_switch_onscreen_ds(struct wined3d_cs *cs,
|
||||
static DWORD WINAPI wined3d_cs_run(void *thread_param)
|
||||
{
|
||||
struct wined3d_cs *cs = thread_param;
|
||||
@ -737,7 +737,7 @@ index 7e504ab..42cee7c 100644
|
||||
}
|
||||
|
||||
done:
|
||||
@@ -2030,25 +2005,10 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
@@ -2028,25 +2003,10 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
cs->ops = &wined3d_cs_st_ops;
|
||||
cs->device = device;
|
||||
|
||||
@ -763,7 +763,7 @@ index 7e504ab..42cee7c 100644
|
||||
if (!(cs->thread = CreateThread(NULL, 0, wined3d_cs_run, cs, 0, NULL)))
|
||||
{
|
||||
ERR("Failed to create wined3d command stream thread.\n");
|
||||
@@ -2060,12 +2020,7 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
@@ -2058,12 +2018,7 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
|
||||
err:
|
||||
if (cs)
|
||||
@ -776,7 +776,7 @@ index 7e504ab..42cee7c 100644
|
||||
HeapFree(GetProcessHeap(), 0, cs);
|
||||
return NULL;
|
||||
}
|
||||
@@ -2084,17 +2039,7 @@ void wined3d_cs_destroy(struct wined3d_cs *cs)
|
||||
@@ -2082,17 +2037,7 @@ void wined3d_cs_destroy(struct wined3d_cs *cs)
|
||||
CloseHandle(cs->thread);
|
||||
if (ret != WAIT_OBJECT_0)
|
||||
ERR("Wait failed (%#x).\n", ret);
|
||||
@ -795,7 +795,7 @@ index 7e504ab..42cee7c 100644
|
||||
HeapFree(GetProcessHeap(), 0, cs);
|
||||
}
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index ae49f7a..cd8b3d1 100644
|
||||
index fcc4fcf..4862e4e 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -31,6 +31,7 @@
|
||||
|
@ -741,7 +741,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
struct wined3d_cs_set_consts_f
|
||||
{
|
||||
enum wined3d_cs_op opcode;
|
||||
@@ -651,6 +661,23 @@
|
||||
@@ -652,6 +662,23 @@
|
||||
struct wined3d_cs_present *op;
|
||||
LONG pending;
|
||||
unsigned int i;
|
||||
@ -765,7 +765,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
|
||||
op = cs->ops->require_space(cs, sizeof(*op));
|
||||
op->opcode = WINED3D_CS_OP_PRESENT;
|
||||
@@ -660,6 +687,7 @@
|
||||
@@ -661,6 +688,7 @@
|
||||
op->dst_rect = *dst_rect;
|
||||
op->flags = flags;
|
||||
|
||||
@ -773,7 +773,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
wined3d_resource_inc_fence(&swapchain->front_buffer->resource);
|
||||
for (i = 0; i < swapchain->desc.backbuffer_count; i++)
|
||||
wined3d_resource_inc_fence(&swapchain->back_buffers[i]->resource);
|
||||
@@ -717,6 +745,30 @@
|
||||
@@ -718,6 +746,30 @@
|
||||
unsigned int i;
|
||||
|
||||
op = cs->ops->require_space(cs, size);
|
||||
@ -804,7 +804,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
op->opcode = WINED3D_CS_OP_CLEAR;
|
||||
op->flags = flags;
|
||||
op->color = *color;
|
||||
@@ -725,6 +777,7 @@
|
||||
@@ -726,6 +778,7 @@
|
||||
op->rect_count = rect_count;
|
||||
memcpy(op->rects, rects, sizeof(*rects) * rect_count);
|
||||
|
||||
@ -812,7 +812,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
if (flags & WINED3DCLEAR_TARGET)
|
||||
{
|
||||
for (i = 0; i < cs->device->adapter->gl_info.limits.buffers; i++)
|
||||
@@ -815,6 +868,23 @@
|
||||
@@ -816,6 +869,23 @@
|
||||
struct wined3d_cs_draw *op;
|
||||
unsigned int i;
|
||||
const struct wined3d_state *state = &cs->device->state;
|
||||
@ -836,7 +836,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
|
||||
op = cs->ops->require_space(cs, sizeof(*op));
|
||||
op->opcode = WINED3D_CS_OP_DRAW;
|
||||
@@ -824,6 +894,7 @@
|
||||
@@ -825,6 +895,7 @@
|
||||
op->instance_count = instance_count;
|
||||
op->indexed = indexed;
|
||||
|
||||
@ -844,7 +844,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
if (indexed)
|
||||
{
|
||||
wined3d_resource_inc_fence(&state->index_buffer->resource);
|
||||
@@ -861,6 +932,17 @@
|
||||
@@ -862,6 +933,17 @@
|
||||
cs->state.predicate_value = op->value;
|
||||
|
||||
return sizeof(*op);
|
||||
@ -862,7 +862,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query *predicate, BOOL value)
|
||||
@@ -872,6 +954,7 @@
|
||||
@@ -873,6 +955,7 @@
|
||||
op->predicate = predicate;
|
||||
op->value = value;
|
||||
|
||||
@ -870,7 +870,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@@ -883,6 +966,17 @@
|
||||
@@ -884,6 +967,17 @@
|
||||
device_invalidate_state(cs->device, STATE_VIEWPORT);
|
||||
|
||||
return sizeof(*op);
|
||||
@ -888,7 +888,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_viewport *viewport)
|
||||
@@ -893,6 +987,7 @@
|
||||
@@ -894,6 +988,7 @@
|
||||
op->opcode = WINED3D_CS_OP_SET_VIEWPORT;
|
||||
op->viewport = *viewport;
|
||||
|
||||
@ -896,7 +896,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@@ -904,6 +999,17 @@
|
||||
@@ -905,6 +1000,17 @@
|
||||
device_invalidate_state(cs->device, STATE_SCISSORRECT);
|
||||
|
||||
return sizeof(*op);
|
||||
@ -914,7 +914,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
|
||||
@@ -914,6 +1020,7 @@
|
||||
@@ -915,6 +1021,7 @@
|
||||
op->opcode = WINED3D_CS_OP_SET_SCISSOR_RECT;
|
||||
op->rect = *rect;
|
||||
|
||||
@ -922,7 +922,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@@ -925,6 +1032,17 @@
|
||||
@@ -926,6 +1033,17 @@
|
||||
device_invalidate_state(cs->device, STATE_FRAMEBUFFER);
|
||||
|
||||
return sizeof(*op);
|
||||
@ -940,7 +940,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int view_idx,
|
||||
@@ -937,6 +1055,7 @@
|
||||
@@ -938,6 +1056,7 @@
|
||||
op->view_idx = view_idx;
|
||||
op->view = view;
|
||||
|
||||
@ -948,7 +948,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@@ -947,6 +1066,18 @@
|
||||
@@ -948,6 +1067,18 @@
|
||||
struct wined3d_rendertarget_view *prev;
|
||||
|
||||
if ((prev = cs->state.fb.depth_stencil))
|
||||
@ -967,7 +967,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
struct wined3d_surface *prev_surface = wined3d_rendertarget_view_get_surface(prev);
|
||||
|
||||
@@ -954,6 +1085,7 @@
|
||||
@@ -955,6 +1086,7 @@
|
||||
|| prev_surface->container->flags & WINED3D_TEXTURE_DISCARD))
|
||||
{
|
||||
surface_modify_ds_location(prev_surface, WINED3D_LOCATION_DISCARDED, prev->width, prev->height);
|
||||
@ -975,7 +975,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
if (prev_surface == cs->onscreen_depth_stencil)
|
||||
{
|
||||
wined3d_texture_decref(cs->onscreen_depth_stencil->container);
|
||||
@@ -963,6 +1095,17 @@
|
||||
@@ -964,6 +1096,17 @@
|
||||
}
|
||||
|
||||
cs->state.fb.depth_stencil = op->view;
|
||||
@ -993,7 +993,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
|
||||
if (!prev != !op->view)
|
||||
{
|
||||
@@ -979,8 +1122,10 @@
|
||||
@@ -980,8 +1123,10 @@
|
||||
}
|
||||
|
||||
device_invalidate_state(device, STATE_FRAMEBUFFER);
|
||||
@ -1004,7 +1004,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3d_rendertarget_view *view)
|
||||
@@ -991,6 +1136,7 @@
|
||||
@@ -992,6 +1137,7 @@
|
||||
op->opcode = WINED3D_CS_OP_SET_DEPTH_STENCIL_VIEW;
|
||||
op->view = view;
|
||||
|
||||
@ -1012,7 +1012,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@@ -1002,6 +1148,17 @@
|
||||
@@ -1003,6 +1149,17 @@
|
||||
device_invalidate_state(cs->device, STATE_VDECL);
|
||||
|
||||
return sizeof(*op);
|
||||
@ -1030,7 +1030,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3d_vertex_declaration *declaration)
|
||||
@@ -1012,10 +1169,17 @@
|
||||
@@ -1013,10 +1170,17 @@
|
||||
op->opcode = WINED3D_CS_OP_SET_VERTEX_DECLARATION;
|
||||
op->declaration = declaration;
|
||||
|
||||
@ -1048,7 +1048,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
const struct wined3d_cs_set_stream_source *op = data;
|
||||
struct wined3d_stream_state *stream;
|
||||
@@ -1033,8 +1197,10 @@
|
||||
@@ -1034,8 +1198,10 @@
|
||||
InterlockedDecrement(&prev->resource.bind_count);
|
||||
|
||||
device_invalidate_state(cs->device, STATE_STREAMSRC);
|
||||
@ -1059,7 +1059,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -1049,10 +1215,17 @@
|
||||
@@ -1050,10 +1216,17 @@
|
||||
op->offset = offset;
|
||||
op->stride = stride;
|
||||
|
||||
@ -1077,7 +1077,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
const struct wined3d_cs_set_stream_source_freq *op = data;
|
||||
struct wined3d_stream_state *stream;
|
||||
@@ -1062,8 +1235,10 @@
|
||||
@@ -1063,8 +1236,10 @@
|
||||
stream->flags = op->flags;
|
||||
|
||||
device_invalidate_state(cs->device, STATE_STREAMSRC);
|
||||
@ -1088,7 +1088,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_idx, UINT frequency, UINT flags)
|
||||
@@ -1076,10 +1251,17 @@
|
||||
@@ -1077,10 +1252,17 @@
|
||||
op->frequency = frequency;
|
||||
op->flags = flags;
|
||||
|
||||
@ -1106,7 +1106,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
const struct wined3d_cs_set_stream_output *op = data;
|
||||
struct wined3d_stream_output *stream;
|
||||
@@ -1094,8 +1276,10 @@
|
||||
@@ -1095,8 +1277,10 @@
|
||||
InterlockedIncrement(&op->buffer->resource.bind_count);
|
||||
if (prev)
|
||||
InterlockedDecrement(&prev->resource.bind_count);
|
||||
@ -1117,7 +1117,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -1109,10 +1293,17 @@
|
||||
@@ -1110,10 +1294,17 @@
|
||||
op->buffer = buffer;
|
||||
op->offset = offset;
|
||||
|
||||
@ -1135,7 +1135,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
const struct wined3d_cs_set_index_buffer *op = data;
|
||||
struct wined3d_buffer *prev;
|
||||
@@ -1127,8 +1318,10 @@
|
||||
@@ -1128,8 +1319,10 @@
|
||||
InterlockedDecrement(&prev->resource.bind_count);
|
||||
|
||||
device_invalidate_state(cs->device, STATE_INDEXBUFFER);
|
||||
@ -1146,7 +1146,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buffer *buffer,
|
||||
@@ -1141,10 +1334,17 @@
|
||||
@@ -1142,10 +1335,17 @@
|
||||
op->buffer = buffer;
|
||||
op->format_id = format_id;
|
||||
|
||||
@ -1164,7 +1164,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
const struct wined3d_cs_set_constant_buffer *op = data;
|
||||
struct wined3d_buffer *prev;
|
||||
@@ -1158,7 +1358,9 @@
|
||||
@@ -1159,7 +1359,9 @@
|
||||
InterlockedDecrement(&prev->resource.bind_count);
|
||||
|
||||
device_invalidate_state(cs->device, STATE_CONSTANT_BUFFER(op->type));
|
||||
@ -1174,7 +1174,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_shader_type type,
|
||||
@@ -1172,10 +1374,17 @@
|
||||
@@ -1173,10 +1375,17 @@
|
||||
op->cb_idx = cb_idx;
|
||||
op->buffer = buffer;
|
||||
|
||||
@ -1192,7 +1192,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info = &cs->device->adapter->gl_info;
|
||||
const struct wined3d_d3d_info *d3d_info = &cs->device->adapter->d3d_info;
|
||||
@@ -1252,8 +1461,10 @@
|
||||
@@ -1253,8 +1462,10 @@
|
||||
|
||||
if (new_use_color_key)
|
||||
device_invalidate_state(cs->device, STATE_COLOR_KEY);
|
||||
@ -1203,7 +1203,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined3d_texture *texture)
|
||||
@@ -1264,6 +1475,7 @@
|
||||
@@ -1265,6 +1476,7 @@
|
||||
op->opcode = WINED3D_CS_OP_SET_TEXTURE;
|
||||
op->stage = stage;
|
||||
op->texture = texture;
|
||||
@ -1211,7 +1211,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@@ -1275,6 +1487,18 @@
|
||||
@@ -1276,6 +1488,18 @@
|
||||
device_invalidate_state(cs->device, STATE_SHADER_RESOURCE_BINDING);
|
||||
|
||||
return sizeof(*op);
|
||||
@ -1230,7 +1230,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3d_shader_type type,
|
||||
@@ -1288,6 +1512,7 @@
|
||||
@@ -1289,6 +1513,7 @@
|
||||
op->view_idx = view_idx;
|
||||
op->view = view;
|
||||
|
||||
@ -1238,7 +1238,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@@ -1299,6 +1524,17 @@
|
||||
@@ -1300,6 +1525,17 @@
|
||||
device_invalidate_state(cs->device, STATE_SHADER_RESOURCE_BINDING);
|
||||
|
||||
return sizeof(*op);
|
||||
@ -1256,7 +1256,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type type,
|
||||
@@ -1312,6 +1548,7 @@
|
||||
@@ -1313,6 +1549,7 @@
|
||||
op->sampler_idx = sampler_idx;
|
||||
op->sampler = sampler;
|
||||
|
||||
@ -1264,7 +1264,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@@ -1324,6 +1561,18 @@
|
||||
@@ -1325,6 +1562,18 @@
|
||||
device_invalidate_state(cs->device, STATE_SHADER_RESOURCE_BINDING);
|
||||
|
||||
return sizeof(*op);
|
||||
@ -1283,7 +1283,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type type, struct wined3d_shader *shader)
|
||||
@@ -1335,6 +1584,7 @@
|
||||
@@ -1336,6 +1585,7 @@
|
||||
op->type = type;
|
||||
op->shader = shader;
|
||||
|
||||
@ -1291,7 +1291,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@@ -1408,6 +1658,17 @@
|
||||
@@ -1406,6 +1656,17 @@
|
||||
device_invalidate_state(cs->device, STATE_RENDER(op->state));
|
||||
|
||||
return sizeof(*op);
|
||||
@ -1309,7 +1309,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render_state state, DWORD value)
|
||||
@@ -1419,6 +1680,7 @@
|
||||
@@ -1417,6 +1678,7 @@
|
||||
op->state = state;
|
||||
op->value = value;
|
||||
|
||||
@ -1317,7 +1317,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@@ -1544,6 +1806,17 @@
|
||||
@@ -1542,6 +1804,17 @@
|
||||
device_invalidate_state(cs->device, STATE_TEXTURESTAGE(op->stage, op->state));
|
||||
|
||||
return sizeof(*op);
|
||||
@ -1335,7 +1335,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
|
||||
@@ -1557,6 +1830,7 @@
|
||||
@@ -1555,6 +1828,7 @@
|
||||
op->state = state;
|
||||
op->value = value;
|
||||
|
||||
@ -1343,7 +1343,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@@ -1568,6 +1842,17 @@
|
||||
@@ -1566,6 +1840,17 @@
|
||||
device_invalidate_state(cs->device, STATE_SAMPLER(op->sampler_idx));
|
||||
|
||||
return sizeof(*op);
|
||||
@ -1361,7 +1361,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
|
||||
@@ -1581,6 +1866,7 @@
|
||||
@@ -1579,6 +1864,7 @@
|
||||
op->state = state;
|
||||
op->value = value;
|
||||
|
||||
@ -1369,7 +1369,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@@ -1593,6 +1879,18 @@
|
||||
@@ -1591,6 +1877,18 @@
|
||||
device_invalidate_state(cs->device, STATE_TRANSFORM(op->state));
|
||||
|
||||
return sizeof(*op);
|
||||
@ -1388,7 +1388,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform_state state,
|
||||
@@ -1605,6 +1903,7 @@
|
||||
@@ -1603,6 +1901,7 @@
|
||||
op->state = state;
|
||||
op->matrix = *matrix;
|
||||
|
||||
@ -1396,7 +1396,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@@ -1616,6 +1915,17 @@
|
||||
@@ -1614,6 +1913,17 @@
|
||||
device_invalidate_state(cs->device, STATE_CLIPPLANE(op->plane_idx));
|
||||
|
||||
return sizeof(*op);
|
||||
@ -1414,7 +1414,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const struct wined3d_vec4 *plane)
|
||||
@@ -1627,10 +1937,17 @@
|
||||
@@ -1625,10 +1935,17 @@
|
||||
op->plane_idx = plane_idx;
|
||||
op->plane = *plane;
|
||||
|
||||
@ -1432,7 +1432,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
const struct wined3d_cs_set_color_key *op = data;
|
||||
struct wined3d_texture *texture = op->texture;
|
||||
@@ -1691,8 +2008,10 @@
|
||||
@@ -1689,8 +2006,10 @@
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1443,7 +1443,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture *texture,
|
||||
@@ -1712,6 +2031,7 @@
|
||||
@@ -1710,6 +2029,7 @@
|
||||
else
|
||||
op->set = 0;
|
||||
|
||||
@ -1451,7 +1451,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@@ -1723,6 +2043,17 @@
|
||||
@@ -1721,6 +2041,17 @@
|
||||
device_invalidate_state(cs->device, STATE_MATERIAL);
|
||||
|
||||
return sizeof(*op);
|
||||
@ -1469,7 +1469,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_material *material)
|
||||
@@ -1733,6 +2064,7 @@
|
||||
@@ -1731,6 +2062,7 @@
|
||||
op->opcode = WINED3D_CS_OP_SET_MATERIAL;
|
||||
op->material = *material;
|
||||
|
||||
@ -1477,7 +1477,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@@ -1748,6 +2080,19 @@
|
||||
@@ -1746,6 +2078,19 @@
|
||||
ERR("Failed to initialize CS state, hr %#x.\n", hr);
|
||||
|
||||
return sizeof(struct wined3d_cs_reset_state);
|
||||
@ -1497,7 +1497,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
@@ -1757,6 +2102,7 @@
|
||||
@@ -1755,6 +2100,7 @@
|
||||
op = cs->ops->require_space(cs, sizeof(*op));
|
||||
op->opcode = WINED3D_CS_OP_RESET_STATE;
|
||||
|
||||
@ -1505,7 +1505,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@@ -3206,5 +3552,106 @@
|
||||
@@ -3204,5 +3550,106 @@
|
||||
ERR("Closing event failed.\n");
|
||||
}
|
||||
|
||||
@ -2122,7 +2122,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
count * sizeof(*device->recording->changed.vs_consts_f));
|
||||
else
|
||||
+#if defined(STAGING_CSMT)
|
||||
wined3d_cs_emit_set_consts_f(device->cs, start_idx, constants, count,
|
||||
wined3d_cs_emit_set_consts_f(device->cs, start_idx, count, constants,
|
||||
WINED3D_SHADER_TYPE_VERTEX);
|
||||
+#else /* STAGING_CSMT */
|
||||
+ device->shader_backend->shader_update_float_vertex_constants(device, start_idx, count);
|
||||
@ -2161,7 +2161,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
count * sizeof(*device->recording->changed.ps_consts_f));
|
||||
else
|
||||
+#if defined(STAGING_CSMT)
|
||||
wined3d_cs_emit_set_consts_f(device->cs, start_idx, constants, count,
|
||||
wined3d_cs_emit_set_consts_f(device->cs, start_idx, count, constants,
|
||||
WINED3D_SHADER_TYPE_PIXEL);
|
||||
+#else /* STAGING_CSMT */
|
||||
+ device->shader_backend->shader_update_float_pixel_constants(device, start_idx, count);
|
||||
@ -7128,8 +7128,8 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
struct wined3d_vertex_declaration *declaration) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_viewport *viewport) DECLSPEC_HIDDEN;
|
||||
+#if defined(STAGING_CSMT)
|
||||
void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, UINT start_register, const struct wined3d_vec4 *constants,
|
||||
UINT vector4f_count, enum wined3d_shader_type type) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
unsigned int count, const struct wined3d_vec4 *constants, enum wined3d_shader_type type) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
@@ -3082,6 +3204,7 @@
|
||||
void wined3d_cs_emit_delete_opengl_contexts(struct wined3d_cs *cs,
|
||||
|
Loading…
Reference in New Issue
Block a user