Rebase against fac012f2e114870c9628e5ea5b5c8312284c0f3e.

This commit is contained in:
Sebastian Lackner 2016-07-22 22:49:15 +02:00
parent f901f130fd
commit 857c2fcfe2
30 changed files with 525 additions and 501 deletions

View File

@ -51,7 +51,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "be2908ed071dd11de5dc2fae270aad15e5df7d17"
echo "fac012f2e114870c9628e5ea5b5c8312284c0f3e"
}
# Show version information

View File

@ -1,4 +1,4 @@
From 538dbd373b103467e566747b3e73c3477a440d09 Mon Sep 17 00:00:00 2001
From 0d374fc445002f29914f0f4c08fdfcb29084f64e Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Wed, 25 May 2016 01:50:36 +0200
Subject: Revert "wined3d: Send shader constant updates through the command
@ -14,7 +14,7 @@ This reverts commit aa666adfed929a2f711d9570fe389856bcaac346.
5 files changed, 38 insertions(+), 68 deletions(-)
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
index 80702a2..0fb2f67 100644
index 945abe5..3f551b6 100644
--- a/dlls/wined3d/arb_program_shader.c
+++ b/dlls/wined3d/arb_program_shader.c
@@ -729,6 +729,12 @@ static void shader_arb_update_float_vertex_constants(struct wined3d_device *devi
@ -44,10 +44,10 @@ index 80702a2..0fb2f67 100644
/* We don't want shader constant dirtification to be an O(contexts), so just dirtify the active
* context. On a context switch the old context will be fully dirtified */
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index edb5cf2..ea4778c 100644
index 8ed049e..5931569 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -1070,54 +1070,10 @@ static void wined3d_cs_st_submit(struct wined3d_cs *cs)
@@ -1243,54 +1243,10 @@ static void wined3d_cs_st_submit(struct wined3d_cs *cs)
wined3d_cs_op_handlers[opcode](cs, cs->data);
}
@ -103,10 +103,10 @@ index edb5cf2..ea4778c 100644
struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 5bac3d0..e9fc75a 100644
index 60088b0..0b2f47b 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -2367,6 +2367,16 @@ struct wined3d_sampler * CDECL wined3d_device_get_vs_sampler(const struct wined3
@@ -2403,6 +2403,16 @@ struct wined3d_sampler * CDECL wined3d_device_get_vs_sampler(const struct wined3
return device->state.sampler[WINED3D_SHADER_TYPE_VERTEX][idx];
}
@ -123,7 +123,7 @@ index 5bac3d0..e9fc75a 100644
HRESULT CDECL wined3d_device_set_vs_consts_b(struct wined3d_device *device,
unsigned int start_idx, unsigned int count, const BOOL *constants)
{
@@ -2394,7 +2404,7 @@ HRESULT CDECL wined3d_device_set_vs_consts_b(struct wined3d_device *device,
@@ -2430,7 +2440,7 @@ HRESULT CDECL wined3d_device_set_vs_consts_b(struct wined3d_device *device,
}
else
{
@ -132,7 +132,7 @@ index 5bac3d0..e9fc75a 100644
}
return WINED3D_OK;
@@ -2443,7 +2453,7 @@ HRESULT CDECL wined3d_device_set_vs_consts_i(struct wined3d_device *device,
@@ -2479,7 +2489,7 @@ HRESULT CDECL wined3d_device_set_vs_consts_i(struct wined3d_device *device,
}
else
{
@ -141,7 +141,7 @@ index 5bac3d0..e9fc75a 100644
}
return WINED3D_OK;
@@ -2488,7 +2498,7 @@ HRESULT CDECL wined3d_device_set_vs_consts_f(struct wined3d_device *device,
@@ -2524,7 +2534,7 @@ HRESULT CDECL wined3d_device_set_vs_consts_f(struct wined3d_device *device,
memset(&device->recording->changed.vs_consts_f[start_idx], 1,
count * sizeof(*device->recording->changed.vs_consts_f));
else
@ -150,7 +150,7 @@ index 5bac3d0..e9fc75a 100644
return WINED3D_OK;
}
@@ -2627,7 +2637,7 @@ HRESULT CDECL wined3d_device_set_ps_consts_b(struct wined3d_device *device,
@@ -2663,7 +2673,7 @@ HRESULT CDECL wined3d_device_set_ps_consts_b(struct wined3d_device *device,
}
else
{
@ -159,7 +159,7 @@ index 5bac3d0..e9fc75a 100644
}
return WINED3D_OK;
@@ -2676,7 +2686,7 @@ HRESULT CDECL wined3d_device_set_ps_consts_i(struct wined3d_device *device,
@@ -2712,7 +2722,7 @@ HRESULT CDECL wined3d_device_set_ps_consts_i(struct wined3d_device *device,
}
else
{
@ -168,7 +168,7 @@ index 5bac3d0..e9fc75a 100644
}
return WINED3D_OK;
@@ -2722,7 +2732,7 @@ HRESULT CDECL wined3d_device_set_ps_consts_f(struct wined3d_device *device,
@@ -2758,7 +2768,7 @@ HRESULT CDECL wined3d_device_set_ps_consts_f(struct wined3d_device *device,
memset(&device->recording->changed.ps_consts_f[start_idx], 1,
count * sizeof(*device->recording->changed.ps_consts_f));
else
@ -178,10 +178,10 @@ index 5bac3d0..e9fc75a 100644
return WINED3D_OK;
}
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index d3a0ebf..f671e84 100644
index c239a47..87b2602 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -1555,6 +1555,11 @@ static void shader_glsl_update_float_vertex_constants(struct wined3d_device *dev
@@ -1601,6 +1601,11 @@ static void shader_glsl_update_float_vertex_constants(struct wined3d_device *dev
{
update_heap_entry(heap, i, priv->next_constant_version);
}
@ -193,7 +193,7 @@ index d3a0ebf..f671e84 100644
}
static void shader_glsl_update_float_pixel_constants(struct wined3d_device *device, UINT start, UINT count)
@@ -1567,6 +1572,11 @@ static void shader_glsl_update_float_pixel_constants(struct wined3d_device *devi
@@ -1613,6 +1618,11 @@ static void shader_glsl_update_float_pixel_constants(struct wined3d_device *devi
{
update_heap_entry(heap, i, priv->next_constant_version);
}
@ -206,10 +206,10 @@ index d3a0ebf..f671e84 100644
static unsigned int vec4_varyings(DWORD shader_major, const struct wined3d_gl_info *gl_info)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 8c19aa8..06e4ba9 100644
index d1b59e1..608627e 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2853,22 +2853,10 @@ void state_init(struct wined3d_state *state, struct wined3d_fb_state *fb,
@@ -2995,22 +2995,10 @@ void state_init(struct wined3d_state *state, struct wined3d_fb_state *fb,
DWORD flags) DECLSPEC_HIDDEN;
void state_unbind_resources(struct wined3d_state *state) DECLSPEC_HIDDEN;
@ -232,7 +232,7 @@ index 8c19aa8..06e4ba9 100644
};
struct wined3d_cs
@@ -2933,12 +2921,6 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs,
@@ -3077,12 +3065,6 @@ 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;
@ -242,9 +242,9 @@ index 8c19aa8..06e4ba9 100644
- cs->ops->push_constants(cs, p, start_idx, count, constants);
-}
-
/* 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
* allows GetData on a created issue, but opengl doesn't
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
* fixed function semantics as D3DCOLOR or FLOAT16 */
enum wined3d_buffer_conversion_type
--
2.8.0

View File

@ -1,4 +1,4 @@
From cd89d4b13a8465eca49e4999b43d85d86706c580 Mon Sep 17 00:00:00 2001
From 38ac2472c5c9a70a5a8515fe4e2a249eb0ea0a74 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
@ -10,7 +10,7 @@ Subject: wined3d: Send float constant updates through the command stream
3 files changed, 77 insertions(+), 6 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index b128af1..538ca87 100644
index d7895ca..dcbafa6 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -65,6 +65,8 @@ enum wined3d_cs_op
@ -37,7 +37,7 @@ index b128af1..538ca87 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)
{
@@ -942,11 +952,9 @@ static UINT wined3d_cs_exec_transfer_stateblock(struct wined3d_cs *cs, const voi
@@ -1074,11 +1084,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));
@ -49,7 +49,7 @@ index b128af1..538ca87 100644
memcpy(cs->state.lights, op->state.lights, sizeof(cs->state.lights));
@@ -967,11 +975,9 @@ void wined3d_cs_emit_transfer_stateblock(struct wined3d_cs *cs, const struct win
@@ -1099,11 +1107,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));
@ -61,7 +61,7 @@ index b128af1..538ca87 100644
/* FIXME: This is not ideal. CS is still running synchronously, so this is ok.
* It will go away soon anyway. */
@@ -1051,6 +1057,65 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
@@ -1183,6 +1189,65 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
cs->ops->submit(cs);
}
@ -127,7 +127,7 @@ index b128af1..538ca87 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;
@@ -1349,6 +1414,8 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -1481,6 +1546,8 @@ 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_DESTROY_OBJECT */ wined3d_cs_exec_destroy_object,
/* WINED3D_CS_OP_STATEBLOCK */ wined3d_cs_exec_transfer_stateblock,
@ -137,7 +137,7 @@ index b128af1..538ca87 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 33b7fc3..4b2ea91 100644
index 36efae2..77ca973 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -2518,7 +2518,8 @@ HRESULT CDECL wined3d_device_set_vs_consts_f(struct wined3d_device *device,
@ -161,18 +161,18 @@ index 33b7fc3..4b2ea91 100644
return WINED3D_OK;
}
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 3fc5b66..8f5c563 100644
index 30610a2..56de135 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3010,6 +3010,8 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
@@ -3109,6 +3109,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, 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
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
* fixed function semantics as D3DCOLOR or FLOAT16 */
--
2.8.0

View File

@ -1,4 +1,4 @@
From 86db2b87abe7100bc48d812833523605dbd3a679 Mon Sep 17 00:00:00 2001
From 93cf61ce628c2b237675907ad81eb9292beaedf7 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
@ -13,10 +13,10 @@ Subject: wined3d: Request a glFinish before modifying resources outside the cs
6 files changed, 104 insertions(+)
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
index 66e13cb..5bbb4ca 100644
index 6534b2d..486d770 100644
--- a/dlls/wined3d/buffer.c
+++ b/dlls/wined3d/buffer.c
@@ -931,6 +931,15 @@ void buffer_internal_preload(struct wined3d_buffer *buffer, struct wined3d_conte
@@ -935,6 +935,15 @@ void buffer_internal_preload(struct wined3d_buffer *buffer, struct wined3d_conte
void CDECL wined3d_buffer_preload(struct wined3d_buffer *buffer)
{
struct wined3d_context *context;
@ -32,7 +32,7 @@ index 66e13cb..5bbb4ca 100644
context = context_acquire(buffer->resource.device, NULL);
buffer_internal_preload(buffer, context, NULL);
context_release(context);
@@ -947,9 +956,17 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
@@ -951,9 +960,17 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
{
LONG count;
BYTE *base;
@ -51,7 +51,7 @@ index 66e13cb..5bbb4ca 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 538ca87..3ed2db3 100644
index dcbafa6..02489fd 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -67,6 +67,7 @@ enum wined3d_cs_op
@ -74,7 +74,7 @@ index 538ca87..3ed2db3 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)
{
@@ -1383,6 +1389,29 @@ void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs, void (*callback)(void
@@ -1515,6 +1521,29 @@ void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs, void (*callback)(void
cs->ops->submit(cs);
}
@ -104,7 +104,7 @@ index 538ca87..3ed2db3 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_FENCE */ wined3d_cs_exec_fence,
@@ -1416,6 +1445,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -1548,6 +1577,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,7 +113,7 @@ index 538ca87..3ed2db3 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 4b2ea91..b8f1090 100644
index 77ca973..60ee130 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -2914,6 +2914,13 @@ static HRESULT process_vertices_strided(const struct wined3d_device *device, DWO
@ -205,10 +205,10 @@ index 33fcf34..6944c72 100644
{
WARN("D3D not initialized, using fallback.\n");
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index ecabc60..4bacc41 100644
index f6beefc..b09a2de 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -1675,6 +1675,13 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
@@ -1699,6 +1699,13 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
return WINED3DERR_INVALIDCALL;
}
@ -222,7 +222,7 @@ index ecabc60..4bacc41 100644
flags = wined3d_resource_sanitize_map_flags(resource, flags);
if (device->d3d_initialized)
@@ -2634,6 +2641,13 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i
@@ -2645,6 +2652,13 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i
if (texture->resource.map_count && !(texture->flags & WINED3D_TEXTURE_GET_DC_LENIENT))
return WINED3DERR_INVALIDCALL;
@ -237,17 +237,17 @@ index ecabc60..4bacc41 100644
context = context_acquire(device, NULL);
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 8a6e5f7..6200309 100644
index 56de135..0f5b038 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3043,6 +3043,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs,
@@ -3111,6 +3111,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, 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
* because only the driver knows about it, but we have a created state because d3d
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
* fixed function semantics as D3DCOLOR or FLOAT16 */
--
2.8.0

View File

@ -1,4 +1,4 @@
From 2395e19d3954fa806523a7353275bc635fcbe73c Mon Sep 17 00:00:00 2001
From 95d77becc5a2fb73947a9fbb45dbc928da09cf9a 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
@ -127,18 +127,18 @@ index 7a43657..fcb8d7e 100644
INT CDECL wined3d_device_get_base_vertex_index(const struct wined3d_device *device)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index a325ee2..db70629 100644
index efa41ae..6096c23 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3070,6 +3070,8 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
@@ -3110,6 +3110,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, 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;
/* 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
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
* fixed function semantics as D3DCOLOR or FLOAT16 */
--
2.8.0

View File

@ -1,4 +1,4 @@
From 4ebf8b7149017a9b56302d24eaccd822b314b881 Mon Sep 17 00:00:00 2001
From b0f1bcf4dbb0c48a34335bbe243581e4270e93bd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Sun, 7 Apr 2013 17:53:43 +0200
Subject: wined3d: Send primitive type updates through the command stream
@ -11,10 +11,10 @@ Subject: wined3d: Send primitive type updates through the command stream
4 files changed, 40 insertions(+), 10 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 4a49206..a409d48 100644
index 0a3780b..aef2374 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -68,6 +68,7 @@ enum wined3d_cs_op
@@ -69,6 +69,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_SET_PS_CONSTS_F,
WINED3D_CS_OP_GLFINISH,
WINED3D_CS_OP_SET_BASE_VERTEX_INDEX,
@ -22,7 +22,7 @@ index 4a49206..a409d48 100644
WINED3D_CS_OP_STOP,
};
@@ -302,6 +303,12 @@ struct wined3d_cs_set_base_vertex_index
@@ -313,6 +314,12 @@ struct wined3d_cs_set_base_vertex_index
UINT base_vertex_index;
};
@ -35,7 +35,7 @@ index 4a49206..a409d48 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)
{
@@ -953,9 +960,6 @@ static UINT wined3d_cs_exec_transfer_stateblock(struct wined3d_cs *cs, const voi
@@ -1107,9 +1114,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 */
@ -45,7 +45,7 @@ index 4a49206..a409d48 100644
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));
@@ -976,8 +980,6 @@ void wined3d_cs_emit_transfer_stateblock(struct wined3d_cs *cs, const struct win
@@ -1130,8 +1134,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 */
@ -54,7 +54,7 @@ index 4a49206..a409d48 100644
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));
@@ -1414,6 +1416,32 @@ void wined3d_cs_emit_set_base_vertex_index(struct wined3d_cs *cs,
@@ -1587,6 +1589,32 @@ void wined3d_cs_emit_set_base_vertex_index(struct wined3d_cs *cs,
cs->ops->submit(cs);
}
@ -87,7 +87,7 @@ index 4a49206..a409d48 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_FENCE */ wined3d_cs_exec_fence,
@@ -1448,6 +1476,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -1622,6 +1650,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_SET_PS_CONSTS_F */ wined3d_cs_exec_set_ps_consts_f,
/* WINED3D_CS_OP_GLFINISH */ wined3d_cs_exec_glfinish,
/* WINED3D_CS_OP_SET_BASE_VERTEX_INDEX */ wined3d_cs_exec_set_base_vertex_index,
@ -96,10 +96,10 @@ index 4a49206..a409d48 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 8a7028b..588efa5 100644
index fcb8d7e..36405a1 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -3433,7 +3433,6 @@ void CDECL wined3d_device_set_primitive_type(struct wined3d_device *device,
@@ -3485,7 +3485,6 @@ void CDECL wined3d_device_set_primitive_type(struct wined3d_device *device,
enum wined3d_primitive_type primitive_type)
{
GLenum gl_primitive_type, prev;
@ -107,7 +107,7 @@ index 8a7028b..588efa5 100644
TRACE("device %p, primitive_type %s\n", device, debug_d3dprimitivetype(primitive_type));
gl_primitive_type = gl_primitive_type_from_d3d(primitive_type);
@@ -3441,8 +3440,8 @@ void CDECL wined3d_device_set_primitive_type(struct wined3d_device *device,
@@ -3493,8 +3492,8 @@ void CDECL wined3d_device_set_primitive_type(struct wined3d_device *device,
device->update_state->gl_primitive_type = gl_primitive_type;
if (device->recording)
device->recording->changed.primitive_type = TRUE;
@ -119,10 +119,10 @@ index 8a7028b..588efa5 100644
void CDECL wined3d_device_get_primitive_type(const struct wined3d_device *device,
diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c
index 0507a06..cfa9668 100644
index 08f5ed5..a9f313c 100644
--- a/dlls/wined3d/stateblock.c
+++ b/dlls/wined3d/stateblock.c
@@ -1061,8 +1061,8 @@ void CDECL wined3d_stateblock_apply(const struct wined3d_stateblock *stateblock)
@@ -1009,8 +1009,8 @@ void CDECL wined3d_stateblock_apply(const struct wined3d_stateblock *stateblock)
gl_primitive_type = stateblock->state.gl_primitive_type;
prev = device->update_state->gl_primitive_type;
device->update_state->gl_primitive_type = gl_primitive_type;
@ -134,18 +134,18 @@ index 0507a06..cfa9668 100644
if (stateblock->changed.indices)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index baf43d0..a7757ac 100644
index 6096c23..ee8c1cb 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
@@ -3112,6 +3112,8 @@ void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, unsigned int start_idx,
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;
+void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs,
+ GLenum primitive_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
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
* fixed function semantics as D3DCOLOR or FLOAT16 */
--
2.8.0

View File

@ -1,4 +1,4 @@
From fb8eb9da970ffe7ce1d39a233375e113c8c5d48c Mon Sep 17 00:00:00 2001
From 9087e6cbcc3113c89bb617a7ab9cb0134d6ecd9d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Wed, 10 Apr 2013 17:16:02 +0200
Subject: wined3d: Send light updates through the command stream
@ -10,7 +10,7 @@ Subject: wined3d: Send light updates through the command stream
3 files changed, 174 insertions(+), 64 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index a7b8f79..556edc0 100644
index af7ec74..00c26b4 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -64,7 +64,6 @@ enum wined3d_cs_op
@ -63,7 +63,7 @@ index a7b8f79..556edc0 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)
{
@@ -996,35 +1004,6 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
@@ -1128,35 +1136,6 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
cs->ops->submit(cs);
}
@ -99,7 +99,7 @@ index a7b8f79..556edc0 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;
@@ -1604,6 +1583,152 @@ void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs, GLenum primitive_
@@ -1739,6 +1718,152 @@ void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs, GLenum primitive_
cs->ops->submit(cs);
}
@ -252,7 +252,7 @@ index a7b8f79..556edc0 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_FENCE */ wined3d_cs_exec_fence,
@@ -1634,7 +1759,6 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -1769,7 +1894,6 @@ 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_DESTROY_OBJECT */ wined3d_cs_exec_destroy_object,
@ -260,7 +260,7 @@ index a7b8f79..556edc0 100644
/* 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,
/* WINED3D_CS_OP_SET_VS_CONSTS_I */ wined3d_cs_exec_set_vs_consts_i,
@@ -1644,6 +1768,8 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -1779,6 +1903,8 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_GLFINISH */ wined3d_cs_exec_glfinish,
/* 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,
@ -270,7 +270,7 @@ index a7b8f79..556edc0 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 766e393..cb6f2ee 100644
index 09cb1ba..4b209d3 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -1601,14 +1601,6 @@ HRESULT CDECL wined3d_device_set_light(struct wined3d_device *device,
@ -356,10 +356,10 @@ index 766e393..cb6f2ee 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 fe1cd27..0cf9522 100644
index 29f9063..bc8eec2 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2913,7 +2913,9 @@ struct wined3d_cs_block
@@ -3026,7 +3026,9 @@ struct wined3d_cs_block
{
struct list entry;
UINT pos;
@ -370,7 +370,7 @@ index fe1cd27..0cf9522 100644
};
struct wined3d_cs_ops
@@ -2959,8 +2961,6 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
@@ -3072,8 +3074,6 @@ 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;
@ -379,15 +379,15 @@ index fe1cd27..0cf9522 100644
void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs,
struct wined3d_rendertarget_view *view) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buffer *buffer,
@@ -3006,6 +3006,8 @@ void wined3d_cs_emit_set_base_vertex_index(struct wined3d_cs *cs,
@@ -3119,6 +3119,8 @@ void wined3d_cs_emit_set_base_vertex_index(struct wined3d_cs *cs,
UINT base_vertex_index) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs,
GLenum primitive_type) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light_info *light) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, UINT idx, BOOL enable) 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
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
* fixed function semantics as D3DCOLOR or FLOAT16 */
--
2.8.0

View File

@ -1,4 +1,4 @@
From 769cd7807af62078c543e9ac9cc27783322f295c Mon Sep 17 00:00:00 2001
From 524919d5d089cbcb8759cdad91c55b767ae735c6 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.
@ -13,10 +13,10 @@ between surface_blt and surface_blt_ugly isn't particularly nice.
4 files changed, 208 insertions(+), 105 deletions(-)
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
index a308311..0c64b31 100644
index a2adc54..ccff548 100644
--- a/dlls/d3d9/tests/visual.c
+++ b/dlls/d3d9/tests/visual.c
@@ -1339,7 +1339,7 @@ static void color_fill_test(void)
@@ -1336,7 +1336,7 @@ static void color_fill_test(void)
* result on Wine.
* {D3DFMT_YUY2, "D3DFMT_YUY2", BLOCKS, 0},
* {D3DFMT_UYVY, "D3DFMT_UYVY", BLOCKS, 0}, */
@ -26,10 +26,10 @@ index a308311..0c64b31 100644
* supported as offscreen plain surfaces and do not support D3DUSAGE_RENDERTARGET
* when created as texture. */
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index e526a33..0372843 100644
index f6c2b68..25f7b3e 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -74,6 +74,7 @@ enum wined3d_cs_op
@@ -75,6 +75,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_SET_PRIMITIVE_TYPE,
WINED3D_CS_OP_SET_LIGHT,
WINED3D_CS_OP_SET_LIGHT_ENABLE,
@ -37,7 +37,7 @@ index e526a33..0372843 100644
WINED3D_CS_OP_STOP,
};
@@ -336,6 +337,18 @@ struct wined3d_cs_set_light_enable
@@ -348,6 +349,18 @@ struct wined3d_cs_set_light_enable
BOOL enable;
};
@ -56,7 +56,7 @@ index e526a33..0372843 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)
{
@@ -1488,6 +1501,9 @@ static UINT wined3d_cs_exec_glfinish(struct wined3d_cs *cs, const void *data)
@@ -1661,6 +1674,9 @@ static UINT wined3d_cs_exec_glfinish(struct wined3d_cs *cs, const void *data)
struct wined3d_device *device = cs->device;
struct wined3d_context *context;
@ -66,7 +66,7 @@ index e526a33..0372843 100644
context = context_acquire(device, NULL);
context->gl_info->gl_ops.gl.p_glFinish();
context_release(context);
@@ -1699,6 +1715,38 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, UINT idx, BOOL enab
@@ -1872,6 +1888,38 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, UINT idx, BOOL enab
cs->ops->submit(cs);
}
@ -105,7 +105,7 @@ index e526a33..0372843 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_FENCE */ wined3d_cs_exec_fence,
@@ -1739,6 +1787,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -1913,6 +1961,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,7 +113,7 @@ index e526a33..0372843 100644
};
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
@@ -1817,6 +1866,7 @@ static DWORD WINAPI wined3d_cs_run(void *thread_param)
@@ -1991,6 +2040,7 @@ static DWORD WINAPI wined3d_cs_run(void *thread_param)
TRACE("Started.\n");
@ -122,10 +122,10 @@ index e526a33..0372843 100644
{
struct wined3d_cs_block *block;
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 44692a9..d6fab5d 100644
index 6944c72..d1cc5f6 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -4116,7 +4116,7 @@ const struct blit_shader cpu_blit = {
@@ -4110,7 +4110,7 @@ const struct blit_shader cpu_blit = {
cpu_blit_blit_surface,
};
@ -134,7 +134,7 @@ index 44692a9..d6fab5d 100644
struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags,
const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter)
{
@@ -4126,9 +4126,8 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
@@ -4120,9 +4120,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;
@ -146,7 +146,7 @@ index 44692a9..d6fab5d 100644
DWORD src_ds_flags, dst_ds_flags;
BOOL scale, convert;
@@ -4141,91 +4140,17 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
@@ -4135,91 +4134,17 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
| WINED3D_BLT_DO_NOT_WAIT
| WINED3D_BLT_ALPHA_TEST;
@ -243,7 +243,7 @@ index 44692a9..d6fab5d 100644
}
if (!device->d3d_initialized)
@@ -4250,11 +4175,6 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
@@ -4244,11 +4169,6 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
goto fallback;
}
@ -255,7 +255,7 @@ index 44692a9..d6fab5d 100644
dst_swapchain = dst_texture->swapchain;
/* This isn't strictly needed. FBO blits for example could deal with
@@ -4290,22 +4210,16 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
@@ -4284,22 +4204,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))
@ -281,7 +281,7 @@ index 44692a9..d6fab5d 100644
}
}
else
@@ -4341,7 +4255,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
@@ -4335,7 +4249,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)))
@ -290,7 +290,7 @@ index 44692a9..d6fab5d 100644
}
else
{
@@ -4384,7 +4298,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
@@ -4378,7 +4292,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
context, dst_texture->resource.draw_binding);
context_release(context);
}
@ -299,7 +299,7 @@ index 44692a9..d6fab5d 100644
}
}
}
@@ -4408,7 +4322,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
@@ -4402,7 +4316,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;
@ -308,7 +308,7 @@ index 44692a9..d6fab5d 100644
}
if (fbo_blit_supported(&device->adapter->gl_info, blit_op,
@@ -4429,7 +4343,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
@@ -4423,7 +4337,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);
@ -317,7 +317,7 @@ index 44692a9..d6fab5d 100644
}
blitter = wined3d_select_blitter(&device->adapter->gl_info, &device->adapter->d3d_info, blit_op,
@@ -4439,7 +4353,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
@@ -4433,7 +4347,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);
@ -326,7 +326,7 @@ index 44692a9..d6fab5d 100644
}
}
}
@@ -4447,9 +4361,140 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
@@ -4441,9 +4355,140 @@ 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)))
@ -470,10 +470,10 @@ index 44692a9..d6fab5d 100644
+ return WINED3D_OK;
}
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 523185b..d1e521c 100644
index 8e09b0f..d9d610d 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2746,6 +2746,9 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
@@ -2904,6 +2904,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;
@ -483,7 +483,7 @@ index 523185b..d1e521c 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;
@@ -2886,6 +2889,7 @@ struct wined3d_cs
@@ -3044,6 +3047,7 @@ struct wined3d_cs
struct wined3d_device *device;
struct wined3d_state state;
HANDLE thread;
@ -491,7 +491,7 @@ index 523185b..d1e521c 100644
DWORD tls_idx;
struct wined3d_surface *onscreen_depth_stencil;
@@ -2963,6 +2967,10 @@ void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs,
@@ -3123,6 +3127,10 @@ void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs,
GLenum primitive_type) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light_info *light) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, UINT idx, BOOL enable) DECLSPEC_HIDDEN;
@ -500,8 +500,8 @@ index 523185b..d1e521c 100644
+ const RECT *src_rect, DWORD flags, const struct wined3d_blt_fx *fx,
+ enum wined3d_texture_filter_type filter) 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
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
* fixed function semantics as D3DCOLOR or FLOAT16 */
--
2.8.0

View File

@ -1,4 +1,4 @@
From 8ebc385053df54728b9b4bfca6851f92cca509fb Mon Sep 17 00:00:00 2001
From 59429a42d6de889fdbda3bd1f05e2d6cef45712a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 4 Jul 2013 21:10:16 +0200
Subject: wined3d: Send render target view clears through the command stream
@ -10,10 +10,10 @@ Subject: wined3d: Send render target view clears through the command stream
3 files changed, 53 insertions(+), 12 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 6cbf83e..fd4a0ce 100644
index 25f7b3e..8496d42 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -75,6 +75,7 @@ enum wined3d_cs_op
@@ -76,6 +76,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_SET_LIGHT,
WINED3D_CS_OP_SET_LIGHT_ENABLE,
WINED3D_CS_OP_BLT,
@ -21,7 +21,7 @@ index 6cbf83e..fd4a0ce 100644
WINED3D_CS_OP_STOP,
};
@@ -348,6 +349,18 @@ struct wined3d_cs_blt
@@ -361,6 +362,18 @@ struct wined3d_cs_blt
enum wined3d_texture_filter_type filter;
};
@ -40,7 +40,7 @@ index 6cbf83e..fd4a0ce 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)
{
@@ -1749,6 +1762,39 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
@@ -1920,6 +1933,39 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
cs->ops->submit(cs);
}
@ -80,7 +80,7 @@ index 6cbf83e..fd4a0ce 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_FENCE */ wined3d_cs_exec_fence,
@@ -1790,6 +1836,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -1962,6 +2008,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_SET_LIGHT */ wined3d_cs_exec_set_light,
/* WINED3D_CS_OP_SET_LIGHT_ENABLE */ wined3d_cs_exec_set_light_enable,
/* WINED3D_CS_OP_BLT */ wined3d_cs_exec_blt,
@ -89,10 +89,10 @@ index 6cbf83e..fd4a0ce 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 e580e34..d851c52 100644
index 7946e7d..5a1580c 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -4140,8 +4140,8 @@ HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *devi
@@ -4181,8 +4181,8 @@ HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *devi
{
const struct blit_shader *blitter;
struct wined3d_resource *resource;
@ -102,7 +102,7 @@ index e580e34..d851c52 100644
TRACE("device %p, view %p, rect %s, flags %#x, color %s, depth %.8e, stencil %u.\n",
device, view, wine_dbgstr_rect(rect), flags, debug_color(color), depth, stencil);
@@ -4180,17 +4180,8 @@ HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *devi
@@ -4221,17 +4221,8 @@ HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *devi
return WINED3DERR_INVALIDCALL;
}
@ -123,10 +123,10 @@ index e580e34..d851c52 100644
struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(const struct wined3d_device *device,
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index a248e24..3b8ad5e 100644
index d9d610d..426c10d 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2971,6 +2971,9 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
@@ -3131,6 +3131,9 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
const RECT *dst_rect, struct wined3d_surface *src_surface,
const RECT *src_rect, DWORD flags, const struct wined3d_blt_fx *fx,
enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
@ -134,8 +134,8 @@ index a248e24..3b8ad5e 100644
+ const RECT *rect, DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil,
+ const struct blit_shader *blitter) 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
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
* fixed function semantics as D3DCOLOR or FLOAT16 */
--
2.8.0

View File

@ -1,4 +1,4 @@
From a48f1245857c50591d0ddc367e191b5857c80b2b Mon Sep 17 00:00:00 2001
From 68607b84ae0cdb73a2cb49ce37057187492a8d61 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefandoesinger@gmx.at>
Date: Sun, 3 Apr 2016 19:34:19 +0100
Subject: wined3d: send texture maps through the command stream
@ -11,10 +11,10 @@ Slow version only. Good enough to dodge some Nvidia bugs in the ddraw tests.
3 files changed, 168 insertions(+), 86 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index fd4a0ce..75e679c 100644
index 8496d42..904f304 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -76,6 +76,8 @@ enum wined3d_cs_op
@@ -77,6 +77,8 @@ enum wined3d_cs_op
WINED3D_CS_OP_SET_LIGHT_ENABLE,
WINED3D_CS_OP_BLT,
WINED3D_CS_OP_CLEAR_RTV,
@ -23,7 +23,7 @@ index fd4a0ce..75e679c 100644
WINED3D_CS_OP_STOP,
};
@@ -361,6 +363,22 @@ struct wined3d_cs_clear_rtv
@@ -374,6 +376,22 @@ struct wined3d_cs_clear_rtv
const struct blit_shader *blitter;
};
@ -46,7 +46,7 @@ index fd4a0ce..75e679c 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)
{
@@ -1795,6 +1813,59 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
@@ -1966,6 +1984,59 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
cs->ops->submit(cs);
}
@ -106,7 +106,7 @@ index fd4a0ce..75e679c 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_FENCE */ wined3d_cs_exec_fence,
@@ -1837,6 +1908,8 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2009,6 +2080,8 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_SET_LIGHT_ENABLE */ wined3d_cs_exec_set_light_enable,
/* WINED3D_CS_OP_BLT */ wined3d_cs_exec_blt,
/* WINED3D_CS_OP_CLEAR_RTV */ wined3d_cs_exec_clear_rtv,
@ -116,10 +116,10 @@ index fd4a0ce..75e679c 100644
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index c3d5037..6ff5815 100644
index debafc4..e239282 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -1580,6 +1580,63 @@ static void wined3d_texture_unload(struct wined3d_resource *resource)
@@ -1648,6 +1648,63 @@ static void wined3d_texture_unload(struct wined3d_resource *resource)
wined3d_texture_unload_gl_texture(texture);
}
@ -183,7 +183,7 @@ index c3d5037..6ff5815 100644
static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resource, unsigned int sub_resource_idx,
struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags)
{
@@ -1587,13 +1644,9 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
@@ -1655,13 +1712,9 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
struct wined3d_texture_sub_resource *sub_resource;
struct wined3d_device *device = resource->device;
unsigned int fmt_flags = resource->format_flags;
@ -197,7 +197,7 @@ index c3d5037..6ff5815 100644
TRACE("resource %p, sub_resource_idx %u, map_desc %p, box %s, flags %#x.\n",
resource, sub_resource_idx, map_desc, debug_box(box), flags);
@@ -1638,54 +1691,9 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
@@ -1706,54 +1759,9 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
return WINED3DERR_INVALIDCALL;
}
@ -253,7 +253,7 @@ index c3d5037..6ff5815 100644
if (fmt_flags & WINED3DFMT_FLAG_BROKEN_PITCH)
{
@@ -1721,17 +1729,6 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
@@ -1789,17 +1797,6 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
}
}
@ -271,7 +271,7 @@ index c3d5037..6ff5815 100644
++resource->map_count;
++sub_resource->map_count;
@@ -1741,14 +1738,38 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
@@ -1809,14 +1806,38 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
return WINED3D_OK;
}
@ -314,7 +314,7 @@ index c3d5037..6ff5815 100644
TRACE("resource %p, sub_resource_idx %u.\n", resource, sub_resource_idx);
@@ -1764,27 +1785,7 @@ static HRESULT texture_resource_sub_resource_unmap(struct wined3d_resource *reso
@@ -1832,27 +1853,7 @@ static HRESULT texture_resource_sub_resource_unmap(struct wined3d_resource *reso
return WINEDDERR_NOTLOCKED;
}
@ -344,10 +344,10 @@ index c3d5037..6ff5815 100644
--sub_resource->map_count;
if (!--resource->map_count && texture->update_map_binding)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 1a4d740..8253934 100644
index 426c10d..ed0eabc 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2607,6 +2607,8 @@ BOOL wined3d_texture_prepare_location(struct wined3d_texture *texture, unsigned
@@ -2769,6 +2769,8 @@ BOOL wined3d_texture_prepare_location(struct wined3d_texture *texture, unsigned
struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
BOOL wined3d_texture_load_location(struct wined3d_texture *texture, unsigned int sub_resource_idx,
struct wined3d_context *context, DWORD location);
@ -356,7 +356,7 @@ index 1a4d740..8253934 100644
void wined3d_texture_prepare_texture(struct wined3d_texture *texture,
struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN;
void wined3d_texture_set_map_binding(struct wined3d_texture *texture, DWORD map_binding) DECLSPEC_HIDDEN;
@@ -2614,6 +2616,8 @@ void wined3d_texture_set_swapchain(struct wined3d_texture *texture,
@@ -2776,6 +2778,8 @@ void wined3d_texture_set_swapchain(struct wined3d_texture *texture,
struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
void wined3d_texture_unmap_bo_address(const struct wined3d_bo_address *data,
const struct wined3d_gl_info *gl_info, GLenum binding) DECLSPEC_HIDDEN;
@ -365,7 +365,7 @@ index 1a4d740..8253934 100644
void wined3d_texture_validate_location(struct wined3d_texture *texture,
unsigned int sub_resource_idx, DWORD location) DECLSPEC_HIDDEN;
@@ -2974,6 +2978,10 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
@@ -3134,6 +3138,10 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
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;
@ -374,8 +374,8 @@ index 1a4d740..8253934 100644
+void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture *texture,
+ unsigned int sub_resource_idx) 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
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
* fixed function semantics as D3DCOLOR or FLOAT16 */
--
2.8.0

View File

@ -1,4 +1,4 @@
From acef1f21fff3b10108453559360d6d0fa0e3f1e0 Mon Sep 17 00:00:00 2001
From 882f8cb04eb9f245eb790668cfb05259a89baf1a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Sat, 6 Jul 2013 18:26:11 +0200
Subject: wined3d: Add query support to the command stream
@ -10,10 +10,10 @@ Subject: wined3d: Add query support to the command stream
3 files changed, 83 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 1c29500..d080127 100644
index 57e77be..4aaf259 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -68,6 +68,8 @@ enum wined3d_cs_op
@@ -69,6 +69,8 @@ enum wined3d_cs_op
WINED3D_CS_OP_CLEAR_RTV,
WINED3D_CS_OP_TEXTURE_MAP,
WINED3D_CS_OP_TEXTURE_UNMAP,
@ -22,7 +22,7 @@ index 1c29500..d080127 100644
WINED3D_CS_OP_STOP,
};
@@ -375,6 +377,23 @@ struct wined3d_cs_skip
@@ -388,6 +390,23 @@ struct wined3d_cs_skip
DWORD size;
};
@ -46,7 +46,7 @@ index 1c29500..d080127 100644
static void wined3d_cs_submit(struct wined3d_cs *cs, size_t size)
{
LONG new_val = (cs->queue.head + size) & (WINED3D_CS_QUEUE_SIZE - 1);
@@ -1792,6 +1811,58 @@ void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture
@@ -1963,6 +1982,58 @@ void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture
cs->ops->submit(cs, sizeof(*op));
}
@ -105,7 +105,7 @@ index 1c29500..d080127 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
@@ -1838,6 +1909,8 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2010,6 +2081,8 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_CLEAR_RTV */ wined3d_cs_exec_clear_rtv,
/* WINED3D_CS_OP_TEXTURE_MAP */ wined3d_cs_exec_texture_map,
/* WINED3D_CS_OP_TEXTURE_UNMAP */ wined3d_cs_exec_texture_unmap,
@ -115,10 +115,10 @@ index 1c29500..d080127 100644
static void *wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size)
diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
index 3e29967..ce75141 100644
index cd7a73c..f656bd1 100644
--- a/dlls/wined3d/query.c
+++ b/dlls/wined3d/query.c
@@ -275,10 +275,14 @@ ULONG CDECL wined3d_query_decref(struct wined3d_query *query)
@@ -297,10 +297,14 @@ ULONG CDECL wined3d_query_decref(struct wined3d_query *query)
HRESULT CDECL wined3d_query_get_data(struct wined3d_query *query,
void *data, UINT data_size, DWORD flags)
{
@ -134,7 +134,7 @@ index 3e29967..ce75141 100644
}
UINT CDECL wined3d_query_get_data_size(const struct wined3d_query *query)
@@ -292,7 +296,7 @@ HRESULT CDECL wined3d_query_issue(struct wined3d_query *query, DWORD flags)
@@ -314,7 +318,7 @@ HRESULT CDECL wined3d_query_issue(struct wined3d_query *query, DWORD flags)
{
TRACE("query %p, flags %#x.\n", query, flags);
@ -144,10 +144,10 @@ index 3e29967..ce75141 100644
}
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index ffa7b1e..73695b7 100644
index 525cb01..d554882 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2976,6 +2976,10 @@ void *wined3d_cs_emit_texture_map(struct wined3d_cs *cs, struct wined3d_texture
@@ -3136,6 +3136,10 @@ void *wined3d_cs_emit_texture_map(struct wined3d_cs *cs, struct wined3d_texture
unsigned int sub_resource_idx, DWORD flags) DECLSPEC_HIDDEN;
void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture *texture,
unsigned int sub_resource_idx) DECLSPEC_HIDDEN;
@ -156,8 +156,8 @@ index ffa7b1e..73695b7 100644
+void wined3d_cs_emit_query_get_data(struct wined3d_cs *cs, struct wined3d_query *query, void *data,
+ UINT data_size, DWORD flags, HRESULT *ret) 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
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
* fixed function semantics as D3DCOLOR or FLOAT16 */
--
2.8.0

View File

@ -1,4 +1,4 @@
From 19973f7d9cae28bd2b2e3dcd80dd7ad50d85d847 Mon Sep 17 00:00:00 2001
From 1149a8cf01cf52bca052748213958c0623829b1e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Sat, 6 Jul 2013 18:31:41 +0200
Subject: wined3d: Check our CS state to find out if a query is done
@ -6,14 +6,14 @@ Subject: wined3d: Check our CS state to find out if a query is done
---
dlls/wined3d/cs.c | 6 +++++-
dlls/wined3d/query.c | 9 +++++++++
dlls/wined3d/wined3d_private.h | 2 ++
3 files changed, 16 insertions(+), 1 deletion(-)
dlls/wined3d/wined3d_private.h | 1 +
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index d080127..2bcabbf 100644
index 4aaf259..94232db 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -1814,8 +1814,12 @@ void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture
@@ -1985,8 +1985,12 @@ void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture
static UINT wined3d_cs_exec_query_issue(struct wined3d_cs *cs, const void *data)
{
const struct wined3d_cs_query_issue *op = data;
@ -28,10 +28,10 @@ index d080127..2bcabbf 100644
return sizeof(*op);
}
diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
index ce75141..a9367e4 100644
index f656bd1..7e7c993 100644
--- a/dlls/wined3d/query.c
+++ b/dlls/wined3d/query.c
@@ -279,6 +279,12 @@ HRESULT CDECL wined3d_query_get_data(struct wined3d_query *query,
@@ -301,6 +301,12 @@ HRESULT CDECL wined3d_query_get_data(struct wined3d_query *query,
TRACE("query %p, data %p, data_size %u, flags %#x.\n",
query, data, data_size, flags);
@ -44,7 +44,7 @@ index ce75141..a9367e4 100644
wined3d_cs_emit_query_get_data(query->device->cs, query, data, data_size,
flags, &hr);
@@ -296,6 +302,9 @@ HRESULT CDECL wined3d_query_issue(struct wined3d_query *query, DWORD flags)
@@ -318,6 +324,9 @@ HRESULT CDECL wined3d_query_issue(struct wined3d_query *query, DWORD flags)
{
TRACE("query %p, flags %#x.\n", query, flags);
@ -55,18 +55,17 @@ index ce75141..a9367e4 100644
return WINED3D_OK;
}
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 73695b7..552a3a3 100644
index d554882..2aa2623 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3008,6 +3008,8 @@ struct wined3d_query
@@ -1395,6 +1395,7 @@ struct wined3d_query
enum wined3d_query_type type;
DWORD data_size;
void *extendedData;
+
+ LONG counter_main, counter_worker;
};
const struct wined3d_query_ops *query_ops;
+ LONG counter_main, counter_worker;
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
void *extendedData;
};
--
2.8.0

View File

@ -1,13 +1,13 @@
From 553e8c8b1abe7da6cb7c62a15f5c314793defaf2 Mon Sep 17 00:00:00 2001
From 5c86878b28887e4f38ca371c1006e4ee47d53525 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Sat, 6 Jul 2013 19:18:48 +0200
Subject: wined3d: Poll queries automatically in the CS
---
dlls/wined3d/cs.c | 76 ++++++--------
dlls/wined3d/query.c | 223 +++++++++++++++++++++++++++--------------
dlls/wined3d/query.c | 224 +++++++++++++++++++++++++++--------------
dlls/wined3d/wined3d_private.h | 7 +-
3 files changed, 185 insertions(+), 121 deletions(-)
3 files changed, 186 insertions(+), 121 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 94232db..213943f 100644
@ -143,10 +143,18 @@ index 94232db..213943f 100644
{
continue;
diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
index 2357f9e..f41370e 100644
index 7e7c993..262295f 100644
--- a/dlls/wined3d/query.c
+++ b/dlls/wined3d/query.c
@@ -272,7 +272,18 @@ ULONG CDECL wined3d_query_decref(struct wined3d_query *query)
@@ -35,6 +35,7 @@ static void wined3d_query_init(struct wined3d_query *query, struct wined3d_devic
query->type = type;
query->data_size = data_size;
query->query_ops = query_ops;
+ list_init(&query->poll_list_entry);
}
static struct wined3d_event_query *wined3d_event_query_from_query(struct wined3d_query *query)
@@ -289,7 +290,18 @@ ULONG CDECL wined3d_query_decref(struct wined3d_query *query)
TRACE("%p decreasing refcount to %u.\n", query, refcount);
if (!refcount)
@ -165,7 +173,7 @@ index 2357f9e..f41370e 100644
return refcount;
}
@@ -280,20 +291,10 @@ ULONG CDECL wined3d_query_decref(struct wined3d_query *query)
@@ -297,20 +309,10 @@ ULONG CDECL wined3d_query_decref(struct wined3d_query *query)
HRESULT CDECL wined3d_query_get_data(struct wined3d_query *query,
void *data, UINT data_size, DWORD flags)
{
@ -187,7 +195,7 @@ index 2357f9e..f41370e 100644
}
UINT CDECL wined3d_query_get_data_size(const struct wined3d_query *query)
@@ -323,14 +324,7 @@ static HRESULT wined3d_occlusion_query_ops_get_data(struct wined3d_query *query,
@@ -340,14 +342,7 @@ static HRESULT wined3d_occlusion_query_ops_get_data(struct wined3d_query *query,
void *data, DWORD size, DWORD flags)
{
struct wined3d_occlusion_query *oq = query->extendedData;
@ -202,7 +210,7 @@ index 2357f9e..f41370e 100644
if (!oq->context)
query->state = QUERY_CREATED;
@@ -344,6 +338,8 @@ static HRESULT wined3d_occlusion_query_ops_get_data(struct wined3d_query *query,
@@ -361,6 +356,8 @@ static HRESULT wined3d_occlusion_query_ops_get_data(struct wined3d_query *query,
return S_OK;
}
@ -211,7 +219,7 @@ index 2357f9e..f41370e 100644
if (query->state == QUERY_BUILDING)
{
/* Msdn says this returns an error, but our tests show that S_FALSE is returned */
@@ -351,12 +347,37 @@ static HRESULT wined3d_occlusion_query_ops_get_data(struct wined3d_query *query,
@@ -368,12 +365,37 @@ static HRESULT wined3d_occlusion_query_ops_get_data(struct wined3d_query *query,
return S_FALSE;
}
@ -252,7 +260,7 @@ index 2357f9e..f41370e 100644
}
context = context_acquire(device, context_get_rt_surface(oq->context));
@@ -367,61 +388,71 @@ static HRESULT wined3d_occlusion_query_ops_get_data(struct wined3d_query *query,
@@ -384,61 +406,71 @@ static HRESULT wined3d_occlusion_query_ops_get_data(struct wined3d_query *query,
if (available)
{
@ -286,15 +294,15 @@ index 2357f9e..f41370e 100644
- void *data, DWORD size, DWORD flags)
+static BOOL wined3d_event_query_ops_poll(struct wined3d_query *query)
{
struct wined3d_event_query *event_query = query->extendedData;
- BOOL signaled;
struct wined3d_event_query *event_query = wined3d_event_query_from_query(query);
enum wined3d_event_query_result ret;
- BOOL signaled;
-
- TRACE("query %p, data %p, size %#x, flags %#x.\n", query, data, size, flags);
-
- if (!data || !size)
- return S_OK;
-
ret = wined3d_event_query_test(event_query, query->device);
switch(ret)
{
@ -352,7 +360,7 @@ index 2357f9e..f41370e 100644
return S_OK;
}
@@ -542,33 +573,57 @@ static HRESULT wined3d_timestamp_query_ops_get_data(struct wined3d_query *query,
@@ -558,33 +590,57 @@ static HRESULT wined3d_timestamp_query_ops_get_data(struct wined3d_query *query,
void *data, DWORD size, DWORD flags)
{
struct wined3d_timestamp_query *tq = query->extendedData;
@ -425,7 +433,7 @@ index 2357f9e..f41370e 100644
}
context = context_acquire(device, context_get_rt_surface(tq->context));
@@ -579,23 +634,20 @@ static HRESULT wined3d_timestamp_query_ops_get_data(struct wined3d_query *query,
@@ -595,23 +651,20 @@ static HRESULT wined3d_timestamp_query_ops_get_data(struct wined3d_query *query,
if (available)
{
@ -456,7 +464,7 @@ index 2357f9e..f41370e 100644
}
static void wined3d_timestamp_query_ops_issue(struct wined3d_query *query, DWORD flags)
@@ -638,7 +690,6 @@ static HRESULT wined3d_timestamp_disjoint_query_ops_get_data(struct wined3d_quer
@@ -645,7 +698,6 @@ static HRESULT wined3d_timestamp_disjoint_query_ops_get_data(struct wined3d_quer
void *data, DWORD size, DWORD flags)
{
TRACE("query %p, data %p, size %#x, flags %#x.\n", query, data, size, flags);
@ -464,7 +472,7 @@ index 2357f9e..f41370e 100644
if (query->type == WINED3D_QUERY_TYPE_TIMESTAMP_DISJOINT)
{
static const struct wined3d_query_data_timestamp_disjoint disjoint_data = {1000 * 1000 * 1000, FALSE};
@@ -660,6 +711,11 @@ static HRESULT wined3d_timestamp_disjoint_query_ops_get_data(struct wined3d_quer
@@ -667,6 +719,11 @@ static HRESULT wined3d_timestamp_disjoint_query_ops_get_data(struct wined3d_quer
return S_OK;
}
@ -476,7 +484,7 @@ index 2357f9e..f41370e 100644
static void wined3d_timestamp_disjoint_query_ops_issue(struct wined3d_query *query, DWORD flags)
{
TRACE("query %p, flags %#x.\n", query, flags);
@@ -682,6 +738,11 @@ static HRESULT wined3d_statistics_query_ops_get_data(struct wined3d_query *query
@@ -689,6 +746,11 @@ static HRESULT wined3d_statistics_query_ops_get_data(struct wined3d_query *query
return S_OK;
}
@ -488,7 +496,7 @@ index 2357f9e..f41370e 100644
static void wined3d_statistics_query_ops_issue(struct wined3d_query *query, DWORD flags)
{
FIXME("query %p, flags %#x.\n", query, flags);
@@ -699,6 +760,11 @@ static HRESULT wined3d_overflow_query_ops_get_data(struct wined3d_query *query,
@@ -706,6 +768,11 @@ static HRESULT wined3d_overflow_query_ops_get_data(struct wined3d_query *query,
return S_OK;
}
@ -500,7 +508,7 @@ index 2357f9e..f41370e 100644
static void wined3d_overflow_query_ops_issue(struct wined3d_query *query, DWORD flags)
{
FIXME("query %p, flags %#x.\n", query, flags);
@@ -707,36 +773,42 @@ static void wined3d_overflow_query_ops_issue(struct wined3d_query *query, DWORD
@@ -714,6 +781,7 @@ static void wined3d_overflow_query_ops_issue(struct wined3d_query *query, DWORD
static const struct wined3d_query_ops event_query_ops =
{
wined3d_event_query_ops_get_data,
@ -508,6 +516,7 @@ index 2357f9e..f41370e 100644
wined3d_event_query_ops_issue,
};
@@ -745,30 +813,35 @@ static HRESULT wined3d_event_query_create(struct wined3d_device *device,
static const struct wined3d_query_ops occlusion_query_ops =
{
wined3d_occlusion_query_ops_get_data,
@ -543,7 +552,7 @@ index 2357f9e..f41370e 100644
wined3d_overflow_query_ops_issue
};
@@ -848,6 +920,7 @@ static HRESULT query_init(struct wined3d_query *query, struct wined3d_device *de
@@ -863,6 +936,7 @@ static HRESULT query_init(struct wined3d_query *query, struct wined3d_device *de
query->state = QUERY_CREATED;
query->device = device;
query->ref = 1;
@ -552,34 +561,10 @@ index 2357f9e..f41370e 100644
return WINED3D_OK;
}
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index f8d1ed1..a41aad8 100644
index 2aa2623..db946cc 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -1374,6 +1374,7 @@ struct wined3d_occlusion_query
struct list entry;
GLuint id;
struct wined3d_context *context;
+ DWORD samples;
};
union wined3d_gl_query_object
@@ -1409,6 +1410,7 @@ struct wined3d_timestamp_query
struct list entry;
GLuint id;
struct wined3d_context *context;
+ UINT64 timestamp;
};
void context_alloc_timestamp_query(struct wined3d_context *context, struct wined3d_timestamp_query *query) DECLSPEC_HIDDEN;
@@ -3024,6 +3026,7 @@ struct wined3d_cs
struct wined3d_cs_queue queue;
LONG pending_presents;
+ struct list query_poll_list;
};
struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device) DECLSPEC_HIDDEN;
@@ -3122,6 +3125,7 @@ enum query_state {
@@ -1382,6 +1382,7 @@ enum wined3d_query_state
struct wined3d_query_ops
{
HRESULT (*query_get_data)(struct wined3d_query *query, void *data, DWORD data_size, DWORD flags);
@ -587,16 +572,40 @@ index f8d1ed1..a41aad8 100644
void (*query_issue)(struct wined3d_query *query, DWORD flags);
};
@@ -3137,7 +3141,8 @@ struct wined3d_query
@@ -1395,7 +1396,8 @@ struct wined3d_query
enum wined3d_query_type type;
DWORD data_size;
void *extendedData;
const struct wined3d_query_ops *query_ops;
- LONG counter_main, counter_worker;
+ LONG counter_main, counter_retrieved;
+ struct list poll_list_entry;
- LONG counter_main, counter_worker;
+ LONG counter_main, counter_retrieved;
+ struct list poll_list_entry;
void *extendedData;
};
@@ -1405,6 +1407,7 @@ struct wined3d_occlusion_query
struct list entry;
GLuint id;
struct wined3d_context *context;
+ DWORD samples;
};
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
union wined3d_gl_query_object
@@ -1442,6 +1445,7 @@ struct wined3d_timestamp_query
struct list entry;
GLuint id;
struct wined3d_context *context;
+ UINT64 timestamp;
};
void context_alloc_timestamp_query(struct wined3d_context *context, struct wined3d_timestamp_query *query) DECLSPEC_HIDDEN;
@@ -3057,6 +3061,7 @@ struct wined3d_cs
struct wined3d_cs_queue queue;
LONG pending_presents;
+ struct list query_poll_list;
};
struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device) DECLSPEC_HIDDEN;
--
2.8.0

View File

@ -1,4 +1,4 @@
From fe785b9c3faa38f33c228d45582d799641848378 Mon Sep 17 00:00:00 2001
From 56b4e37209099adf0c6304ac1eeef6cbb367cc1f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Wed, 24 Jul 2013 16:34:17 +0200
Subject: wined3d: Separate main and worker thread query state
@ -9,10 +9,10 @@ Subject: wined3d: Separate main and worker thread query state
2 files changed, 13 insertions(+), 21 deletions(-)
diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
index acdaa0d..d469857 100644
index 6147cb4..e3ec9be 100644
--- a/dlls/wined3d/query.c
+++ b/dlls/wined3d/query.c
@@ -304,6 +304,12 @@ HRESULT CDECL wined3d_query_issue(struct wined3d_query *query, DWORD flags)
@@ -321,6 +321,12 @@ HRESULT CDECL wined3d_query_issue(struct wined3d_query *query, DWORD flags)
query->counter_main++;
wined3d_cs_emit_query_issue(query->device->cs, query, flags);
@ -25,8 +25,8 @@ index acdaa0d..d469857 100644
return WINED3D_OK;
}
@@ -479,11 +485,6 @@ static void wined3d_event_query_ops_issue(struct wined3d_query *query, DWORD fla
/* Started implicitly at device creation */
@@ -495,11 +501,6 @@ static void wined3d_event_query_ops_issue(struct wined3d_query *query, DWORD fla
/* Started implicitly at query creation. */
ERR("Event query issued with START flag - what to do?\n");
}
-
@ -37,7 +37,7 @@ index acdaa0d..d469857 100644
}
static void wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DWORD flags)
@@ -499,7 +500,7 @@ static void wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DWORD
@@ -515,7 +516,7 @@ static void wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DWORD
* restart. */
if (flags & WINED3DISSUE_BEGIN)
{
@ -46,7 +46,7 @@ index acdaa0d..d469857 100644
{
if (oq->context->tid != GetCurrentThreadId())
{
@@ -529,13 +530,14 @@ static void wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DWORD
@@ -545,13 +546,14 @@ static void wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DWORD
checkGLcall("glBeginQuery()");
context_release(context);
@ -62,7 +62,7 @@ index acdaa0d..d469857 100644
{
if (oq->context->tid != GetCurrentThreadId())
{
@@ -551,13 +553,9 @@ static void wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DWORD
@@ -567,13 +569,9 @@ static void wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DWORD
context_release(context);
}
}
@ -77,7 +77,7 @@ index acdaa0d..d469857 100644
return;
}
@@ -664,8 +662,6 @@ static void wined3d_timestamp_query_ops_issue(struct wined3d_query *query, DWORD
@@ -680,8 +678,6 @@ static void wined3d_timestamp_query_ops_issue(struct wined3d_query *query, DWORD
GL_EXTCALL(glQueryCounter(tq->id, GL_TIMESTAMP));
checkGLcall("glQueryCounter()");
context_release(context);
@ -86,7 +86,7 @@ index acdaa0d..d469857 100644
}
}
@@ -702,11 +698,6 @@ static BOOL wined3d_timestamp_disjoint_query_ops_poll(struct wined3d_query *quer
@@ -718,11 +714,6 @@ static BOOL wined3d_timestamp_disjoint_query_ops_poll(struct wined3d_query *quer
static void wined3d_timestamp_disjoint_query_ops_issue(struct wined3d_query *query, DWORD flags)
{
TRACE("query %p, flags %#x.\n", query, flags);
@ -98,7 +98,7 @@ index acdaa0d..d469857 100644
}
static HRESULT wined3d_statistics_query_ops_get_data(struct wined3d_query *query,
@@ -813,13 +804,13 @@ static HRESULT query_init(struct wined3d_query *query, struct wined3d_device *de
@@ -854,13 +845,13 @@ static HRESULT query_init(struct wined3d_query *query, struct wined3d_device *de
}
query->query_ops = &occlusion_query_ops;
query->data_size = sizeof(DWORD);
@ -113,12 +113,12 @@ index acdaa0d..d469857 100644
- ((struct wined3d_occlusion_query *)query->extendedData)->context = NULL;
break;
case WINED3D_QUERY_TYPE_EVENT:
case WINED3D_QUERY_TYPE_SO_STATISTICS:
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 3d05e42..d9d0b63 100644
index bbc9eea..e81ebc6 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -1375,6 +1375,7 @@ struct wined3d_occlusion_query
@@ -1408,6 +1408,7 @@ struct wined3d_occlusion_query
GLuint id;
struct wined3d_context *context;
DWORD samples;

View File

@ -1,4 +1,4 @@
From e032a3b18797783a291ff0cc53900d2461612c5f Mon Sep 17 00:00:00 2001
From c7d7d750b08d361b93070b5064aa69c6089a6d37 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Wed, 24 Jul 2013 17:27:35 +0200
Subject: wined3d: Don't poll queries that failed to start
@ -28,10 +28,10 @@ index 2f66eff..7178624 100644
list_add_tail(&cs->query_poll_list, &query->poll_list_entry);
diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
index d469857..b7d3da2 100644
index e3ec9be..dd81df0 100644
--- a/dlls/wined3d/query.c
+++ b/dlls/wined3d/query.c
@@ -469,7 +469,7 @@ enum wined3d_query_type CDECL wined3d_query_get_type(const struct wined3d_query
@@ -486,7 +486,7 @@ enum wined3d_query_type CDECL wined3d_query_get_type(const struct wined3d_query
return query->type;
}
@ -40,15 +40,15 @@ index d469857..b7d3da2 100644
{
TRACE("query %p, flags %#x.\n", query, flags);
@@ -479,20 +479,23 @@ static void wined3d_event_query_ops_issue(struct wined3d_query *query, DWORD fla
struct wined3d_event_query *event_query = query->extendedData;
@@ -495,20 +495,23 @@ static void wined3d_event_query_ops_issue(struct wined3d_query *query, DWORD fla
struct wined3d_event_query *event_query = wined3d_event_query_from_query(query);
wined3d_event_query_issue(event_query, query->device);
+ return TRUE;
}
else if (flags & WINED3DISSUE_BEGIN)
{
/* Started implicitly at device creation */
/* Started implicitly at query creation. */
ERR("Event query issued with START flag - what to do?\n");
}
+ return FALSE;
@ -65,7 +65,7 @@ index d469857..b7d3da2 100644
TRACE("query %p, flags %#x.\n", query, flags);
@@ -554,9 +557,10 @@ static void wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DWORD
@@ -570,9 +573,10 @@ static void wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DWORD
}
}
oq->started = FALSE;
@ -77,7 +77,7 @@ index d469857..b7d3da2 100644
}
static HRESULT wined3d_timestamp_query_ops_get_data(struct wined3d_query *query,
@@ -640,7 +644,7 @@ static BOOL wined3d_timestamp_query_ops_poll(struct wined3d_query *query)
@@ -656,7 +660,7 @@ static BOOL wined3d_timestamp_query_ops_poll(struct wined3d_query *query)
return ret;
}
@ -86,7 +86,7 @@ index d469857..b7d3da2 100644
{
struct wined3d_timestamp_query *tq = query->extendedData;
struct wined3d_device *device = query->device;
@@ -663,6 +667,10 @@ static void wined3d_timestamp_query_ops_issue(struct wined3d_query *query, DWORD
@@ -679,6 +683,10 @@ static void wined3d_timestamp_query_ops_issue(struct wined3d_query *query, DWORD
checkGLcall("glQueryCounter()");
context_release(context);
}
@ -97,7 +97,7 @@ index d469857..b7d3da2 100644
}
static HRESULT wined3d_timestamp_disjoint_query_ops_get_data(struct wined3d_query *query,
@@ -695,9 +703,10 @@ static BOOL wined3d_timestamp_disjoint_query_ops_poll(struct wined3d_query *quer
@@ -711,9 +719,10 @@ static BOOL wined3d_timestamp_disjoint_query_ops_poll(struct wined3d_query *quer
return TRUE;
}
@ -109,7 +109,7 @@ index d469857..b7d3da2 100644
}
static HRESULT wined3d_statistics_query_ops_get_data(struct wined3d_query *query,
@@ -717,9 +726,10 @@ static BOOL wined3d_statistics_query_ops_poll(struct wined3d_query *query)
@@ -733,9 +742,10 @@ static BOOL wined3d_statistics_query_ops_poll(struct wined3d_query *query)
return TRUE;
}
@ -121,7 +121,7 @@ index d469857..b7d3da2 100644
}
static HRESULT wined3d_overflow_query_ops_get_data(struct wined3d_query *query,
@@ -739,9 +749,10 @@ static BOOL wined3d_overflow_query_ops_poll(struct wined3d_query *query)
@@ -755,9 +765,10 @@ static BOOL wined3d_overflow_query_ops_poll(struct wined3d_query *query)
return TRUE;
}
@ -134,10 +134,10 @@ index d469857..b7d3da2 100644
static const struct wined3d_query_ops event_query_ops =
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index d9d0b63..91b343c 100644
index e81ebc6..277d891 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3130,7 +3130,7 @@ struct wined3d_query_ops
@@ -1383,7 +1383,7 @@ struct wined3d_query_ops
{
HRESULT (*query_get_data)(struct wined3d_query *query, void *data, DWORD data_size, DWORD flags);
BOOL (*query_poll)(struct wined3d_query *query);

View File

@ -1,4 +1,4 @@
From c4394ed6817eddd3c0ca2c516173ddc84638ec7c Mon Sep 17 00:00:00 2001
From 8fa73a39c4748e5c8a8ca00984fab4fbe740a806 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 1 Aug 2013 00:10:40 +0200
Subject: wined3d: Send texture preloads through the CS
@ -10,7 +10,7 @@ Subject: wined3d: Send texture preloads through the CS
3 files changed, 35 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index f8d7928..66c2f62 100644
index 72c83f5..e115a28 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -70,6 +70,7 @@ enum wined3d_cs_op
@ -34,7 +34,7 @@ index f8d7928..66c2f62 100644
static void wined3d_cs_mt_submit(struct wined3d_cs *cs, size_t size)
{
LONG new_val = (cs->queue.head + size) & (WINED3D_CS_QUEUE_SIZE - 1);
@@ -1898,6 +1905,30 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
@@ -2030,6 +2037,30 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
cs->ops->submit(cs, sizeof(*op));
}
@ -65,7 +65,7 @@ index f8d7928..66c2f62 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
@@ -1946,6 +1977,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2078,6 +2109,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_TEXTURE_MAP */ wined3d_cs_exec_texture_map,
/* WINED3D_CS_OP_TEXTURE_UNMAP */ wined3d_cs_exec_texture_unmap,
/* WINED3D_CS_OP_QUERY_ISSUE */ wined3d_cs_exec_query_issue,
@ -74,10 +74,10 @@ index f8d7928..66c2f62 100644
static inline void *_wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size, BOOL prio)
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index e220474..094d707 100644
index e239282..f650cd9 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -894,10 +894,8 @@ void wined3d_texture_load(struct wined3d_texture *texture,
@@ -920,10 +920,8 @@ void wined3d_texture_load(struct wined3d_texture *texture,
void CDECL wined3d_texture_preload(struct wined3d_texture *texture)
{
@ -91,17 +91,17 @@ index e220474..094d707 100644
void * CDECL wined3d_texture_get_parent(const struct wined3d_texture *texture)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index c468a7f..eedaccc 100644
index 277d891..0c968d2 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3048,6 +3048,7 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
@@ -3150,6 +3150,7 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
DWORD flags) DECLSPEC_HIDDEN;
void wined3d_cs_emit_query_get_data(struct wined3d_cs *cs, struct wined3d_query *query, void *data,
UINT data_size, DWORD flags, HRESULT *ret) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_texture_preload(struct wined3d_cs *cs, struct wined3d_texture *texture) 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
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
* fixed function semantics as D3DCOLOR or FLOAT16 */
--
2.8.0

View File

@ -1,4 +1,4 @@
From 59ad07b3a1737ba2cb291ceb967840ed999e63ba Mon Sep 17 00:00:00 2001
From 5022da3bf443b3ff8e74cb13a23e2bc1aeab0e77 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 1 Aug 2013 00:33:48 +0200
Subject: wined3d: Send update_texture calls through the CS
@ -11,7 +11,7 @@ FIXME: This logic duplication is ugly.
3 files changed, 137 insertions(+), 82 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 66c2f62..39f6978 100644
index e115a28..aa66603 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -71,6 +71,7 @@ enum wined3d_cs_op
@ -35,7 +35,7 @@ index 66c2f62..39f6978 100644
static void wined3d_cs_mt_submit(struct wined3d_cs *cs, size_t size)
{
LONG new_val = (cs->queue.head + size) & (WINED3D_CS_QUEUE_SIZE - 1);
@@ -1929,6 +1936,31 @@ void wined3d_cs_emit_texture_preload(struct wined3d_cs *cs, struct wined3d_textu
@@ -2061,6 +2068,31 @@ void wined3d_cs_emit_texture_preload(struct wined3d_cs *cs, struct wined3d_textu
cs->ops->submit(cs, sizeof(*op));
}
@ -67,7 +67,7 @@ index 66c2f62..39f6978 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
@@ -1978,6 +2010,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2110,6 +2142,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_TEXTURE_UNMAP */ wined3d_cs_exec_texture_unmap,
/* WINED3D_CS_OP_QUERY_ISSUE */ wined3d_cs_exec_query_issue,
/* WINED3D_CS_OP_TEXTURE_PRELOAD */ wined3d_cs_exec_texture_preload,
@ -76,7 +76,7 @@ index 66c2f62..39f6978 100644
static inline void *_wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size, BOOL prio)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 903b091..6dc0a25 100644
index c5f20c9..ad8e7c6 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -3532,34 +3532,17 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device
@ -319,10 +319,10 @@ index 903b091..6dc0a25 100644
HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device, DWORD *num_passes)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 25f1ec9..769a970 100644
index 2565a16..47fdc9e 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2435,6 +2435,8 @@ void device_resource_add(struct wined3d_device *device, struct wined3d_resource
@@ -2521,6 +2521,8 @@ void device_resource_add(struct wined3d_device *device, struct wined3d_resource
void device_resource_released(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
void device_invalidate_state(const struct wined3d_device *device, DWORD state) DECLSPEC_HIDDEN;
void device_invalidate_shader_constants(const struct wined3d_device *device, DWORD mask) DECLSPEC_HIDDEN;
@ -331,15 +331,15 @@ index 25f1ec9..769a970 100644
static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD state)
{
@@ -3049,6 +3051,8 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
@@ -3151,6 +3153,8 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
void wined3d_cs_emit_query_get_data(struct wined3d_cs *cs, struct wined3d_query *query, void *data,
UINT data_size, DWORD flags, HRESULT *ret) DECLSPEC_HIDDEN;
void wined3d_cs_emit_texture_preload(struct wined3d_cs *cs, struct wined3d_texture *texture) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_texture *src,
+ struct wined3d_texture *dst) 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
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
* fixed function semantics as D3DCOLOR or FLOAT16 */
--
2.8.0

View File

@ -1,4 +1,4 @@
From 81ddb7588fa1f7dde51cfffea7c95287bd9e933b Mon Sep 17 00:00:00 2001
From ca779bf66fca8a4f62db32a30cc895def00cd4ed Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Tue, 6 Aug 2013 13:50:31 +0200
Subject: wined3d: Handle evit_managed_resources through the CS
@ -10,7 +10,7 @@ Subject: wined3d: Handle evit_managed_resources through the CS
3 files changed, 41 insertions(+), 11 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 39f6978..f33cfa8 100644
index aa66603..5d5ddbb 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -72,6 +72,7 @@ enum wined3d_cs_op
@ -34,7 +34,7 @@ index 39f6978..f33cfa8 100644
static void wined3d_cs_mt_submit(struct wined3d_cs *cs, size_t size)
{
LONG new_val = (cs->queue.head + size) & (WINED3D_CS_QUEUE_SIZE - 1);
@@ -1961,6 +1968,35 @@ void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_textur
@@ -2093,6 +2100,35 @@ void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_textur
cs->ops->submit(cs, sizeof(*op));
}
@ -70,7 +70,7 @@ index 39f6978..f33cfa8 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
@@ -2011,6 +2047,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2143,6 +2179,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_QUERY_ISSUE */ wined3d_cs_exec_query_issue,
/* WINED3D_CS_OP_TEXTURE_PRELOAD */ wined3d_cs_exec_texture_preload,
/* WINED3D_CS_OP_UPDATE_TEXTURE */ wined3d_cs_exec_update_texture,
@ -79,7 +79,7 @@ index 39f6978..f33cfa8 100644
static inline void *_wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size, BOOL prio)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 6c274c8..eed3623 100644
index a4dd9fb..fd866ad 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -4540,13 +4540,8 @@ void CDECL wined3d_device_evict_managed_resources(struct wined3d_device *device)
@ -113,17 +113,17 @@ index 6c274c8..eed3623 100644
static void delete_opengl_contexts(struct wined3d_device *device, struct wined3d_swapchain *swapchain)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 769a970..8d991e1 100644
index 47fdc9e..d823040 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3053,6 +3053,7 @@ void wined3d_cs_emit_query_get_data(struct wined3d_cs *cs, struct wined3d_query
@@ -3155,6 +3155,7 @@ void wined3d_cs_emit_query_get_data(struct wined3d_cs *cs, struct wined3d_query
void wined3d_cs_emit_texture_preload(struct wined3d_cs *cs, struct wined3d_texture *texture) DECLSPEC_HIDDEN;
void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_texture *src,
struct wined3d_texture *dst) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_evict_resource(struct wined3d_cs *cs, struct wined3d_resource *resource) 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
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
* fixed function semantics as D3DCOLOR or FLOAT16 */
--
2.8.0

View File

@ -1,4 +1,4 @@
From f62b207de4d86a8ba4beec9d2da748a78e778ac5 Mon Sep 17 00:00:00 2001
From 9d6b9f329a6674d90617333f95b452fda08c08ed Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Fri, 4 Sep 2015 15:22:49 +0200
Subject: wined3d: Send update_sub_resource calls through the command stream.
@ -10,7 +10,7 @@ Subject: wined3d: Send update_sub_resource calls through the command stream.
3 files changed, 105 insertions(+), 46 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 5ec5fc5..2187005 100644
index 3ffefd4..e4f1a87 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -73,6 +73,7 @@ enum wined3d_cs_op
@ -21,7 +21,7 @@ index 5ec5fc5..2187005 100644
WINED3D_CS_OP_STOP,
};
@@ -411,6 +412,15 @@ struct wined3d_cs_evict_resource
@@ -417,6 +418,15 @@ struct wined3d_cs_evict_resource
struct wined3d_resource *resource;
};
@ -37,7 +37,7 @@ index 5ec5fc5..2187005 100644
static void wined3d_cs_mt_submit(struct wined3d_cs *cs, size_t size)
{
LONG new_val = (cs->queue.head + size) & (WINED3D_CS_QUEUE_SIZE - 1);
@@ -2105,6 +2115,90 @@ void wined3d_cs_emit_evict_resource(struct wined3d_cs *cs, struct wined3d_resour
@@ -2167,6 +2177,90 @@ void wined3d_cs_emit_evict_resource(struct wined3d_cs *cs, struct wined3d_resour
cs->ops->submit(cs, sizeof(*op));
}
@ -128,7 +128,7 @@ index 5ec5fc5..2187005 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
@@ -2156,6 +2250,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2218,6 +2312,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_TEXTURE_PRELOAD */ wined3d_cs_exec_texture_preload,
/* WINED3D_CS_OP_UPDATE_TEXTURE */ wined3d_cs_exec_update_texture,
/* WINED3D_CS_OP_EVICT_RESOURCE */ wined3d_cs_exec_evict_resource,
@ -137,10 +137,10 @@ index 5ec5fc5..2187005 100644
static inline void *_wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size, BOOL prio)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 8dbefcf..0375480 100644
index fd866ad..79326f8 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -4038,14 +4038,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
@@ -4079,14 +4079,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
unsigned int depth_pitch)
{
struct wined3d_texture_sub_resource *sub_resource;
@ -155,7 +155,7 @@ index 8dbefcf..0375480 100644
TRACE("device %p, resource %p, sub_resource_idx %u, box %s, data %p, row_pitch %u, depth_pitch %u.\n",
device, resource, sub_resource_idx, debug_box(box), data, row_pitch, depth_pitch);
@@ -4079,16 +4072,15 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
@@ -4120,16 +4113,15 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
WARN("Invalid sub_resource_idx %u.\n", sub_resource_idx);
return;
}
@ -178,7 +178,7 @@ index 8dbefcf..0375480 100644
if (box->left >= box->right || box->right > width
|| box->top >= box->bottom || box->bottom > height
|| box->front >= box->back)
@@ -4096,40 +4088,9 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
@@ -4137,40 +4129,9 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
WARN("Invalid box %s specified.\n", debug_box(box));
return;
}
@ -221,10 +221,10 @@ index 8dbefcf..0375480 100644
HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *device,
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index f0fb633..7ce28b1 100644
index a23106e..a26123d 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3011,6 +3011,9 @@ void wined3d_cs_emit_texture_preload(struct wined3d_cs *cs, struct wined3d_textu
@@ -3157,6 +3157,9 @@ void wined3d_cs_emit_texture_preload(struct wined3d_cs *cs, struct wined3d_textu
void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_texture *src,
struct wined3d_texture *dst) DECLSPEC_HIDDEN;
void wined3d_cs_emit_evict_resource(struct wined3d_cs *cs, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
@ -232,8 +232,8 @@ index f0fb633..7ce28b1 100644
+ unsigned int sub_resource_idx, const struct wined3d_box *box, const void *data, unsigned int row_pitch,
+ unsigned int depth_pitch) 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
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
* fixed function semantics as D3DCOLOR or FLOAT16 */
--
2.8.0

View File

@ -1,4 +1,4 @@
From f39c194da347f4bece34f7bea45b6c53461818c0 Mon Sep 17 00:00:00 2001
From df11e80df5719fba6dea98957f2d763282e03704 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Sat, 6 Jul 2013 16:14:16 +0200
Subject: wined3d: Accelerate DISCARD buffer maps
@ -13,10 +13,10 @@ TODO3: Clean up the map_mem allocation mess.
3 files changed, 51 insertions(+), 3 deletions(-)
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
index 9b21e97..5c5c1da 100644
index 4cf3cdd..35deef8 100644
--- a/dlls/wined3d/buffer.c
+++ b/dlls/wined3d/buffer.c
@@ -1055,10 +1055,19 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
@@ -1060,10 +1060,19 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
buffer->flags |= WINED3D_BUFFER_SYNC;
}
@ -40,7 +40,7 @@ index 9b21e97..5c5c1da 100644
base = buffer->map_ptr ? buffer->map_ptr : buffer->resource.map_heap_memory;
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 640a5f8..cabb880 100644
index c7e47d8..366f641 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -70,6 +70,7 @@ enum wined3d_cs_op
@ -65,7 +65,7 @@ index 640a5f8..cabb880 100644
struct wined3d_cs_skip
{
enum wined3d_cs_op opcode;
@@ -2242,6 +2250,34 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
@@ -2295,6 +2303,34 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
cs->ops->finish(cs);
}
@ -100,7 +100,7 @@ index 640a5f8..cabb880 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
@@ -2290,6 +2326,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2343,6 +2379,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_TEXTURE_CHANGED */ wined3d_cs_exec_texture_changed,
/* WINED3D_CS_OP_TEXTURE_MAP */ wined3d_cs_exec_texture_map,
/* WINED3D_CS_OP_TEXTURE_UNMAP */ wined3d_cs_exec_texture_unmap,
@ -109,18 +109,18 @@ index 640a5f8..cabb880 100644
/* WINED3D_CS_OP_TEXTURE_PRELOAD */ wined3d_cs_exec_texture_preload,
/* WINED3D_CS_OP_UPDATE_TEXTURE */ wined3d_cs_exec_update_texture,
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index bb87b41..a6d438a 100644
index d463a81..1664282 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3093,6 +3093,8 @@ void wined3d_cs_emit_evict_resource(struct wined3d_cs *cs, struct wined3d_resour
@@ -3179,6 +3179,8 @@ void wined3d_cs_emit_evict_resource(struct wined3d_cs *cs, struct wined3d_resour
void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_resource *resource,
unsigned int sub_resource_idx, const struct wined3d_box *box, const void *data, unsigned int row_pitch,
unsigned int depth_pitch) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_buffer_swap_mem(struct wined3d_cs *cs, struct wined3d_buffer *buffer,
+ BYTE *mem) 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
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
* fixed function semantics as D3DCOLOR or FLOAT16 */
--
2.8.0

View File

@ -1,4 +1,4 @@
From 1250ebaa61f449f123ea6677416ea876cc3cb0b2 Mon Sep 17 00:00:00 2001
From cb5e6083d9ca441d24d7f96a20f40e35abb07c2e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Sat, 6 Jul 2013 17:05:12 +0200
Subject: wined3d: Access the buffer dirty areas through the CS
@ -27,7 +27,7 @@ be protected by locks.
3 files changed, 37 insertions(+), 3 deletions(-)
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
index 3a7ceeb..e51a87e 100644
index 2f049fc..e23ec3b 100644
--- a/dlls/wined3d/buffer.c
+++ b/dlls/wined3d/buffer.c
@@ -41,7 +41,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d);
@ -39,7 +39,7 @@ index 3a7ceeb..e51a87e 100644
{
if (!offset && (!size || size == buffer->resource.size))
goto invalidate_all;
@@ -978,9 +978,9 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
@@ -986,9 +986,9 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
* being uploaded in that case. Two such applications are Port Royale
* and Darkstar One. */
if (flags & WINED3D_MAP_DISCARD)
@ -52,7 +52,7 @@ index 3a7ceeb..e51a87e 100644
if (!(buffer->flags & WINED3D_BUFFER_DOUBLEBUFFER))
{
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index cabb880..2fa9077 100644
index 366f641..8869eff 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -71,6 +71,7 @@ enum wined3d_cs_op
@ -77,7 +77,7 @@ index cabb880..2fa9077 100644
struct wined3d_cs_skip
{
enum wined3d_cs_op opcode;
@@ -2278,6 +2286,28 @@ void wined3d_cs_emit_buffer_swap_mem(struct wined3d_cs *cs, struct wined3d_buffe
@@ -2331,6 +2339,28 @@ void wined3d_cs_emit_buffer_swap_mem(struct wined3d_cs *cs, struct wined3d_buffe
cs->ops->submit(cs, sizeof(*op));
}
@ -106,7 +106,7 @@ index cabb880..2fa9077 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
@@ -2327,6 +2357,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2380,6 +2410,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_TEXTURE_MAP */ wined3d_cs_exec_texture_map,
/* WINED3D_CS_OP_TEXTURE_UNMAP */ wined3d_cs_exec_texture_unmap,
/* WINED3D_CS_OP_BUFFER_SWAP_MEM */ wined3d_cs_exec_buffer_swap_mem,
@ -115,19 +115,19 @@ index cabb880..2fa9077 100644
/* WINED3D_CS_OP_TEXTURE_PRELOAD */ wined3d_cs_exec_texture_preload,
/* WINED3D_CS_OP_UPDATE_TEXTURE */ wined3d_cs_exec_update_texture,
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index a6d438a..97537a7 100644
index 1664282..e4996d7 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3095,6 +3095,8 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
@@ -3181,6 +3181,8 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
unsigned int depth_pitch) DECLSPEC_HIDDEN;
void wined3d_cs_emit_buffer_swap_mem(struct wined3d_cs *cs, struct wined3d_buffer *buffer,
BYTE *mem) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_buffer_invalidate_bo_range(struct wined3d_cs *cs,
+ struct wined3d_buffer *buffer, unsigned int offset, unsigned int size) 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
@@ -3182,6 +3184,7 @@ HRESULT wined3d_buffer_copy(struct wined3d_buffer *dst_buffer, unsigned int dst_
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
* fixed function semantics as D3DCOLOR or FLOAT16 */
@@ -3235,6 +3237,7 @@ HRESULT wined3d_buffer_copy(struct wined3d_buffer *dst_buffer, unsigned int dst_
struct wined3d_buffer *src_buffer, unsigned int src_offset, unsigned int size) DECLSPEC_HIDDEN;
HRESULT wined3d_buffer_upload_data(struct wined3d_buffer *buffer,
const struct wined3d_box *box, const void *data) DECLSPEC_HIDDEN;

View File

@ -1,4 +1,4 @@
From bddfb1096b5a073ab49a5daedecf8e7fb31d5804 Mon Sep 17 00:00:00 2001
From ccd145df2e90b499b04451e0d10e727bf5a78120 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Sun, 7 Jul 2013 12:02:59 +0200
Subject: wined3d: Send buffer preloads through the CS
@ -13,10 +13,10 @@ the dirty area list, have to be considered.
3 files changed, 33 insertions(+), 11 deletions(-)
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
index e652695..92f3833 100644
index 11a3c66..d0c21b2 100644
--- a/dlls/wined3d/buffer.c
+++ b/dlls/wined3d/buffer.c
@@ -925,7 +925,6 @@ void buffer_internal_preload(struct wined3d_buffer *buffer, struct wined3d_conte
@@ -933,7 +933,6 @@ void buffer_internal_preload(struct wined3d_buffer *buffer, struct wined3d_conte
void CDECL wined3d_buffer_preload(struct wined3d_buffer *buffer)
{
@ -24,7 +24,7 @@ index e652695..92f3833 100644
struct wined3d_device *device = buffer->resource.device;
if (buffer->resource.map_count)
@@ -934,16 +933,7 @@ void CDECL wined3d_buffer_preload(struct wined3d_buffer *buffer)
@@ -942,16 +941,7 @@ void CDECL wined3d_buffer_preload(struct wined3d_buffer *buffer)
return;
}
@ -43,7 +43,7 @@ index e652695..92f3833 100644
struct wined3d_resource * CDECL wined3d_buffer_get_resource(struct wined3d_buffer *buffer)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 2fa9077..6b409d8 100644
index 8869eff..c9370d4 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -72,6 +72,7 @@ enum wined3d_cs_op
@ -67,7 +67,7 @@ index 2fa9077..6b409d8 100644
static void wined3d_cs_mt_submit(struct wined3d_cs *cs, size_t size)
{
LONG new_val = (cs->queue.head + size) & (WINED3D_CS_QUEUE_SIZE - 1);
@@ -2308,6 +2315,29 @@ void wined3d_cs_emit_buffer_invalidate_bo_range(struct wined3d_cs *cs,
@@ -2361,6 +2368,29 @@ void wined3d_cs_emit_buffer_invalidate_bo_range(struct wined3d_cs *cs,
cs->ops->submit(cs, sizeof(*op));
}
@ -97,7 +97,7 @@ index 2fa9077..6b409d8 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
@@ -2358,6 +2388,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2411,6 +2441,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_TEXTURE_UNMAP */ wined3d_cs_exec_texture_unmap,
/* WINED3D_CS_OP_BUFFER_SWAP_MEM */ wined3d_cs_exec_buffer_swap_mem,
/* WINED3D_CS_OP_BUFFER_INVALIDATE_RANGE */ wined3d_cs_exec_buffer_invalidate_bo_range,
@ -106,17 +106,17 @@ index 2fa9077..6b409d8 100644
/* WINED3D_CS_OP_TEXTURE_PRELOAD */ wined3d_cs_exec_texture_preload,
/* WINED3D_CS_OP_UPDATE_TEXTURE */ wined3d_cs_exec_update_texture,
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 97537a7..0a9b962 100644
index e4996d7..8928819 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3097,6 +3097,7 @@ void wined3d_cs_emit_buffer_swap_mem(struct wined3d_cs *cs, struct wined3d_buffe
@@ -3183,6 +3183,7 @@ void wined3d_cs_emit_buffer_swap_mem(struct wined3d_cs *cs, struct wined3d_buffe
BYTE *mem) DECLSPEC_HIDDEN;
void wined3d_cs_emit_buffer_invalidate_bo_range(struct wined3d_cs *cs,
struct wined3d_buffer *buffer, unsigned int offset, unsigned int size) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_buffer_preload(struct wined3d_cs *cs, struct wined3d_buffer *buffer) 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
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
* fixed function semantics as D3DCOLOR or FLOAT16 */
--
2.8.0

View File

@ -1,4 +1,4 @@
From 9b3cf0aa76222ef02934a1689065411f5a2c3ac2 Mon Sep 17 00:00:00 2001
From bf3c76661ed644e19dc55141e3244f29e9bace4d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Wed, 2 Oct 2013 21:47:08 +0200
Subject: wined3d: Create VBOs through the command stream.
@ -11,7 +11,7 @@ A stop-gap solution to make fglrx happier until buffers are updated.
3 files changed, 37 insertions(+), 6 deletions(-)
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
index 5566c1e..b611daf 100644
index 646903a..cedd5c3 100644
--- a/dlls/wined3d/buffer.c
+++ b/dlls/wined3d/buffer.c
@@ -122,7 +122,7 @@ static void delete_gl_buffer(struct wined3d_buffer *This, const struct wined3d_g
@ -32,7 +32,7 @@ index 5566c1e..b611daf 100644
This->buffer_object_usage = gl_usage;
@@ -932,9 +930,7 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
@@ -940,9 +938,7 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
* on buffer creation won't work either. */
if (!buffer->buffer_object && buffer->flags & WINED3D_BUFFER_USE_BO)
{
@ -44,10 +44,10 @@ index 5566c1e..b611daf 100644
flags = wined3d_resource_sanitize_map_flags(&buffer->resource, flags);
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 477af0b..f501fa4 100644
index ac22a08..3d51e6c 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -79,6 +79,7 @@ enum wined3d_cs_op
@@ -78,6 +78,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_UPDATE_TEXTURE,
WINED3D_CS_OP_EVICT_RESOURCE,
WINED3D_CS_OP_UPDATE_SUB_RESOURCE,
@ -55,7 +55,7 @@ index 477af0b..f501fa4 100644
WINED3D_CS_OP_STOP,
};
@@ -467,6 +468,12 @@ struct wined3d_cs_buffer_preload
@@ -460,6 +461,12 @@ struct wined3d_cs_buffer_preload
struct wined3d_buffer *buffer;
};
@ -68,7 +68,7 @@ index 477af0b..f501fa4 100644
static void wined3d_cs_mt_submit(struct wined3d_cs *cs, size_t size)
{
LONG new_val = (cs->queue.head + size) & (WINED3D_CS_QUEUE_SIZE - 1);
@@ -2370,6 +2377,30 @@ void wined3d_cs_emit_buffer_preload(struct wined3d_cs *cs, struct wined3d_buffer
@@ -2396,6 +2403,30 @@ void wined3d_cs_emit_buffer_preload(struct wined3d_cs *cs, struct wined3d_buffer
cs->ops->submit(cs, sizeof(*op));
}
@ -99,7 +99,7 @@ index 477af0b..f501fa4 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
@@ -2427,6 +2458,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2452,6 +2483,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_UPDATE_TEXTURE */ wined3d_cs_exec_update_texture,
/* WINED3D_CS_OP_EVICT_RESOURCE */ wined3d_cs_exec_evict_resource,
/* WINED3D_CS_OP_UPDATE_SUB_RESOURCE */ wined3d_cs_exec_update_sub_resource,
@ -108,18 +108,18 @@ index 477af0b..f501fa4 100644
static inline void *_wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size, BOOL prio)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 399e310..012494d 100644
index b2fb28e..e3e718e 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3085,6 +3085,7 @@ void wined3d_cs_emit_buffer_swap_mem(struct wined3d_cs *cs, struct wined3d_buffe
@@ -3184,6 +3184,7 @@ void wined3d_cs_emit_buffer_swap_mem(struct wined3d_cs *cs, struct wined3d_buffe
void wined3d_cs_emit_buffer_invalidate_bo_range(struct wined3d_cs *cs,
struct wined3d_buffer *buffer, unsigned int offset, unsigned int size) DECLSPEC_HIDDEN;
void wined3d_cs_emit_buffer_preload(struct wined3d_cs *cs, struct wined3d_buffer *buffer) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_create_vbo(struct wined3d_cs *cs, struct wined3d_buffer *buffer) 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
@@ -3177,6 +3178,8 @@ HRESULT wined3d_buffer_upload_data(struct wined3d_buffer *buffer,
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
* fixed function semantics as D3DCOLOR or FLOAT16 */
@@ -3241,6 +3242,8 @@ HRESULT wined3d_buffer_upload_data(struct wined3d_buffer *buffer,
const struct wined3d_box *box, const void *data) DECLSPEC_HIDDEN;
void buffer_invalidate_bo_range(struct wined3d_buffer *buffer, unsigned int offset, unsigned int size) DECLSPEC_HIDDEN;
void buffer_swap_mem(struct wined3d_buffer *buffer, BYTE *mem) DECLSPEC_HIDDEN;

View File

@ -1,4 +1,4 @@
From 10e80fbfff5af4dd169e9d6f6292787639602ece Mon Sep 17 00:00:00 2001
From 159c9a54375ea6b1e35fb7de5c7dd8db15ba6809 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Sun, 16 Mar 2014 14:13:42 +0100
Subject: wined3d: Send getdc and releasedc through the command stream.
@ -11,7 +11,7 @@ Another hacky patch to avoid using GL outside the worker thread.
3 files changed, 113 insertions(+), 34 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 7344c4b..c48f5e3 100644
index 890c2a2..a8d1205 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -79,6 +79,8 @@ enum wined3d_cs_op
@ -37,7 +37,7 @@ index 7344c4b..c48f5e3 100644
static void wined3d_cs_mt_submit(struct wined3d_cs *cs, size_t size)
{
LONG new_val = (cs->queue.head + size) & (WINED3D_CS_QUEUE_SIZE - 1);
@@ -2396,6 +2405,52 @@ void wined3d_cs_emit_create_vbo(struct wined3d_cs *cs, struct wined3d_buffer *bu
@@ -2449,6 +2458,52 @@ void wined3d_cs_emit_create_vbo(struct wined3d_cs *cs, struct wined3d_buffer *bu
cs->ops->finish_prio(cs);
}
@ -90,7 +90,7 @@ index 7344c4b..c48f5e3 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
@@ -2453,6 +2508,8 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2506,6 +2561,8 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_EVICT_RESOURCE */ wined3d_cs_exec_evict_resource,
/* WINED3D_CS_OP_UPDATE_SUB_RESOURCE */ wined3d_cs_exec_update_sub_resource,
/* WINED3D_CS_OP_CREATE_VBO */ wined3d_cs_exec_create_vbo,
@ -100,10 +100,10 @@ index 7344c4b..c48f5e3 100644
static inline void *_wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size, BOOL prio)
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index 2f57373..f36ae61 100644
index d20322d..492d121 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -2734,13 +2734,39 @@ HRESULT CDECL wined3d_texture_create(struct wined3d_device *device, const struct
@@ -2742,13 +2742,39 @@ HRESULT CDECL wined3d_texture_create(struct wined3d_device *device, const struct
return WINED3D_OK;
}
@ -145,7 +145,7 @@ index 2f57373..f36ae61 100644
TRACE("texture %p, sub_resource_idx %u, dc %p.\n", texture, sub_resource_idx, dc);
@@ -2758,35 +2784,30 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i
@@ -2766,35 +2792,30 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i
if (texture->resource.map_count && !(texture->flags & WINED3D_TEXTURE_GET_DC_LENIENT))
return WINED3DERR_INVALIDCALL;
@ -200,7 +200,7 @@ index 2f57373..f36ae61 100644
}
HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsigned int sub_resource_idx, HDC dc)
@@ -2817,14 +2838,7 @@ HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsign
@@ -2825,14 +2846,7 @@ HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsign
return WINED3DERR_INVALIDCALL;
}
@ -217,10 +217,10 @@ index 2f57373..f36ae61 100644
return WINED3D_OK;
}
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 6261b30..a8c92f8 100644
index 94f136d..64845ec 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2643,6 +2643,7 @@ struct wined3d_texture
@@ -2686,6 +2686,7 @@ struct wined3d_texture
DWORD flags;
GLenum target;
DWORD update_map_binding;
@ -228,7 +228,7 @@ index 6261b30..a8c92f8 100644
GLuint rb_multisample;
GLuint rb_resolved;
@@ -2737,6 +2738,7 @@ void wined3d_texture_changed(struct wined3d_texture *texture,
@@ -2780,6 +2781,7 @@ void wined3d_texture_changed(struct wined3d_texture *texture,
void *swap_heap_memory) DECLSPEC_HIDDEN;
BOOL wined3d_texture_check_block_align(const struct wined3d_texture *texture,
unsigned int level, const struct wined3d_box *box) DECLSPEC_HIDDEN;
@ -236,7 +236,7 @@ index 6261b30..a8c92f8 100644
GLenum wined3d_texture_get_gl_buffer(const struct wined3d_texture *texture) DECLSPEC_HIDDEN;
void wined3d_texture_get_memory(struct wined3d_texture *texture, unsigned int sub_resource_idx,
struct wined3d_bo_address *data, DWORD locations, BOOL map) DECLSPEC_HIDDEN;
@@ -2756,6 +2758,8 @@ void *wined3d_texture_map_internal(struct wined3d_texture *texture, unsigned int
@@ -2799,6 +2801,8 @@ void *wined3d_texture_map_internal(struct wined3d_texture *texture, unsigned int
DWORD flags) DECLSPEC_HIDDEN;
void wined3d_texture_prepare_texture(struct wined3d_texture *texture,
struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN;
@ -245,7 +245,7 @@ index 6261b30..a8c92f8 100644
void wined3d_texture_set_map_binding(struct wined3d_texture *texture, DWORD map_binding) DECLSPEC_HIDDEN;
void wined3d_texture_set_swapchain(struct wined3d_texture *texture,
struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
@@ -3147,6 +3151,10 @@ void wined3d_cs_emit_buffer_invalidate_bo_range(struct wined3d_cs *cs,
@@ -3190,6 +3194,10 @@ void wined3d_cs_emit_buffer_invalidate_bo_range(struct wined3d_cs *cs,
struct wined3d_buffer *buffer, unsigned int offset, unsigned int size) DECLSPEC_HIDDEN;
void wined3d_cs_emit_buffer_preload(struct wined3d_cs *cs, struct wined3d_buffer *buffer) DECLSPEC_HIDDEN;
void wined3d_cs_emit_create_vbo(struct wined3d_cs *cs, struct wined3d_buffer *buffer) DECLSPEC_HIDDEN;
@ -254,8 +254,8 @@ index 6261b30..a8c92f8 100644
+void wined3d_cs_emit_release_dc(struct wined3d_cs *cs, struct wined3d_texture *texture,
+ unsigned int sub_resource_idx) 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
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
* fixed function semantics as D3DCOLOR or FLOAT16 */
--
2.8.0

View File

@ -1,4 +1,4 @@
From 2db17c7ebe378168da7a1f05fef44dff4465c478 Mon Sep 17 00:00:00 2001
From 4d3cc344c79ce23144e339e91e21c67290ed99a7 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.
@ -12,7 +12,7 @@ crash.
3 files changed, 35 insertions(+), 7 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index c48f5e3..3044e26 100644
index a8d1205..9884361 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -81,6 +81,7 @@ enum wined3d_cs_op
@ -35,7 +35,7 @@ index c48f5e3..3044e26 100644
static void wined3d_cs_mt_submit(struct wined3d_cs *cs, size_t size)
{
LONG new_val = (cs->queue.head + size) & (WINED3D_CS_QUEUE_SIZE - 1);
@@ -2451,6 +2457,28 @@ void wined3d_cs_emit_release_dc(struct wined3d_cs *cs, struct wined3d_texture *t
@@ -2504,6 +2510,28 @@ void wined3d_cs_emit_release_dc(struct wined3d_cs *cs, struct wined3d_texture *t
cs->ops->finish(cs);
}
@ -64,7 +64,7 @@ index c48f5e3..3044e26 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
@@ -2510,6 +2538,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2563,6 +2591,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_CREATE_VBO */ wined3d_cs_exec_create_vbo,
/* WINED3D_CS_OP_GET_DC */ wined3d_cs_exec_get_dc,
/* WINED3D_CS_OP_RELEASE_DC */ wined3d_cs_exec_release_dc,
@ -115,10 +115,10 @@ index 5c47a70..bca71ad 100644
context_release(context);
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index a8c92f8..30529d3 100644
index 64845ec..ef2f632 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2492,7 +2492,7 @@ struct wined3d_gl_bo *wined3d_device_get_bo(struct wined3d_device *device, UINT
@@ -2535,7 +2535,7 @@ struct wined3d_gl_bo *wined3d_device_get_bo(struct wined3d_device *device, UINT
GLenum type_hint, struct wined3d_context *context) DECLSPEC_HIDDEN;
void wined3d_device_release_bo(struct wined3d_device *device, struct wined3d_gl_bo *bo,
const struct wined3d_context *context) DECLSPEC_HIDDEN;
@ -127,14 +127,14 @@ index a8c92f8..30529d3 100644
static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD state)
{
@@ -3155,6 +3155,7 @@ void wined3d_cs_emit_get_dc(struct wined3d_cs *cs, struct wined3d_texture *textu
@@ -3198,6 +3198,7 @@ void wined3d_cs_emit_get_dc(struct wined3d_cs *cs, struct wined3d_texture *textu
unsigned int sub_resource_idx) DECLSPEC_HIDDEN;
void wined3d_cs_emit_release_dc(struct wined3d_cs *cs, struct wined3d_texture *texture,
unsigned int sub_resource_idx) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_create_dummy_textures(struct wined3d_cs *cs) 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
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
* fixed function semantics as D3DCOLOR or FLOAT16 */
--
2.8.0

View File

@ -1,4 +1,4 @@
From 58c6acf086714314326c56bf80e79970ce20efc6 Mon Sep 17 00:00:00 2001
From d495dd3080f450789da87d61e21dffdd0d2a4738 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 10 Oct 2013 16:43:19 +0200
Subject: wined3d: Create the initial context through the CS.
@ -11,10 +11,10 @@ Very hacky.
3 files changed, 103 insertions(+), 54 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index f7a5c6e..65df1a8 100644
index 9884361..2bfd100 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -90,6 +90,7 @@ enum wined3d_cs_op
@@ -82,6 +82,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_GET_DC,
WINED3D_CS_OP_RELEASE_DC,
WINED3D_CS_OP_CREATE_DUMMY_TEXTURES,
@ -22,7 +22,7 @@ index f7a5c6e..65df1a8 100644
WINED3D_CS_OP_STOP,
};
@@ -532,6 +533,13 @@ struct wined3d_cs_create_dummy_textures
@@ -482,6 +483,13 @@ struct wined3d_cs_create_dummy_textures
enum wined3d_cs_op opcode;
};
@ -36,7 +36,7 @@ index f7a5c6e..65df1a8 100644
static void wined3d_cs_mt_submit(struct wined3d_cs *cs, size_t size)
{
LONG new_val = (cs->queue.head + size) & (WINED3D_CS_QUEUE_SIZE - 1);
@@ -2688,6 +2696,31 @@ void wined3d_cs_emit_create_dummy_textures(struct wined3d_cs *cs)
@@ -2532,6 +2540,31 @@ void wined3d_cs_emit_create_dummy_textures(struct wined3d_cs *cs)
cs->ops->finish(cs);
}
@ -68,7 +68,7 @@ index f7a5c6e..65df1a8 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
@@ -2756,6 +2789,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2592,6 +2625,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_GET_DC */ wined3d_cs_exec_get_dc,
/* WINED3D_CS_OP_RELEASE_DC */ wined3d_cs_exec_release_dc,
/* WINED3D_CS_OP_CREATE_DUMMY_TEXTURES */ wined3d_cs_exec_create_dummy_textures,
@ -77,10 +77,10 @@ index f7a5c6e..65df1a8 100644
static inline void *_wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size, BOOL prio)
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
index 87fae35..6baff24 100644
index 4e7664c..92b70e0 100644
--- a/dlls/wined3d/swapchain.c
+++ b/dlls/wined3d/swapchain.c
@@ -820,6 +820,69 @@ static void wined3d_swapchain_apply_sample_count_override(const struct wined3d_s
@@ -814,6 +814,69 @@ static void wined3d_swapchain_apply_sample_count_override(const struct wined3d_s
*quality = 0;
}
@ -150,7 +150,7 @@ index 87fae35..6baff24 100644
static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3d_device *device,
struct wined3d_swapchain_desc *desc, void *parent, const struct wined3d_parent_ops *parent_ops)
{
@@ -937,61 +1000,9 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3
@@ -931,61 +994,9 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3
if (!(device->wined3d->flags & WINED3D_NO3D))
{
@ -215,19 +215,19 @@ index 87fae35..6baff24 100644
if (swapchain->desc.backbuffer_count > 0)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index dc55ba0..e5cf454 100644
index ef2f632..8e32350 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3070,6 +3070,8 @@ void wined3d_cs_emit_get_dc(struct wined3d_cs *cs, struct wined3d_texture *textu
@@ -3199,6 +3199,8 @@ void wined3d_cs_emit_get_dc(struct wined3d_cs *cs, struct wined3d_texture *textu
void wined3d_cs_emit_release_dc(struct wined3d_cs *cs, struct wined3d_texture *texture,
unsigned int sub_resource_idx) DECLSPEC_HIDDEN;
void wined3d_cs_emit_create_dummy_textures(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
+HRESULT wined3d_cs_emit_create_swapchain_context(struct wined3d_cs *cs,
+ struct wined3d_swapchain *swapchain) 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
@@ -3250,6 +3252,8 @@ struct wined3d_swapchain
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
* fixed function semantics as D3DCOLOR or FLOAT16 */
@@ -3356,6 +3358,8 @@ struct wined3d_swapchain
void wined3d_swapchain_activate(struct wined3d_swapchain *swapchain, BOOL activate) DECLSPEC_HIDDEN;
struct wined3d_context *swapchain_get_context(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;

View File

@ -1,4 +1,4 @@
From 32476d71eaa0b68fb3f27bd67d1c0307bbaaa905 Mon Sep 17 00:00:00 2001
From a606d1fcd9fa176486ecccccf2f45c046704b7e4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Fri, 11 Oct 2013 10:11:13 +0200
Subject: wined3d: Delete GL contexts through the CS in reset.
@ -11,10 +11,10 @@ Let's see if this fixes the remaining fglrx crashes...
3 files changed, 47 insertions(+), 10 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 65df1a8..a33910b 100644
index 2bfd100..ec3beb9 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -91,6 +91,7 @@ enum wined3d_cs_op
@@ -83,6 +83,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_RELEASE_DC,
WINED3D_CS_OP_CREATE_DUMMY_TEXTURES,
WINED3D_CS_OP_CREATE_SWAPCHAIN_CONTEXT,
@ -22,7 +22,7 @@ index 65df1a8..a33910b 100644
WINED3D_CS_OP_STOP,
};
@@ -540,6 +541,12 @@ struct wined3d_cs_create_swapchain_context
@@ -490,6 +491,12 @@ struct wined3d_cs_create_swapchain_context
HRESULT *ret;
};
@ -35,7 +35,7 @@ index 65df1a8..a33910b 100644
static void wined3d_cs_mt_submit(struct wined3d_cs *cs, size_t size)
{
LONG new_val = (cs->queue.head + size) & (WINED3D_CS_QUEUE_SIZE - 1);
@@ -2721,6 +2728,27 @@ HRESULT wined3d_cs_emit_create_swapchain_context(struct wined3d_cs *cs, struct w
@@ -2565,6 +2572,27 @@ HRESULT wined3d_cs_emit_create_swapchain_context(struct wined3d_cs *cs, struct w
return ret;
}
@ -63,7 +63,7 @@ index 65df1a8..a33910b 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
@@ -2790,6 +2818,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2626,6 +2654,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_RELEASE_DC */ wined3d_cs_exec_release_dc,
/* WINED3D_CS_OP_CREATE_DUMMY_TEXTURES */ wined3d_cs_exec_create_dummy_textures,
/* WINED3D_CS_OP_CREATE_SWAPCHAIN_CONTEXT */ wined3d_cs_exec_create_swapchain_context,
@ -72,10 +72,10 @@ index 65df1a8..a33910b 100644
static inline void *_wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size, BOOL prio)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 82da763..42afb1b 100644
index 102fa9c..3e6bcc4 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -4472,21 +4472,12 @@ void CDECL wined3d_device_evict_managed_resources(struct wined3d_device *device)
@@ -4513,21 +4513,12 @@ void CDECL wined3d_device_evict_managed_resources(struct wined3d_device *device)
}
}
@ -98,7 +98,7 @@ index 82da763..42afb1b 100644
LIST_FOR_EACH_ENTRY(shader, &device->shaders, struct wined3d_shader, shader_list_entry)
{
device->shader_backend->shader_destroy(shader);
@@ -4517,6 +4508,19 @@ static void delete_opengl_contexts(struct wined3d_device *device, struct wined3d
@@ -4558,6 +4549,19 @@ static void delete_opengl_contexts(struct wined3d_device *device, struct wined3d
swapchain->context = NULL;
}
@ -119,10 +119,10 @@ index 82da763..42afb1b 100644
{
HRESULT hr;
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index e5cf454..1fb091c 100644
index 8e32350..bba2798 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2386,6 +2386,8 @@ struct wined3d_gl_bo *wined3d_device_get_bo(struct wined3d_device *device, UINT
@@ -2536,6 +2536,8 @@ struct wined3d_gl_bo *wined3d_device_get_bo(struct wined3d_device *device, UINT
void wined3d_device_release_bo(struct wined3d_device *device, struct wined3d_gl_bo *bo,
const struct wined3d_context *context) DECLSPEC_HIDDEN;
void device_create_dummy_textures(struct wined3d_device *device, struct wined3d_context *context) DECLSPEC_HIDDEN;
@ -131,15 +131,15 @@ index e5cf454..1fb091c 100644
static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD state)
{
@@ -3072,6 +3074,8 @@ void wined3d_cs_emit_release_dc(struct wined3d_cs *cs, struct wined3d_texture *t
@@ -3201,6 +3203,8 @@ void wined3d_cs_emit_release_dc(struct wined3d_cs *cs, struct wined3d_texture *t
void wined3d_cs_emit_create_dummy_textures(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
HRESULT wined3d_cs_emit_create_swapchain_context(struct wined3d_cs *cs,
struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_delete_opengl_contexts(struct wined3d_cs *cs,
+ struct wined3d_swapchain *swapchain) 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
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
* fixed function semantics as D3DCOLOR or FLOAT16 */
--
2.8.0

View File

@ -1,4 +1,4 @@
From 2b5f2cc420b7435f40545d5845e8f03b1855b008 Mon Sep 17 00:00:00 2001
From 394bb641cf384184b11c03647fd0779cc52a2c98 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefandoesinger@gmx.at>
Date: Sat, 7 May 2016 21:58:06 +0100
Subject: wined3d: Update the swap interval through the CS in reset.
@ -10,10 +10,10 @@ Subject: wined3d: Update the swap interval through the CS in reset.
3 files changed, 31 insertions(+), 1 deletion(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index a33910b..c3e50ef 100644
index ec3beb9..de270cb 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -92,6 +92,7 @@ enum wined3d_cs_op
@@ -84,6 +84,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_CREATE_DUMMY_TEXTURES,
WINED3D_CS_OP_CREATE_SWAPCHAIN_CONTEXT,
WINED3D_CS_OP_DELETE_GL_CONTEXTS,
@ -21,7 +21,7 @@ index a33910b..c3e50ef 100644
WINED3D_CS_OP_STOP,
};
@@ -547,6 +548,12 @@ struct wined3d_cs_delete_gl_contexts
@@ -497,6 +498,12 @@ struct wined3d_cs_delete_gl_contexts
struct wined3d_swapchain *swapchain;
};
@ -34,7 +34,7 @@ index a33910b..c3e50ef 100644
static void wined3d_cs_mt_submit(struct wined3d_cs *cs, size_t size)
{
LONG new_val = (cs->queue.head + size) & (WINED3D_CS_QUEUE_SIZE - 1);
@@ -2749,6 +2756,27 @@ void wined3d_cs_emit_delete_opengl_contexts(struct wined3d_cs *cs, struct wined3
@@ -2593,6 +2600,27 @@ void wined3d_cs_emit_delete_opengl_contexts(struct wined3d_cs *cs, struct wined3
cs->ops->finish(cs);
}
@ -62,7 +62,7 @@ index a33910b..c3e50ef 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
@@ -2819,6 +2847,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2655,6 +2683,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_CREATE_DUMMY_TEXTURES */ wined3d_cs_exec_create_dummy_textures,
/* WINED3D_CS_OP_CREATE_SWAPCHAIN_CONTEXT */ wined3d_cs_exec_create_swapchain_context,
/* WINED3D_CS_OP_DELETE_GL_CONTEXTS */ wined3d_cs_exec_delete_gl_contexts,
@ -71,10 +71,10 @@ index a33910b..c3e50ef 100644
static inline void *_wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size, BOOL prio)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 78b508f..95c34b2 100644
index dabc91d..8fddf18 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -4837,7 +4837,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
@@ -4880,7 +4880,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
{
if (reset_state)
hr = create_primary_opengl_context(device, swapchain);
@ -84,17 +84,17 @@ index 78b508f..95c34b2 100644
/* All done. There is no need to reload resources or shaders, this will happen automatically on the
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 1fb091c..07f4db2 100644
index bba2798..5d963fb 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3076,6 +3076,7 @@ HRESULT wined3d_cs_emit_create_swapchain_context(struct wined3d_cs *cs,
@@ -3205,6 +3205,7 @@ HRESULT wined3d_cs_emit_create_swapchain_context(struct wined3d_cs *cs,
struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
void wined3d_cs_emit_delete_opengl_contexts(struct wined3d_cs *cs,
struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_update_swap_interval(struct wined3d_cs *cs, struct wined3d_swapchain *swapchain) 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
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
* fixed function semantics as D3DCOLOR or FLOAT16 */
--
2.8.0

View File

@ -5040,7 +5040,17 @@ diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
--- a/dlls/wined3d/query.c
+++ b/dlls/wined3d/query.c
@@ -237,6 +237,11 @@ static void wined3d_query_destroy_object(void *object)
@@ -35,6 +35,9 @@ static void wined3d_query_init(struct wined3d_query *query, struct wined3d_devic
query->type = type;
query->data_size = data_size;
query->query_ops = query_ops;
+#if defined(STAGING_CSMT)
+ list_init(&query->poll_list_entry);
+#endif /* STAGING_CSMT */
}
static struct wined3d_event_query *wined3d_event_query_from_query(struct wined3d_query *query)
@@ -254,6 +257,11 @@ static void wined3d_query_destroy_object(void *object)
{
struct wined3d_query *query = object;
@ -5052,7 +5062,7 @@ diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
/* Queries are specific to the GL context that created them. Not
* deleting the query will obviously leak it, but that's still better
* than potentially deleting a different query with the same id in this
@@ -297,7 +302,21 @@ HRESULT CDECL wined3d_query_issue(struct wined3d_query *query, DWORD flags)
@@ -314,7 +322,21 @@ HRESULT CDECL wined3d_query_issue(struct wined3d_query *query, DWORD flags)
{
TRACE("query %p, flags %#x.\n", query, flags);
@ -5074,7 +5084,7 @@ diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
}
static void fill_query_data(void *out, unsigned int out_size, const void *result, unsigned int result_size)
@@ -309,6 +328,7 @@ static HRESULT wined3d_occlusion_query_ops_get_data(struct wined3d_query *query,
@@ -326,6 +348,7 @@ static HRESULT wined3d_occlusion_query_ops_get_data(struct wined3d_query *query,
void *data, DWORD size, DWORD flags)
{
struct wined3d_occlusion_query *oq = query->extendedData;
@ -5082,7 +5092,7 @@ diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
struct wined3d_device *device = query->device;
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
struct wined3d_context *context;
@@ -320,6 +340,9 @@ static HRESULT wined3d_occlusion_query_ops_get_data(struct wined3d_query *query,
@@ -337,6 +360,9 @@ static HRESULT wined3d_occlusion_query_ops_get_data(struct wined3d_query *query,
if (!oq->context)
query->state = QUERY_CREATED;
@ -5092,7 +5102,7 @@ diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
if (query->state == QUERY_CREATED)
{
@@ -330,6 +353,10 @@ static HRESULT wined3d_occlusion_query_ops_get_data(struct wined3d_query *query,
@@ -347,6 +373,10 @@ static HRESULT wined3d_occlusion_query_ops_get_data(struct wined3d_query *query,
return S_OK;
}
@ -5103,7 +5113,7 @@ diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
if (query->state == QUERY_BUILDING)
{
/* Msdn says this returns an error, but our tests show that S_FALSE is returned */
@@ -337,12 +364,45 @@ static HRESULT wined3d_occlusion_query_ops_get_data(struct wined3d_query *query,
@@ -354,12 +384,45 @@ static HRESULT wined3d_occlusion_query_ops_get_data(struct wined3d_query *query,
return S_FALSE;
}
@ -5149,7 +5159,7 @@ diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
}
context = context_acquire(device, context_get_rt_surface(oq->context));
@@ -353,6 +413,7 @@ static HRESULT wined3d_occlusion_query_ops_get_data(struct wined3d_query *query,
@@ -370,6 +433,7 @@ static HRESULT wined3d_occlusion_query_ops_get_data(struct wined3d_query *query,
if (available)
{
@ -5157,7 +5167,7 @@ diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
if (size)
{
GL_EXTCALL(glGetQueryObjectuiv(oq->id, GL_QUERY_RESULT, &samples));
@@ -361,14 +422,26 @@ static HRESULT wined3d_occlusion_query_ops_get_data(struct wined3d_query *query,
@@ -378,34 +442,55 @@ static HRESULT wined3d_occlusion_query_ops_get_data(struct wined3d_query *query,
fill_query_data(data, size, &samples, sizeof(samples));
}
res = S_OK;
@ -5184,18 +5194,24 @@ diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
return res;
}
@@ -383,12 +456,22 @@ static HRESULT wined3d_event_query_ops_get_data(struct wined3d_query *query,
if (!data || !size)
return S_OK;
static HRESULT wined3d_event_query_ops_get_data(struct wined3d_query *query,
void *data, DWORD size, DWORD flags)
+#else /* STAGING_CSMT */
+ return ret;
+}
+
+static BOOL wined3d_event_query_ops_poll(struct wined3d_query *query)
+{
+ struct wined3d_event_query *event_query = query->extendedData;
+ enum wined3d_event_query_result ret;
+#endif /* STAGING_CSMT */
{
struct wined3d_event_query *event_query = wined3d_event_query_from_query(query);
enum wined3d_event_query_result ret;
+#if !defined(STAGING_CSMT)
BOOL signaled;
TRACE("query %p, data %p, size %#x, flags %#x.\n", query, data, size, flags);
if (!data || !size)
return S_OK;
+#endif /* STAGING_CSMT */
ret = wined3d_event_query_test(event_query, query->device);
@ -5207,7 +5223,7 @@ diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
signaled = TRUE;
fill_query_data(data, size, &signaled, sizeof(signaled));
break;
@@ -397,17 +480,58 @@ static HRESULT wined3d_event_query_ops_get_data(struct wined3d_query *query,
@@ -414,17 +499,58 @@ static HRESULT wined3d_event_query_ops_get_data(struct wined3d_query *query,
signaled = FALSE;
fill_query_data(data, size, &signaled, sizeof(signaled));
break;
@ -5266,7 +5282,7 @@ diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
return S_OK;
}
@@ -426,7 +550,11 @@ enum wined3d_query_type CDECL wined3d_query_get_type(const struct wined3d_query
@@ -443,7 +569,11 @@ enum wined3d_query_type CDECL wined3d_query_get_type(const struct wined3d_query
return query->type;
}
@ -5278,8 +5294,8 @@ diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
{
TRACE("query %p, flags %#x.\n", query, flags);
@@ -436,12 +564,16 @@ static HRESULT wined3d_event_query_ops_issue(struct wined3d_query *query, DWORD
struct wined3d_event_query *event_query = query->extendedData;
@@ -452,12 +582,16 @@ static HRESULT wined3d_event_query_ops_issue(struct wined3d_query *query, DWORD
struct wined3d_event_query *event_query = wined3d_event_query_from_query(query);
wined3d_event_query_issue(event_query, query->device);
+#if defined(STAGING_CSMT)
@ -5288,14 +5304,14 @@ diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
}
else if (flags & WINED3DISSUE_BEGIN)
{
/* Started implicitly at device creation */
/* Started implicitly at query creation. */
ERR("Event query issued with START flag - what to do?\n");
}
+#if !defined(STAGING_CSMT)
if (flags & WINED3DISSUE_BEGIN)
query->state = QUERY_BUILDING;
@@ -452,11 +584,20 @@ static HRESULT wined3d_event_query_ops_issue(struct wined3d_query *query, DWORD
@@ -468,11 +602,20 @@ static HRESULT wined3d_event_query_ops_issue(struct wined3d_query *query, DWORD
}
static HRESULT wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DWORD flags)
@ -5316,7 +5332,7 @@ diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
TRACE("query %p, flags %#x.\n", query, flags);
@@ -464,7 +605,11 @@ static HRESULT wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DW
@@ -480,7 +623,11 @@ static HRESULT wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DW
* restart. */
if (flags & WINED3DISSUE_BEGIN)
{
@ -5328,7 +5344,7 @@ diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
{
if (oq->context->tid != GetCurrentThreadId())
{
@@ -494,13 +639,20 @@ static HRESULT wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DW
@@ -510,13 +657,20 @@ static HRESULT wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DW
checkGLcall("glBeginQuery()");
context_release(context);
@ -5349,7 +5365,7 @@ diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
{
if (oq->context->tid != GetCurrentThreadId())
{
@@ -514,6 +666,7 @@ static HRESULT wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DW
@@ -530,6 +684,7 @@ static HRESULT wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DW
checkGLcall("glEndQuery()");
context_release(context);
@ -5357,7 +5373,7 @@ diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
}
}
}
@@ -524,17 +677,61 @@ static HRESULT wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DW
@@ -540,17 +695,61 @@ static HRESULT wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DW
query->state = QUERY_SIGNALLED;
return WINED3D_OK; /* can be WINED3DERR_INVALIDCALL. */
@ -5419,7 +5435,7 @@ diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
HRESULT res;
TRACE("query %p, data %p, size %#x, flags %#x.\n", query, data, size, flags);
@@ -549,14 +746,28 @@ static HRESULT wined3d_timestamp_query_ops_get_data(struct wined3d_query *query,
@@ -565,14 +764,28 @@ static HRESULT wined3d_timestamp_query_ops_get_data(struct wined3d_query *query,
timestamp = 0;
fill_query_data(data, size, &timestamp, sizeof(timestamp));
return S_OK;
@ -5448,7 +5464,7 @@ diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
}
context = context_acquire(device, context_get_rt_surface(tq->context));
@@ -567,6 +778,7 @@ static HRESULT wined3d_timestamp_query_ops_get_data(struct wined3d_query *query,
@@ -583,6 +796,7 @@ static HRESULT wined3d_timestamp_query_ops_get_data(struct wined3d_query *query,
if (available)
{
@ -5456,7 +5472,7 @@ diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
if (size)
{
GL_EXTCALL(glGetQueryObjectui64v(tq->id, GL_QUERY_RESULT, &timestamp));
@@ -575,18 +787,36 @@ static HRESULT wined3d_timestamp_query_ops_get_data(struct wined3d_query *query,
@@ -591,18 +805,36 @@ static HRESULT wined3d_timestamp_query_ops_get_data(struct wined3d_query *query,
fill_query_data(data, size, &timestamp, sizeof(timestamp));
}
res = S_OK;
@ -5493,7 +5509,7 @@ diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
{
struct wined3d_timestamp_query *tq = query->extendedData;
struct wined3d_device *device = query->device;
@@ -608,18 +838,28 @@ static HRESULT wined3d_timestamp_query_ops_issue(struct wined3d_query *query, DW
@@ -624,18 +856,28 @@ static HRESULT wined3d_timestamp_query_ops_issue(struct wined3d_query *query, DW
GL_EXTCALL(glQueryCounter(tq->id, GL_TIMESTAMP));
checkGLcall("glQueryCounter()");
context_release(context);
@ -5522,7 +5538,7 @@ diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
if (query->type == WINED3D_QUERY_TYPE_TIMESTAMP_DISJOINT)
{
static const struct wined3d_query_data_timestamp_disjoint disjoint_data = {1000 * 1000 * 1000, FALSE};
@@ -641,6 +881,7 @@ static HRESULT wined3d_timestamp_disjoint_query_ops_get_data(struct wined3d_quer
@@ -657,6 +899,7 @@ static HRESULT wined3d_timestamp_disjoint_query_ops_get_data(struct wined3d_quer
return S_OK;
}
@ -5530,7 +5546,7 @@ diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
static HRESULT wined3d_timestamp_disjoint_query_ops_issue(struct wined3d_query *query, DWORD flags)
{
TRACE("query %p, flags %#x.\n", query, flags);
@@ -651,6 +892,17 @@ static HRESULT wined3d_timestamp_disjoint_query_ops_issue(struct wined3d_query *
@@ -667,6 +910,17 @@ static HRESULT wined3d_timestamp_disjoint_query_ops_issue(struct wined3d_query *
query->state = QUERY_SIGNALLED;
return WINED3D_OK;
@ -5548,7 +5564,7 @@ diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
}
static HRESULT wined3d_statistics_query_ops_get_data(struct wined3d_query *query,
@@ -665,10 +917,22 @@ static HRESULT wined3d_statistics_query_ops_get_data(struct wined3d_query *query
@@ -681,10 +935,22 @@ static HRESULT wined3d_statistics_query_ops_get_data(struct wined3d_query *query
return S_OK;
}
@ -5571,7 +5587,7 @@ diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
}
static HRESULT wined3d_overflow_query_ops_get_data(struct wined3d_query *query,
@@ -683,45 +947,75 @@ static HRESULT wined3d_overflow_query_ops_get_data(struct wined3d_query *query,
@@ -699,15 +965,30 @@ static HRESULT wined3d_overflow_query_ops_get_data(struct wined3d_query *query,
return S_OK;
}
@ -5602,6 +5618,7 @@ diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
wined3d_event_query_ops_issue,
};
@@ -739,30 +1020,45 @@ static HRESULT wined3d_event_query_create(struct wined3d_device *device,
static const struct wined3d_query_ops occlusion_query_ops =
{
wined3d_occlusion_query_ops_get_data,
@ -5647,7 +5664,7 @@ diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
wined3d_overflow_query_ops_issue
};
@@ -743,13 +1037,20 @@ static HRESULT query_init(struct wined3d_query *query, struct wined3d_device *de
@@ -784,13 +1080,20 @@ static HRESULT query_init(struct wined3d_query *query, struct wined3d_device *de
}
query->query_ops = &occlusion_query_ops;
query->data_size = sizeof(DWORD);
@ -5667,8 +5684,8 @@ diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
+#endif /* STAGING_CSMT */
break;
case WINED3D_QUERY_TYPE_EVENT:
@@ -833,6 +1134,9 @@ static HRESULT query_init(struct wined3d_query *query, struct wined3d_device *de
case WINED3D_QUERY_TYPE_SO_STATISTICS:
@@ -857,6 +1160,9 @@ static HRESULT query_init(struct wined3d_query *query, struct wined3d_device *de
query->state = QUERY_CREATED;
query->device = device;
query->ref = 1;
@ -8688,7 +8705,31 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
};
extern struct wined3d_settings wined3d_settings DECLSPEC_HIDDEN;
@@ -1372,6 +1378,10 @@ struct wined3d_occlusion_query
@@ -1380,7 +1386,12 @@ enum wined3d_query_state
struct wined3d_query_ops
{
HRESULT (*query_get_data)(struct wined3d_query *query, void *data, DWORD data_size, DWORD flags);
+#if !defined(STAGING_CSMT)
HRESULT (*query_issue)(struct wined3d_query *query, DWORD flags);
+#else /* STAGING_CSMT */
+ BOOL (*query_poll)(struct wined3d_query *query);
+ BOOL (*query_issue)(struct wined3d_query *query, DWORD flags);
+#endif /* STAGING_CSMT */
};
struct wined3d_query
@@ -1393,6 +1404,10 @@ struct wined3d_query
enum wined3d_query_type type;
DWORD data_size;
const struct wined3d_query_ops *query_ops;
+#if defined(STAGING_CSMT)
+ LONG counter_main, counter_retrieved;
+ struct list poll_list_entry;
+#endif /* STAGING_CSMT */
void *extendedData;
};
@@ -1402,6 +1417,10 @@ struct wined3d_occlusion_query
struct list entry;
GLuint id;
struct wined3d_context *context;
@ -8699,7 +8740,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
};
union wined3d_gl_query_object
@@ -1407,11 +1417,46 @@ struct wined3d_timestamp_query
@@ -1439,11 +1458,46 @@ struct wined3d_timestamp_query
struct list entry;
GLuint id;
struct wined3d_context *context;
@ -8746,7 +8787,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
struct wined3d_context
{
const struct wined3d_gl_info *gl_info;
@@ -1426,6 +1471,9 @@ struct wined3d_context
@@ -1458,6 +1512,9 @@ struct wined3d_context
DWORD dirtyArray[STATE_HIGHEST + 1]; /* Won't get bigger than that, a state is never marked dirty 2 times */
DWORD numDirtyEntries;
DWORD isStateDirty[STATE_HIGHEST / (sizeof(DWORD) * CHAR_BIT) + 1]; /* Bitmap to find out quickly if a state is dirty */
@ -8756,7 +8797,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
struct wined3d_swapchain *swapchain;
struct
@@ -1534,12 +1582,14 @@ struct wined3d_context
@@ -1566,12 +1623,14 @@ struct wined3d_context
GLuint dummy_arbfp_prog;
};
@ -8771,7 +8812,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
typedef void (*APPLYSTATEFUNC)(struct wined3d_context *ctx, const struct wined3d_state *state, DWORD state_id);
struct StateEntry
@@ -1678,7 +1728,11 @@ void context_alloc_event_query(struct wined3d_context *context,
@@ -1710,7 +1769,11 @@ void context_alloc_event_query(struct wined3d_context *context,
void context_alloc_occlusion_query(struct wined3d_context *context,
struct wined3d_occlusion_query *query) DECLSPEC_HIDDEN;
void context_apply_blit_state(struct wined3d_context *context, const struct wined3d_device *device) DECLSPEC_HIDDEN;
@ -8783,7 +8824,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
UINT rt_count, const struct wined3d_fb_state *fb) DECLSPEC_HIDDEN;
BOOL context_apply_draw_state(struct wined3d_context *context,
const struct wined3d_device *device, const struct wined3d_state *state) DECLSPEC_HIDDEN;
@@ -2304,7 +2358,11 @@ struct wined3d_stream_state
@@ -2336,7 +2399,11 @@ struct wined3d_stream_state
struct wined3d_state
{
DWORD flags;
@ -8795,7 +8836,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
struct wined3d_vertex_declaration *vertex_declaration;
struct wined3d_stream_output stream_output[MAX_STREAM_OUT];
@@ -2350,6 +2408,16 @@ struct wined3d_state
@@ -2382,6 +2449,16 @@ struct wined3d_state
DWORD render_states[WINEHIGHEST_RENDER_STATE + 1];
};
@ -8812,7 +8853,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
#define WINED3D_UNMAPPED_STAGE ~0U
/* Multithreaded flag. Removed from the public header to signal that
@@ -2402,16 +2470,21 @@ struct wined3d_device
@@ -2434,16 +2511,21 @@ struct wined3d_device
struct wined3d_rendertarget_view *back_buffer_view;
struct wined3d_swapchain **swapchains;
UINT swapchain_count;
@ -8834,7 +8875,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
/* For rendering to a texture using glCopyTexImage */
GLuint depth_blt_texture;
@@ -2458,9 +2531,23 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
@@ -2490,9 +2572,23 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
UINT message, WPARAM wparam, LPARAM lparam, WNDPROC proc) DECLSPEC_HIDDEN;
void device_resource_add(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
void device_resource_released(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
@ -8858,7 +8899,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD state)
{
@@ -2504,7 +2591,11 @@ struct wined3d_resource
@@ -2536,7 +2632,11 @@ struct wined3d_resource
UINT depth;
UINT size;
DWORD priority;
@ -8870,7 +8911,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
struct list resource_list_entry;
LONG access_count;
@@ -2611,6 +2702,9 @@ struct wined3d_texture
@@ -2643,6 +2743,9 @@ struct wined3d_texture
DWORD flags;
GLenum target;
DWORD update_map_binding;
@ -8880,7 +8921,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
GLuint rb_multisample;
GLuint rb_resolved;
@@ -2648,7 +2742,12 @@ struct wined3d_texture
@@ -2680,7 +2783,12 @@ struct wined3d_texture
unsigned int map_count;
DWORD locations;
@ -8893,7 +8934,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
} sub_resources[1];
};
@@ -2699,11 +2798,23 @@ void wined3d_texture_bind(struct wined3d_texture *texture,
@@ -2731,11 +2839,23 @@ void wined3d_texture_bind(struct wined3d_texture *texture,
struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN;
void wined3d_texture_bind_and_dirtify(struct wined3d_texture *texture,
struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN;
@ -8917,7 +8958,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
struct wined3d_texture_sub_resource *wined3d_texture_get_sub_resource(struct wined3d_texture *texture,
unsigned int sub_resource_idx) DECLSPEC_HIDDEN;
void wined3d_texture_invalidate_location(struct wined3d_texture *texture,
@@ -2714,13 +2825,28 @@ void *wined3d_texture_map_bo_address(const struct wined3d_bo_address *data, size
@@ -2746,13 +2866,28 @@ void *wined3d_texture_map_bo_address(const struct wined3d_bo_address *data, size
const struct wined3d_gl_info *gl_info, GLenum binding, DWORD flags) DECLSPEC_HIDDEN;
BOOL wined3d_texture_prepare_location(struct wined3d_texture *texture, unsigned int sub_resource_idx,
struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
@ -8946,7 +8987,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
void wined3d_texture_validate_location(struct wined3d_texture *texture,
unsigned int sub_resource_idx, DWORD location) DECLSPEC_HIDDEN;
@@ -2838,7 +2964,11 @@ void surface_get_drawable_size(const struct wined3d_surface *surface, const stru
@@ -2870,7 +3005,11 @@ void surface_get_drawable_size(const struct wined3d_surface *surface, const stru
unsigned int *width, unsigned int *height) DECLSPEC_HIDDEN;
void surface_load_fb_texture(struct wined3d_surface *surface, BOOL srgb,
struct wined3d_context *context) DECLSPEC_HIDDEN;
@ -8958,7 +8999,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
void surface_modify_ds_location(struct wined3d_surface *surface, DWORD location, UINT w, UINT h) DECLSPEC_HIDDEN;
void surface_set_compatible_renderbuffer(struct wined3d_surface *surface,
@@ -2849,6 +2979,11 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
@@ -2881,6 +3020,11 @@ 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;
@ -8970,7 +9011,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
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;
@@ -2863,6 +2998,12 @@ struct wined3d_sampler
@@ -2895,6 +3039,12 @@ struct wined3d_sampler
GLuint name;
};
@ -8983,7 +9024,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
struct wined3d_vertex_declaration_element
{
const struct wined3d_format *format;
@@ -2958,6 +3099,7 @@ struct wined3d_stateblock
@@ -2990,6 +3140,7 @@ struct wined3d_stateblock
void stateblock_init_contained_states(struct wined3d_stateblock *stateblock) DECLSPEC_HIDDEN;
void state_cleanup(struct wined3d_state *state) DECLSPEC_HIDDEN;
@ -8991,7 +9032,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
void state_init(struct wined3d_state *state, struct wined3d_fb_state *fb,
const struct wined3d_gl_info *gl_info, const struct wined3d_d3d_info *d3d_info,
DWORD flags) DECLSPEC_HIDDEN;
@@ -2971,29 +3113,74 @@ enum wined3d_push_constants
@@ -3003,29 +3154,74 @@ enum wined3d_push_constants
WINED3D_PUSH_CONSTANTS_PS_I,
WINED3D_PUSH_CONSTANTS_VS_B,
WINED3D_PUSH_CONSTANTS_PS_B,
@ -9066,7 +9107,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *rects,
DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil) DECLSPEC_HIDDEN;
@@ -3044,12 +3231,70 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
@@ -3076,12 +3272,70 @@ 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;
@ -9135,34 +9176,9 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
+void wined3d_cs_emit_update_swap_interval(struct wined3d_cs *cs, struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
+#endif /* STAGING_CSMT */
/* 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
@@ -3064,7 +3309,12 @@ enum query_state {
struct wined3d_query_ops
{
HRESULT (*query_get_data)(struct wined3d_query *query, void *data, DWORD data_size, DWORD flags);
+#if !defined(STAGING_CSMT)
HRESULT (*query_issue)(struct wined3d_query *query, DWORD flags);
+#else /* STAGING_CSMT */
+ BOOL (*query_poll)(struct wined3d_query *query);
+ BOOL (*query_issue)(struct wined3d_query *query, DWORD flags);
+#endif /* STAGING_CSMT */
};
struct wined3d_query
@@ -3078,6 +3328,11 @@ struct wined3d_query
enum wined3d_query_type type;
DWORD data_size;
void *extendedData;
+#if defined(STAGING_CSMT)
+
+ LONG counter_main, counter_retrieved;
+ struct list poll_list_entry;
+#endif /* STAGING_CSMT */
};
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
@@ -3105,6 +3360,9 @@ struct wined3d_buffer
* fixed function semantics as D3DCOLOR or FLOAT16 */
@@ -3108,6 +3362,9 @@ struct wined3d_buffer
GLenum buffer_object_usage;
GLenum buffer_type_hint;
DWORD flags;
@ -9172,7 +9188,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
void *map_ptr;
struct wined3d_map_range *maps;
@@ -3129,11 +3387,19 @@ void buffer_get_memory(struct wined3d_buffer *buffer, struct wined3d_context *co
@@ -3132,11 +3389,19 @@ void buffer_get_memory(struct wined3d_buffer *buffer, struct wined3d_context *co
BYTE *buffer_get_sysmem(struct wined3d_buffer *buffer, struct wined3d_context *context) DECLSPEC_HIDDEN;
void buffer_internal_preload(struct wined3d_buffer *buffer, struct wined3d_context *context,
const struct wined3d_state *state) DECLSPEC_HIDDEN;
@ -9192,7 +9208,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
struct wined3d_rendertarget_view
{
@@ -3195,7 +3461,12 @@ struct wined3d_unordered_access_view
@@ -3198,7 +3463,12 @@ struct wined3d_unordered_access_view
struct wined3d_swapchain_ops
{
void (*swapchain_present)(struct wined3d_swapchain *swapchain,
@ -9205,7 +9221,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
void (*swapchain_frontbuffer_updated)(struct wined3d_swapchain *swapchain);
};
@@ -3231,6 +3502,10 @@ struct wined3d_swapchain
@@ -3234,6 +3504,10 @@ struct wined3d_swapchain
void wined3d_swapchain_activate(struct wined3d_swapchain *swapchain, BOOL activate) DECLSPEC_HIDDEN;
struct wined3d_context *swapchain_get_context(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;

View File

@ -1,4 +1,4 @@
From 87853b8ab0339815073318e2684db38475571f02 Mon Sep 17 00:00:00 2001
From 15bd32c3feb6982a1197f2bd59e4a529fd63b50c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 16 Apr 2016 18:18:54 +0200
Subject: wined3d: Add stubs for QUERY_TYPE_SO_STATISTICS and
@ -12,10 +12,10 @@ Subject: wined3d: Add stubs for QUERY_TYPE_SO_STATISTICS and
4 files changed, 72 insertions(+), 4 deletions(-)
diff --git a/dlls/d3d10core/tests/device.c b/dlls/d3d10core/tests/device.c
index 8e69656..f5f010c 100644
index 9b3a943..fb1ec06 100644
--- a/dlls/d3d10core/tests/device.c
+++ b/dlls/d3d10core/tests/device.c
@@ -2391,8 +2391,8 @@ static void test_create_query(void)
@@ -3491,8 +3491,8 @@ static void test_create_query(void)
{D3D10_QUERY_TIMESTAMP_DISJOINT, FALSE, FALSE},
{D3D10_QUERY_PIPELINE_STATISTICS, FALSE, TRUE},
{D3D10_QUERY_OCCLUSION_PREDICATE, TRUE, FALSE},
@ -27,10 +27,10 @@ index 8e69656..f5f010c 100644
ULONG refcount, expected_refcount;
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
index 03b6113..cee4bb7 100644
index df45eb5..4c65997 100644
--- a/dlls/d3d11/tests/d3d11.c
+++ b/dlls/d3d11/tests/d3d11.c
@@ -3270,8 +3270,8 @@ static void test_create_query(void)
@@ -4486,8 +4486,8 @@ static void test_create_query(void)
{D3D11_QUERY_TIMESTAMP_DISJOINT, D3D_FEATURE_LEVEL_10_0, FALSE, FALSE, FALSE},
{D3D11_QUERY_PIPELINE_STATISTICS, D3D_FEATURE_LEVEL_10_0, FALSE, FALSE, TRUE},
{D3D11_QUERY_OCCLUSION_PREDICATE, D3D_FEATURE_LEVEL_10_0, TRUE, TRUE, FALSE},
@ -42,10 +42,10 @@ index 03b6113..cee4bb7 100644
{D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM0, D3D_FEATURE_LEVEL_11_0, TRUE, FALSE, TRUE},
{D3D11_QUERY_SO_STATISTICS_STREAM1, D3D_FEATURE_LEVEL_11_0, FALSE, FALSE, TRUE},
diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
index 410ce6c..0c56b23 100644
index 54e8bb1..ff9475e 100644
--- a/dlls/wined3d/query.c
+++ b/dlls/wined3d/query.c
@@ -681,6 +681,42 @@ static HRESULT wined3d_timestamp_disjoint_query_ops_issue(struct wined3d_query *
@@ -669,6 +669,42 @@ static HRESULT wined3d_timestamp_disjoint_query_ops_issue(struct wined3d_query *
return WINED3D_OK;
}
@ -88,7 +88,7 @@ index 410ce6c..0c56b23 100644
static const struct wined3d_query_ops event_query_ops =
{
wined3d_event_query_ops_get_data,
@@ -705,6 +741,18 @@ static const struct wined3d_query_ops timestamp_disjoint_query_ops =
@@ -718,6 +754,18 @@ static const struct wined3d_query_ops timestamp_disjoint_query_ops =
wined3d_timestamp_disjoint_query_ops_issue,
};
@ -107,8 +107,8 @@ index 410ce6c..0c56b23 100644
static HRESULT query_init(struct wined3d_query *query, struct wined3d_device *device,
enum wined3d_query_type type, void *parent)
{
@@ -752,6 +800,20 @@ static HRESULT query_init(struct wined3d_query *query, struct wined3d_device *de
}
@@ -745,6 +793,20 @@ static HRESULT query_init(struct wined3d_query *query, struct wined3d_device *de
((struct wined3d_occlusion_query *)query->extendedData)->context = NULL;
break;
+ case WINED3D_QUERY_TYPE_SO_STATISTICS:
@ -129,7 +129,7 @@ index 410ce6c..0c56b23 100644
TRACE("Timestamp query.\n");
if (!gl_info->supported[ARB_TIMER_QUERY])
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index 4cfe1e0..e245e82 100644
index 36de1de..468ce98 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -700,6 +700,12 @@ struct wined3d_query_data_timestamp_disjoint