You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-12-15 08:03:15 -08:00
Rebase against 3852d3357d087353d71d4d11359014a97dbf3e5a.
[d3dx9_36-D3DXDisassembleShader] Removed patch to implement stub for d3dx9_36.D3DXFillCubeTextureTX (fixed upstream).
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From 0d374fc445002f29914f0f4c08fdfcb29084f64e Mon Sep 17 00:00:00 2001
|
||||
From b511e356c40c80d73abc26519f1aeca401317840 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 945abe5..3f551b6 100644
|
||||
index c206745..f877149 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 945abe5..3f551b6 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 8ed049e..5931569 100644
|
||||
index 0d5c151..f51c06a 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -1243,54 +1243,10 @@ static void wined3d_cs_st_submit(struct wined3d_cs *cs)
|
||||
@@ -1327,54 +1327,10 @@ static void wined3d_cs_st_submit(struct wined3d_cs *cs)
|
||||
wined3d_cs_op_handlers[opcode](cs, cs->data);
|
||||
}
|
||||
|
||||
@@ -103,10 +103,10 @@ index 8ed049e..5931569 100644
|
||||
|
||||
struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 60088b0..0b2f47b 100644
|
||||
index 6d83082..edd68ae 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -2403,6 +2403,16 @@ struct wined3d_sampler * CDECL wined3d_device_get_vs_sampler(const struct wined3
|
||||
@@ -2439,6 +2439,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 60088b0..0b2f47b 100644
|
||||
HRESULT CDECL wined3d_device_set_vs_consts_b(struct wined3d_device *device,
|
||||
unsigned int start_idx, unsigned int count, const BOOL *constants)
|
||||
{
|
||||
@@ -2430,7 +2440,7 @@ HRESULT CDECL wined3d_device_set_vs_consts_b(struct wined3d_device *device,
|
||||
@@ -2466,7 +2476,7 @@ HRESULT CDECL wined3d_device_set_vs_consts_b(struct wined3d_device *device,
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -132,7 +132,7 @@ index 60088b0..0b2f47b 100644
|
||||
}
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -2479,7 +2489,7 @@ HRESULT CDECL wined3d_device_set_vs_consts_i(struct wined3d_device *device,
|
||||
@@ -2515,7 +2525,7 @@ HRESULT CDECL wined3d_device_set_vs_consts_i(struct wined3d_device *device,
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -141,7 +141,7 @@ index 60088b0..0b2f47b 100644
|
||||
}
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -2524,7 +2534,7 @@ HRESULT CDECL wined3d_device_set_vs_consts_f(struct wined3d_device *device,
|
||||
@@ -2560,7 +2570,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 60088b0..0b2f47b 100644
|
||||
|
||||
return WINED3D_OK;
|
||||
}
|
||||
@@ -2663,7 +2673,7 @@ HRESULT CDECL wined3d_device_set_ps_consts_b(struct wined3d_device *device,
|
||||
@@ -2699,7 +2709,7 @@ HRESULT CDECL wined3d_device_set_ps_consts_b(struct wined3d_device *device,
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -159,7 +159,7 @@ index 60088b0..0b2f47b 100644
|
||||
}
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -2712,7 +2722,7 @@ HRESULT CDECL wined3d_device_set_ps_consts_i(struct wined3d_device *device,
|
||||
@@ -2748,7 +2758,7 @@ HRESULT CDECL wined3d_device_set_ps_consts_i(struct wined3d_device *device,
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -168,7 +168,7 @@ index 60088b0..0b2f47b 100644
|
||||
}
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -2758,7 +2768,7 @@ HRESULT CDECL wined3d_device_set_ps_consts_f(struct wined3d_device *device,
|
||||
@@ -2794,7 +2804,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,7 +178,7 @@ index 60088b0..0b2f47b 100644
|
||||
return WINED3D_OK;
|
||||
}
|
||||
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
|
||||
index c239a47..87b2602 100644
|
||||
index 2a03b9f..d13f429 100644
|
||||
--- a/dlls/wined3d/glsl_shader.c
|
||||
+++ b/dlls/wined3d/glsl_shader.c
|
||||
@@ -1601,6 +1601,11 @@ static void shader_glsl_update_float_vertex_constants(struct wined3d_device *dev
|
||||
@@ -206,10 +206,10 @@ index c239a47..87b2602 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 d1b59e1..608627e 100644
|
||||
index b1635de..6e86ef2 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2995,22 +2995,10 @@ void state_init(struct wined3d_state *state, struct wined3d_fb_state *fb,
|
||||
@@ -3006,22 +3006,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,9 +232,9 @@ index d1b59e1..608627e 100644
|
||||
};
|
||||
|
||||
struct wined3d_cs
|
||||
@@ -3077,12 +3065,6 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs,
|
||||
struct wined3d_vertex_declaration *declaration) DECLSPEC_HIDDEN;
|
||||
@@ -3092,12 +3080,6 @@ 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_unload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
|
||||
-static inline void wined3d_cs_push_constants(struct wined3d_cs *cs, enum wined3d_push_constants p,
|
||||
- unsigned int start_idx, unsigned int count, const void *constants)
|
||||
@@ -246,5 +246,5 @@ index d1b59e1..608627e 100644
|
||||
* fixed function semantics as D3DCOLOR or FLOAT16 */
|
||||
enum wined3d_buffer_conversion_type
|
||||
--
|
||||
2.8.0
|
||||
2.9.0
|
||||
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
From c96b9ddd5a522622943774e1df2d58084e483e7d Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Thu, 29 Oct 2015 17:33:23 +0100
|
||||
Subject: wined3d: Start to move surface/volume_load_location into the texture.
|
||||
|
||||
FIXME 1: This can be split up into a case by case replace.
|
||||
FIXME 2: This breaks some rtv->resource != buffer checks.
|
||||
|
||||
wined3d_surface_prepare will be moved into the texture a lot later, after
|
||||
moving allocation of all locations (including sysmem) there.
|
||||
---
|
||||
dlls/wined3d/texture.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index 873d72b..0acc74f 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -1441,6 +1441,7 @@ void wined3d_texture_upload_data(struct wined3d_texture *texture, unsigned int s
|
||||
context, data, row_pitch, slice_pitch);
|
||||
}
|
||||
|
||||
+/* Context activation is done by the caller. */
|
||||
static void texture2d_upload_data(struct wined3d_texture *texture, unsigned int sub_resource_idx,
|
||||
const struct wined3d_context *context, const struct wined3d_const_bo_address *data,
|
||||
unsigned int row_pitch, unsigned int slice_pitch)
|
||||
--
|
||||
2.9.0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 6930278bb1ba99c7cfcbd1cfaef73c8034cc48a7 Mon Sep 17 00:00:00 2001
|
||||
From 4775d9698edbbab7c039f42a82c3add9181133c2 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Tue, 17 Nov 2015 23:13:29 -0800
|
||||
Subject: wined3d: Call texture_load_location instead of surface_load_location.
|
||||
@@ -6,11 +6,10 @@ Subject: wined3d: Call texture_load_location instead of surface_load_location.
|
||||
---
|
||||
dlls/wined3d/device.c | 9 ++++++---
|
||||
dlls/wined3d/surface.c | 5 +++--
|
||||
dlls/wined3d/texture.c | 2 +-
|
||||
3 files changed, 10 insertions(+), 6 deletions(-)
|
||||
2 files changed, 9 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index e052557..604be94 100644
|
||||
index edd68ae..5879f7e 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -203,12 +203,15 @@ void device_switch_onscreen_ds(struct wined3d_device *device,
|
||||
@@ -63,19 +62,6 @@ index 2796590..5dfdcfd 100644
|
||||
}
|
||||
|
||||
if (texture->resource.usage & WINED3DUSAGE_DEPTHSTENCIL)
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index 0acc74f..2d155cb 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -2883,7 +2883,7 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i
|
||||
if (device->d3d_initialized)
|
||||
context = context_acquire(device, NULL);
|
||||
|
||||
- surface_load_location(surface, context, texture->resource.map_binding);
|
||||
+ wined3d_texture_load_location(texture, sub_resource_idx, context, texture->resource.map_binding);
|
||||
wined3d_texture_invalidate_location(texture, sub_resource_idx, ~texture->resource.map_binding);
|
||||
|
||||
if (!surface->dc)
|
||||
--
|
||||
2.9.0
|
||||
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
From 1ae4626e129479f2b9d92e1a3fbf643b3173496b Mon Sep 17 00:00:00 2001
|
||||
From 9ac471fe3bc3eb4156bbcfef799314dabed8eec7 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Tue, 1 Oct 2013 14:31:56 +0200
|
||||
Subject: wined3d: Hackily introduce a multithreaded command stream
|
||||
|
||||
---
|
||||
dlls/wined3d/cs.c | 369 +++++++++++++++++++++++++++++++++++++----
|
||||
dlls/wined3d/cs.c | 373 +++++++++++++++++++++++++++++++++++++----
|
||||
dlls/wined3d/wined3d_main.c | 9 +
|
||||
dlls/wined3d/wined3d_private.h | 18 ++
|
||||
3 files changed, 366 insertions(+), 30 deletions(-)
|
||||
3 files changed, 369 insertions(+), 31 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 0553d4a..5d97d9a 100644
|
||||
index 825523e..bb090a3 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -24,8 +24,19 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d);
|
||||
@@ -33,10 +33,10 @@ index 0553d4a..5d97d9a 100644
|
||||
WINED3D_CS_OP_PRESENT,
|
||||
WINED3D_CS_OP_CLEAR,
|
||||
WINED3D_CS_OP_DRAW,
|
||||
@@ -55,6 +66,18 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_RESET_STATE,
|
||||
@@ -56,6 +67,18 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_DESTROY_OBJECT,
|
||||
WINED3D_CS_OP_QUERY_ISSUE,
|
||||
WINED3D_CS_OP_UNLOAD_RESOURCE,
|
||||
+ WINED3D_CS_OP_STOP,
|
||||
+};
|
||||
+
|
||||
@@ -52,8 +52,8 @@ index 0553d4a..5d97d9a 100644
|
||||
};
|
||||
|
||||
struct wined3d_cs_present
|
||||
@@ -275,7 +298,134 @@ struct wined3d_cs_query_issue
|
||||
DWORD flags;
|
||||
@@ -282,7 +305,134 @@ struct wined3d_cs_unload_resource
|
||||
struct wined3d_resource *resource;
|
||||
};
|
||||
|
||||
-static void wined3d_cs_exec_present(struct wined3d_cs *cs, const void *data)
|
||||
@@ -188,7 +188,7 @@ index 0553d4a..5d97d9a 100644
|
||||
{
|
||||
const struct wined3d_cs_present *op = data;
|
||||
struct wined3d_swapchain *swapchain;
|
||||
@@ -291,6 +441,8 @@ static void wined3d_cs_exec_present(struct wined3d_cs *cs, const void *data)
|
||||
@@ -298,6 +448,8 @@ static void wined3d_cs_exec_present(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
wined3d_resource_release(&swapchain->back_buffers[i]->resource);
|
||||
}
|
||||
@@ -197,7 +197,7 @@ index 0553d4a..5d97d9a 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *swapchain,
|
||||
@@ -316,13 +468,14 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
|
||||
@@ -323,13 +475,14 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@@ -213,7 +213,7 @@ index 0553d4a..5d97d9a 100644
|
||||
|
||||
device = cs->device;
|
||||
state = &device->state;
|
||||
@@ -341,6 +494,8 @@ static void wined3d_cs_exec_clear(struct wined3d_cs *cs, const void *data)
|
||||
@@ -348,6 +501,8 @@ static void wined3d_cs_exec_clear(struct wined3d_cs *cs, const void *data)
|
||||
}
|
||||
if (op->flags & (WINED3DCLEAR_ZBUFFER | WINED3DCLEAR_STENCIL))
|
||||
wined3d_resource_release(state->fb.depth_stencil->resource);
|
||||
@@ -222,7 +222,7 @@ index 0553d4a..5d97d9a 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *rects,
|
||||
@@ -373,7 +528,7 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
@@ -380,7 +535,7 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@@ -231,7 +231,7 @@ index 0553d4a..5d97d9a 100644
|
||||
{
|
||||
struct wined3d_state *state = &cs->device->state;
|
||||
struct wined3d_shader_sampler_map_entry *entry;
|
||||
@@ -432,6 +587,8 @@ static void wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
|
||||
@@ -439,6 +594,8 @@ static void wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
|
||||
wined3d_resource_release(view->resource);
|
||||
}
|
||||
}
|
||||
@@ -240,7 +240,7 @@ index 0553d4a..5d97d9a 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned int start_idx,
|
||||
@@ -497,12 +654,14 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned i
|
||||
@@ -504,12 +661,14 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned i
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@@ -256,7 +256,7 @@ index 0553d4a..5d97d9a 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query *predicate, BOOL value)
|
||||
@@ -517,12 +676,14 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query
|
||||
@@ -524,12 +683,14 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@@ -272,7 +272,7 @@ index 0553d4a..5d97d9a 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_viewport *viewport)
|
||||
@@ -536,12 +697,14 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
|
||||
@@ -543,12 +704,14 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@@ -288,7 +288,7 @@ index 0553d4a..5d97d9a 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
|
||||
@@ -555,12 +718,14 @@ void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
|
||||
@@ -562,12 +725,14 @@ void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@@ -304,7 +304,7 @@ index 0553d4a..5d97d9a 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int view_idx,
|
||||
@@ -576,7 +741,7 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
|
||||
@@ -583,7 +748,7 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@@ -313,7 +313,7 @@ index 0553d4a..5d97d9a 100644
|
||||
{
|
||||
const struct wined3d_cs_set_depth_stencil_view *op = data;
|
||||
struct wined3d_device *device = cs->device;
|
||||
@@ -615,6 +780,8 @@ static void wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
|
||||
@@ -622,6 +787,8 @@ static void wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
|
||||
}
|
||||
|
||||
device_invalidate_state(device, STATE_FRAMEBUFFER);
|
||||
@@ -322,7 +322,7 @@ index 0553d4a..5d97d9a 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3d_rendertarget_view *view)
|
||||
@@ -628,12 +795,14 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3
|
||||
@@ -635,12 +802,14 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@@ -338,7 +338,7 @@ index 0553d4a..5d97d9a 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3d_vertex_declaration *declaration)
|
||||
@@ -647,7 +816,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
|
||||
@@ -654,7 +823,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@@ -347,7 +347,7 @@ index 0553d4a..5d97d9a 100644
|
||||
{
|
||||
const struct wined3d_cs_set_stream_source *op = data;
|
||||
struct wined3d_stream_state *stream;
|
||||
@@ -665,6 +834,8 @@ static void wined3d_cs_exec_set_stream_source(struct wined3d_cs *cs, const void
|
||||
@@ -672,6 +841,8 @@ static void wined3d_cs_exec_set_stream_source(struct wined3d_cs *cs, const void
|
||||
InterlockedDecrement(&prev->resource.bind_count);
|
||||
|
||||
device_invalidate_state(cs->device, STATE_STREAMSRC);
|
||||
@@ -356,7 +356,7 @@ index 0553d4a..5d97d9a 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -682,7 +853,7 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -689,7 +860,7 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@@ -365,7 +365,7 @@ index 0553d4a..5d97d9a 100644
|
||||
{
|
||||
const struct wined3d_cs_set_stream_source_freq *op = data;
|
||||
struct wined3d_stream_state *stream;
|
||||
@@ -692,6 +863,8 @@ static void wined3d_cs_exec_set_stream_source_freq(struct wined3d_cs *cs, const
|
||||
@@ -699,6 +870,8 @@ static void wined3d_cs_exec_set_stream_source_freq(struct wined3d_cs *cs, const
|
||||
stream->flags = op->flags;
|
||||
|
||||
device_invalidate_state(cs->device, STATE_STREAMSRC);
|
||||
@@ -374,7 +374,7 @@ index 0553d4a..5d97d9a 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_idx, UINT frequency, UINT flags)
|
||||
@@ -707,7 +880,7 @@ void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_i
|
||||
@@ -714,7 +887,7 @@ void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_i
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@@ -383,7 +383,7 @@ index 0553d4a..5d97d9a 100644
|
||||
{
|
||||
const struct wined3d_cs_set_stream_output *op = data;
|
||||
struct wined3d_stream_output *stream;
|
||||
@@ -722,6 +895,8 @@ static void wined3d_cs_exec_set_stream_output(struct wined3d_cs *cs, const void
|
||||
@@ -729,6 +902,8 @@ static void wined3d_cs_exec_set_stream_output(struct wined3d_cs *cs, const void
|
||||
InterlockedIncrement(&op->buffer->resource.bind_count);
|
||||
if (prev)
|
||||
InterlockedDecrement(&prev->resource.bind_count);
|
||||
@@ -392,7 +392,7 @@ index 0553d4a..5d97d9a 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -738,7 +913,7 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -745,7 +920,7 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@@ -401,7 +401,7 @@ index 0553d4a..5d97d9a 100644
|
||||
{
|
||||
const struct wined3d_cs_set_index_buffer *op = data;
|
||||
struct wined3d_buffer *prev;
|
||||
@@ -754,6 +929,8 @@ static void wined3d_cs_exec_set_index_buffer(struct wined3d_cs *cs, const void *
|
||||
@@ -761,6 +936,8 @@ static void wined3d_cs_exec_set_index_buffer(struct wined3d_cs *cs, const void *
|
||||
InterlockedDecrement(&prev->resource.bind_count);
|
||||
|
||||
device_invalidate_state(cs->device, STATE_INDEXBUFFER);
|
||||
@@ -410,7 +410,7 @@ index 0553d4a..5d97d9a 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buffer *buffer,
|
||||
@@ -770,7 +947,7 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
|
||||
@@ -777,7 +954,7 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@@ -419,7 +419,7 @@ index 0553d4a..5d97d9a 100644
|
||||
{
|
||||
const struct wined3d_cs_set_constant_buffer *op = data;
|
||||
struct wined3d_buffer *prev;
|
||||
@@ -784,6 +961,7 @@ static void wined3d_cs_exec_set_constant_buffer(struct wined3d_cs *cs, const voi
|
||||
@@ -791,6 +968,7 @@ static void wined3d_cs_exec_set_constant_buffer(struct wined3d_cs *cs, const voi
|
||||
InterlockedDecrement(&prev->resource.bind_count);
|
||||
|
||||
device_invalidate_state(cs->device, STATE_CONSTANT_BUFFER(op->type));
|
||||
@@ -427,7 +427,7 @@ index 0553d4a..5d97d9a 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_shader_type type,
|
||||
@@ -800,7 +978,7 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
|
||||
@@ -807,7 +985,7 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@@ -436,7 +436,7 @@ index 0553d4a..5d97d9a 100644
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info = &cs->device->adapter->gl_info;
|
||||
const struct wined3d_d3d_info *d3d_info = &cs->device->adapter->d3d_info;
|
||||
@@ -877,6 +1055,8 @@ static void wined3d_cs_exec_set_texture(struct wined3d_cs *cs, const void *data)
|
||||
@@ -884,6 +1062,8 @@ static void wined3d_cs_exec_set_texture(struct wined3d_cs *cs, const void *data)
|
||||
|
||||
if (new_use_color_key)
|
||||
device_invalidate_state(cs->device, STATE_COLOR_KEY);
|
||||
@@ -445,7 +445,7 @@ index 0553d4a..5d97d9a 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined3d_texture *texture)
|
||||
@@ -891,12 +1071,14 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
|
||||
@@ -898,12 +1078,14 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@@ -461,7 +461,7 @@ index 0553d4a..5d97d9a 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3d_shader_type type,
|
||||
@@ -913,12 +1095,14 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
|
||||
@@ -920,12 +1102,14 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@@ -477,7 +477,7 @@ index 0553d4a..5d97d9a 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type type,
|
||||
@@ -935,13 +1119,15 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
@@ -942,13 +1126,15 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@@ -494,7 +494,7 @@ index 0553d4a..5d97d9a 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type type, struct wined3d_shader *shader)
|
||||
@@ -956,12 +1142,14 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
@@ -963,12 +1149,14 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@@ -510,7 +510,7 @@ index 0553d4a..5d97d9a 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
|
||||
@@ -976,12 +1164,14 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
|
||||
@@ -983,12 +1171,14 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@@ -526,7 +526,7 @@ index 0553d4a..5d97d9a 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render_state state, DWORD value)
|
||||
@@ -996,12 +1186,14 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
|
||||
@@ -1003,12 +1193,14 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@@ -542,7 +542,7 @@ index 0553d4a..5d97d9a 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
|
||||
@@ -1018,12 +1210,14 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
|
||||
@@ -1025,12 +1217,14 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@@ -558,7 +558,7 @@ index 0553d4a..5d97d9a 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
|
||||
@@ -1040,13 +1234,15 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
|
||||
@@ -1047,13 +1241,15 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@@ -575,7 +575,7 @@ index 0553d4a..5d97d9a 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform_state state,
|
||||
@@ -1062,12 +1258,14 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
|
||||
@@ -1069,12 +1265,14 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@@ -591,7 +591,7 @@ index 0553d4a..5d97d9a 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const struct wined3d_vec4 *plane)
|
||||
@@ -1082,7 +1280,7 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
|
||||
@@ -1089,7 +1287,7 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@@ -600,7 +600,7 @@ index 0553d4a..5d97d9a 100644
|
||||
{
|
||||
const struct wined3d_cs_set_color_key *op = data;
|
||||
struct wined3d_texture *texture = op->texture;
|
||||
@@ -1143,6 +1341,8 @@ static void wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *dat
|
||||
@@ -1150,6 +1348,8 @@ static void wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *dat
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -609,7 +609,7 @@ index 0553d4a..5d97d9a 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture *texture,
|
||||
@@ -1165,12 +1365,14 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
|
||||
@@ -1172,12 +1372,14 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@@ -625,7 +625,7 @@ index 0553d4a..5d97d9a 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_material *material)
|
||||
@@ -1184,7 +1386,7 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
|
||||
@@ -1191,7 +1393,7 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@@ -634,7 +634,7 @@ index 0553d4a..5d97d9a 100644
|
||||
{
|
||||
struct wined3d_adapter *adapter = cs->device->adapter;
|
||||
HRESULT hr;
|
||||
@@ -1194,6 +1396,8 @@ static void wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1201,6 +1403,8 @@ static void wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data)
|
||||
if (FAILED(hr = state_init(&cs->state, &adapter->gl_info, &adapter->d3d_info,
|
||||
WINED3D_STATE_NO_REF | WINED3D_STATE_INIT_DEFAULT)))
|
||||
ERR("Failed to initialize CS state, hr %#x.\n", hr);
|
||||
@@ -643,7 +643,7 @@ index 0553d4a..5d97d9a 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
@@ -1206,11 +1410,13 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
@@ -1213,11 +1417,13 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@@ -658,7 +658,7 @@ index 0553d4a..5d97d9a 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs, void (*callback)(void *object), void *object)
|
||||
@@ -1225,12 +1431,14 @@ void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs, void (*callback)(void
|
||||
@@ -1232,12 +1438,14 @@ void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs, void (*callback)(void
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@@ -674,7 +674,23 @@ index 0553d4a..5d97d9a 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *query, DWORD flags)
|
||||
@@ -1245,8 +1453,9 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
|
||||
@@ -1252,12 +1460,14 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
-static void wined3d_cs_exec_unload_resource(struct wined3d_cs *cs, const void *data)
|
||||
+static UINT wined3d_cs_exec_unload_resource(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
const struct wined3d_cs_unload_resource *op = data;
|
||||
struct wined3d_resource *resource = op->resource;
|
||||
|
||||
resource->resource_ops->resource_unload(resource);
|
||||
+
|
||||
+ return sizeof(*op);
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource)
|
||||
@@ -1271,8 +1481,9 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@@ -685,7 +701,7 @@ index 0553d4a..5d97d9a 100644
|
||||
/* WINED3D_CS_OP_PRESENT */ wined3d_cs_exec_present,
|
||||
/* WINED3D_CS_OP_CLEAR */ wined3d_cs_exec_clear,
|
||||
/* WINED3D_CS_OP_DRAW */ wined3d_cs_exec_draw,
|
||||
@@ -1308,6 +1517,58 @@ static const struct wined3d_cs_ops wined3d_cs_st_ops =
|
||||
@@ -1335,6 +1546,58 @@ static const struct wined3d_cs_ops wined3d_cs_st_ops =
|
||||
wined3d_cs_st_submit,
|
||||
};
|
||||
|
||||
@@ -744,7 +760,7 @@ index 0553d4a..5d97d9a 100644
|
||||
struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
|
||||
@@ -1334,12 +1595,60 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
@@ -1361,12 +1624,60 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -833,7 +849,7 @@ index 1dd6a8b..f573dcb 100644
|
||||
|
||||
if (appkey) RegCloseKey( appkey );
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index b8511dc..5320680 100644
|
||||
index 54f3f93..be51bba 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -310,6 +310,7 @@ struct wined3d_settings
|
||||
@@ -844,7 +860,7 @@ index b8511dc..5320680 100644
|
||||
};
|
||||
|
||||
extern struct wined3d_settings wined3d_settings DECLSPEC_HIDDEN;
|
||||
@@ -3026,6 +3027,18 @@ HRESULT state_init(struct wined3d_state *state, const struct wined3d_gl_info *gl
|
||||
@@ -3029,6 +3030,18 @@ HRESULT state_init(struct wined3d_state *state, const struct wined3d_gl_info *gl
|
||||
const struct wined3d_d3d_info *d3d_info, DWORD flags) DECLSPEC_HIDDEN;
|
||||
void state_unbind_resources(struct wined3d_state *state) DECLSPEC_HIDDEN;
|
||||
|
||||
@@ -863,7 +879,7 @@ index b8511dc..5320680 100644
|
||||
struct wined3d_cs_ops
|
||||
{
|
||||
void *(*require_space)(struct wined3d_cs *cs, size_t size);
|
||||
@@ -3037,9 +3050,14 @@ struct wined3d_cs
|
||||
@@ -3040,9 +3053,14 @@ struct wined3d_cs
|
||||
const struct wined3d_cs_ops *ops;
|
||||
struct wined3d_device *device;
|
||||
struct wined3d_state state;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From ffb4510b1d1584bdd4571eff25b126ae86082628 Mon Sep 17 00:00:00 2001
|
||||
From c035e4e85a946c3da7299aa483d5e219bdbbcb1f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Tue, 1 Oct 2013 15:30:26 +0200
|
||||
Subject: wined3d: Give the cs its own state
|
||||
@@ -10,19 +10,19 @@ Subject: wined3d: Give the cs its own state
|
||||
3 files changed, 81 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 0fbdc2c..e693cde 100644
|
||||
index 187cb96..43ec54d 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -66,6 +66,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_RESET_STATE,
|
||||
@@ -67,6 +67,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_DESTROY_OBJECT,
|
||||
WINED3D_CS_OP_QUERY_ISSUE,
|
||||
WINED3D_CS_OP_UNLOAD_RESOURCE,
|
||||
+ WINED3D_CS_OP_STATEBLOCK,
|
||||
WINED3D_CS_OP_STOP,
|
||||
};
|
||||
|
||||
@@ -298,6 +299,12 @@ struct wined3d_cs_query_issue
|
||||
DWORD flags;
|
||||
@@ -305,6 +306,12 @@ struct wined3d_cs_unload_resource
|
||||
struct wined3d_resource *resource;
|
||||
};
|
||||
|
||||
+struct wined3d_cs_stateblock
|
||||
@@ -34,7 +34,7 @@ index 0fbdc2c..e693cde 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)
|
||||
{
|
||||
@@ -478,7 +485,7 @@ static UINT wined3d_cs_exec_clear(struct wined3d_cs *cs, const void *data)
|
||||
@@ -485,7 +492,7 @@ static UINT wined3d_cs_exec_clear(struct wined3d_cs *cs, const void *data)
|
||||
size_t size = FIELD_OFFSET(struct wined3d_cs_clear, rects[op->rect_count]);
|
||||
|
||||
device = cs->device;
|
||||
@@ -43,7 +43,7 @@ index 0fbdc2c..e693cde 100644
|
||||
wined3d_get_draw_rect(state, &draw_rect);
|
||||
device_clear_render_targets(device, device->adapter->gl_info.limits.buffers,
|
||||
&cs->state.fb, op->rect_count, op->rects, &draw_rect, op->flags,
|
||||
@@ -530,7 +537,7 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
@@ -537,7 +544,7 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
|
||||
static UINT wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
@@ -52,7 +52,7 @@ index 0fbdc2c..e693cde 100644
|
||||
struct wined3d_shader_sampler_map_entry *entry;
|
||||
struct wined3d_shader_resource_view *view;
|
||||
const struct wined3d_cs_draw *op = data;
|
||||
@@ -1067,6 +1074,55 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
|
||||
@@ -1074,6 +1081,55 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
|
||||
op->opcode = WINED3D_CS_OP_SET_TEXTURE;
|
||||
op->stage = stage;
|
||||
op->texture = texture;
|
||||
@@ -108,15 +108,15 @@ index 0fbdc2c..e693cde 100644
|
||||
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
@@ -1485,6 +1541,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_RESET_STATE */ wined3d_cs_exec_reset_state,
|
||||
@@ -1514,6 +1570,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_DESTROY_OBJECT */ wined3d_cs_exec_destroy_object,
|
||||
/* WINED3D_CS_OP_QUERY_ISSUE */ wined3d_cs_exec_query_issue,
|
||||
/* WINED3D_CS_OP_UNLOAD_RESOURCE */ wined3d_cs_exec_unload_resource,
|
||||
+ /* WINED3D_CS_OP_STATEBLOCK */ wined3d_cs_exec_transfer_stateblock,
|
||||
};
|
||||
|
||||
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
|
||||
@@ -1574,7 +1631,7 @@ done:
|
||||
@@ -1603,7 +1660,7 @@ done:
|
||||
struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
|
||||
@@ -125,7 +125,7 @@ index 0fbdc2c..e693cde 100644
|
||||
|
||||
if (!(cs = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*cs))))
|
||||
return NULL;
|
||||
@@ -1582,8 +1639,7 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
@@ -1611,8 +1668,7 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
if (FAILED(state_init(&cs->state, gl_info, &device->adapter->d3d_info,
|
||||
WINED3D_STATE_NO_REF | WINED3D_STATE_INIT_DEFAULT)))
|
||||
{
|
||||
@@ -135,7 +135,7 @@ index 0fbdc2c..e693cde 100644
|
||||
}
|
||||
|
||||
cs->ops = &wined3d_cs_st_ops;
|
||||
@@ -1592,17 +1648,13 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
@@ -1621,17 +1677,13 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
cs->data_size = WINED3D_INITIAL_CS_SIZE;
|
||||
if (!(cs->data = HeapAlloc(GetProcessHeap(), 0, cs->data_size)))
|
||||
{
|
||||
@@ -155,7 +155,7 @@ index 0fbdc2c..e693cde 100644
|
||||
}
|
||||
|
||||
if (wined3d_settings.cs_multithreaded)
|
||||
@@ -1615,15 +1667,22 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
@@ -1644,15 +1696,22 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
if (!(cs->thread = CreateThread(NULL, 0, wined3d_cs_run, cs, 0, NULL)))
|
||||
{
|
||||
ERR("Failed to create wined3d command stream thread.\n");
|
||||
@@ -184,10 +184,10 @@ index 0fbdc2c..e693cde 100644
|
||||
|
||||
void wined3d_cs_destroy(struct wined3d_cs *cs)
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 48d4af4..07c086f 100644
|
||||
index 27b32e1..8ae932f 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -3545,6 +3545,7 @@ HRESULT CDECL wined3d_device_draw_primitive(struct wined3d_device *device, UINT
|
||||
@@ -3554,6 +3554,7 @@ HRESULT CDECL wined3d_device_draw_primitive(struct wined3d_device *device, UINT
|
||||
{
|
||||
TRACE("device %p, start_vertex %u, vertex_count %u.\n", device, start_vertex, vertex_count);
|
||||
|
||||
@@ -195,7 +195,7 @@ index 48d4af4..07c086f 100644
|
||||
wined3d_cs_emit_draw(device->cs, 0, start_vertex, vertex_count, 0, 0, FALSE);
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -3573,6 +3574,7 @@ HRESULT CDECL wined3d_device_draw_indexed_primitive(struct wined3d_device *devic
|
||||
@@ -3582,6 +3583,7 @@ HRESULT CDECL wined3d_device_draw_indexed_primitive(struct wined3d_device *devic
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@@ -203,7 +203,7 @@ index 48d4af4..07c086f 100644
|
||||
wined3d_cs_emit_draw(device->cs, device->state.base_vertex_index, start_idx, index_count, 0, 0, TRUE);
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -3584,6 +3586,7 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device
|
||||
@@ -3593,6 +3595,7 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device
|
||||
TRACE("device %p, start_idx %u, index_count %u, start_instance %u, instance_count %u.\n",
|
||||
device, start_idx, index_count, start_instance, instance_count);
|
||||
|
||||
@@ -212,10 +212,10 @@ index 48d4af4..07c086f 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 b5a8a30..c460520 100644
|
||||
index 4d5fc99..9055230 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -3036,7 +3036,7 @@ struct wined3d_cs_block
|
||||
@@ -3039,7 +3039,7 @@ struct wined3d_cs_block
|
||||
{
|
||||
struct list entry;
|
||||
UINT pos;
|
||||
@@ -224,7 +224,7 @@ index b5a8a30..c460520 100644
|
||||
};
|
||||
|
||||
struct wined3d_cs_ops
|
||||
@@ -3080,6 +3080,8 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
|
||||
@@ -3083,6 +3083,8 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
|
||||
WORD flags, const struct wined3d_color_key *color_key) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_shader_type type,
|
||||
UINT cb_idx, struct wined3d_buffer *buffer) DECLSPEC_HIDDEN;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 0c8b5c8eb141991e967ff7fd7694be40704233d9 Mon Sep 17 00:00:00 2001
|
||||
From f3fea3385811f1aa0ce48a65f0b33f9b5aebc695 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,19 +10,19 @@ 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 e693cde..ec1cc22 100644
|
||||
index 43ec54d..92c251c 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -67,6 +67,8 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_DESTROY_OBJECT,
|
||||
@@ -68,6 +68,8 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_QUERY_ISSUE,
|
||||
WINED3D_CS_OP_UNLOAD_RESOURCE,
|
||||
WINED3D_CS_OP_STATEBLOCK,
|
||||
+ WINED3D_CS_OP_SET_VS_CONSTS_F,
|
||||
+ WINED3D_CS_OP_SET_PS_CONSTS_F,
|
||||
WINED3D_CS_OP_STOP,
|
||||
};
|
||||
|
||||
@@ -305,6 +307,14 @@ struct wined3d_cs_stateblock
|
||||
@@ -312,6 +314,14 @@ struct wined3d_cs_stateblock
|
||||
struct wined3d_state state;
|
||||
};
|
||||
|
||||
@@ -37,7 +37,7 @@ index e693cde..ec1cc22 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)
|
||||
{
|
||||
@@ -1089,11 +1099,9 @@ static UINT wined3d_cs_exec_transfer_stateblock(struct wined3d_cs *cs, const voi
|
||||
@@ -1096,11 +1106,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 e693cde..ec1cc22 100644
|
||||
|
||||
memcpy(cs->state.lights, op->state.lights, sizeof(cs->state.lights));
|
||||
|
||||
@@ -1114,11 +1122,9 @@ void wined3d_cs_emit_transfer_stateblock(struct wined3d_cs *cs, const struct win
|
||||
@@ -1121,11 +1129,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 e693cde..ec1cc22 100644
|
||||
|
||||
/* FIXME: This is not ideal. CS is still running synchronously, so this is ok.
|
||||
* It will go away soon anyway. */
|
||||
@@ -1220,6 +1226,65 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
|
||||
@@ -1227,6 +1233,65 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@@ -127,9 +127,9 @@ index e693cde..ec1cc22 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;
|
||||
@@ -1542,6 +1607,8 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_DESTROY_OBJECT */ wined3d_cs_exec_destroy_object,
|
||||
@@ -1571,6 +1636,8 @@ 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_UNLOAD_RESOURCE */ wined3d_cs_exec_unload_resource,
|
||||
/* 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,
|
||||
@@ -137,10 +137,10 @@ index e693cde..ec1cc22 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 07c086f..9e5dfd6 100644
|
||||
index 8ae932f..7006c62 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -2544,7 +2544,8 @@ HRESULT CDECL wined3d_device_set_vs_consts_f(struct wined3d_device *device,
|
||||
@@ -2553,7 +2553,8 @@ HRESULT CDECL wined3d_device_set_vs_consts_f(struct wined3d_device *device,
|
||||
memset(&device->recording->changed.vs_consts_f[start_idx], 1,
|
||||
count * sizeof(*device->recording->changed.vs_consts_f));
|
||||
else
|
||||
@@ -150,7 +150,7 @@ index 07c086f..9e5dfd6 100644
|
||||
|
||||
return WINED3D_OK;
|
||||
}
|
||||
@@ -2778,7 +2779,8 @@ HRESULT CDECL wined3d_device_set_ps_consts_f(struct wined3d_device *device,
|
||||
@@ -2787,7 +2788,8 @@ HRESULT CDECL wined3d_device_set_ps_consts_f(struct wined3d_device *device,
|
||||
memset(&device->recording->changed.ps_consts_f[start_idx], 1,
|
||||
count * sizeof(*device->recording->changed.ps_consts_f));
|
||||
else
|
||||
@@ -161,18 +161,18 @@ index 07c086f..9e5dfd6 100644
|
||||
return WINED3D_OK;
|
||||
}
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index c460520..567f84a 100644
|
||||
index 9055230..ebdb49e 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -3118,6 +3118,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;
|
||||
@@ -3083,6 +3083,8 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
|
||||
WORD flags, const struct wined3d_color_key *color_key) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_shader_type type,
|
||||
UINT cb_idx, struct wined3d_buffer *buffer) DECLSPEC_HIDDEN;
|
||||
+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;
|
||||
|
||||
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
|
||||
* fixed function semantics as D3DCOLOR or FLOAT16 */
|
||||
void wined3d_cs_emit_transfer_stateblock(struct wined3d_cs *cs,
|
||||
const struct wined3d_state *state) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs,
|
||||
--
|
||||
2.9.0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 93cf61ce628c2b237675907ad81eb9292beaedf7 Mon Sep 17 00:00:00 2001
|
||||
From f62a560d5351df46166c32859e13ab43f7a43453 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
|
||||
@@ -6,17 +6,17 @@ Subject: wined3d: Request a glFinish before modifying resources outside the cs
|
||||
---
|
||||
dlls/wined3d/buffer.c | 17 +++++++++++++++++
|
||||
dlls/wined3d/cs.c | 30 ++++++++++++++++++++++++++++++
|
||||
dlls/wined3d/device.c | 35 +++++++++++++++++++++++++++++++++++
|
||||
dlls/wined3d/device.c | 27 +++++++++++++++++++++++++++
|
||||
dlls/wined3d/surface.c | 7 +++++++
|
||||
dlls/wined3d/texture.c | 14 ++++++++++++++
|
||||
dlls/wined3d/wined3d_private.h | 1 +
|
||||
6 files changed, 104 insertions(+)
|
||||
6 files changed, 96 insertions(+)
|
||||
|
||||
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
index 6534b2d..486d770 100644
|
||||
index fc7b04d..c16578d 100644
|
||||
--- a/dlls/wined3d/buffer.c
|
||||
+++ b/dlls/wined3d/buffer.c
|
||||
@@ -935,6 +935,15 @@ void buffer_internal_preload(struct wined3d_buffer *buffer, struct wined3d_conte
|
||||
@@ -931,6 +931,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 6534b2d..486d770 100644
|
||||
context = context_acquire(buffer->resource.device, NULL);
|
||||
buffer_internal_preload(buffer, context, NULL);
|
||||
context_release(context);
|
||||
@@ -951,9 +960,17 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
|
||||
@@ -947,9 +956,17 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
|
||||
{
|
||||
LONG count;
|
||||
BYTE *base;
|
||||
@@ -51,10 +51,10 @@ index 6534b2d..486d770 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 dcbafa6..02489fd 100644
|
||||
index 92c251c..c7ee4d2 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -67,6 +67,7 @@ enum wined3d_cs_op
|
||||
@@ -70,6 +70,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_STATEBLOCK,
|
||||
WINED3D_CS_OP_SET_VS_CONSTS_F,
|
||||
WINED3D_CS_OP_SET_PS_CONSTS_F,
|
||||
@@ -62,7 +62,7 @@ index dcbafa6..02489fd 100644
|
||||
WINED3D_CS_OP_STOP,
|
||||
};
|
||||
|
||||
@@ -300,6 +301,11 @@ struct wined3d_cs_set_consts_f
|
||||
@@ -322,6 +323,11 @@ struct wined3d_cs_set_consts_f
|
||||
struct wined3d_vec4 constants[1];
|
||||
};
|
||||
|
||||
@@ -74,7 +74,7 @@ index dcbafa6..02489fd 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)
|
||||
{
|
||||
@@ -1515,6 +1521,29 @@ void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs, void (*callback)(void
|
||||
@@ -1602,6 +1608,29 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ index dcbafa6..02489fd 100644
|
||||
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_FENCE */ wined3d_cs_exec_fence,
|
||||
@@ -1548,6 +1577,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -1638,6 +1667,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_STATEBLOCK */ wined3d_cs_exec_transfer_stateblock,
|
||||
/* WINED3D_CS_OP_SET_VS_CONSTS_F */ wined3d_cs_exec_set_vs_consts_f,
|
||||
/* WINED3D_CS_OP_SET_PS_CONSTS_F */ wined3d_cs_exec_set_ps_consts_f,
|
||||
@@ -113,10 +113,10 @@ index dcbafa6..02489fd 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 77ca973..60ee130 100644
|
||||
index 7006c62..efd8093 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
|
||||
@@ -2949,6 +2949,13 @@ static HRESULT process_vertices_strided(const struct wined3d_device *device, DWO
|
||||
return hr;
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ index 77ca973..60ee130 100644
|
||||
wined3d_device_get_transform(device, WINED3D_TS_VIEW, &view_mat);
|
||||
wined3d_device_get_transform(device, WINED3D_TS_PROJECTION, &proj_mat);
|
||||
wined3d_device_get_transform(device, WINED3D_TS_WORLD_MATRIX(0), &world_mat);
|
||||
@@ -3680,6 +3687,13 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
|
||||
@@ -3715,6 +3722,13 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
|
||||
++src_skip_levels;
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ index 77ca973..60ee130 100644
|
||||
/* Make sure that the destination texture is loaded. */
|
||||
context = context_acquire(device, NULL);
|
||||
wined3d_texture_load(dst_texture, context, FALSE);
|
||||
@@ -4210,6 +4224,13 @@ HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *devi
|
||||
@@ -4245,6 +4259,13 @@ HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *devi
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@@ -158,27 +158,12 @@ index 77ca973..60ee130 100644
|
||||
if (blit_op == WINED3D_BLIT_OP_COLOR_FILL)
|
||||
return blitter->color_fill(device, view, rect, color);
|
||||
else
|
||||
@@ -4533,6 +4554,13 @@ void CDECL wined3d_device_evict_managed_resources(struct wined3d_device *device)
|
||||
|
||||
TRACE("device %p.\n", device);
|
||||
|
||||
+ if (wined3d_settings.cs_multithreaded)
|
||||
+ {
|
||||
+ FIXME("Waiting for cs.\n");
|
||||
+ wined3d_cs_emit_glfinish(device->cs);
|
||||
+ device->cs->ops->finish(device->cs);
|
||||
+ }
|
||||
+
|
||||
LIST_FOR_EACH_ENTRY_SAFE(resource, cursor, &device->resources, struct wined3d_resource, resource_list_entry)
|
||||
{
|
||||
TRACE("Checking resource %p for eviction.\n", resource);
|
||||
@@ -4655,6 +4683,13 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
@@ -4682,6 +4703,12 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
TRACE("device %p, swapchain_desc %p, mode %p, callback %p, reset_state %#x.\n",
|
||||
device, swapchain_desc, mode, callback, reset_state);
|
||||
|
||||
+ if (wined3d_settings.cs_multithreaded)
|
||||
+ {
|
||||
+ FIXME("Waiting for cs.\n");
|
||||
+ wined3d_cs_emit_glfinish(device->cs);
|
||||
+ device->cs->ops->finish(device->cs);
|
||||
+ }
|
||||
@@ -187,10 +172,10 @@ index 77ca973..60ee130 100644
|
||||
{
|
||||
ERR("Failed to get the first implicit swapchain.\n");
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 33fcf34..6944c72 100644
|
||||
index c63578a..5601804 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -4215,6 +4215,13 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
@@ -4208,6 +4208,13 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
flags &= ~WINED3D_BLT_DO_NOT_WAIT;
|
||||
}
|
||||
|
||||
@@ -205,10 +190,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 f6beefc..b09a2de 100644
|
||||
index 74e4450..1306be9 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -1699,6 +1699,13 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
|
||||
@@ -1800,6 +1800,13 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@@ -222,7 +207,7 @@ index f6beefc..b09a2de 100644
|
||||
flags = wined3d_resource_sanitize_map_flags(resource, flags);
|
||||
|
||||
if (device->d3d_initialized)
|
||||
@@ -2645,6 +2652,13 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i
|
||||
@@ -2958,6 +2965,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 +222,17 @@ index f6beefc..b09a2de 100644
|
||||
context = context_acquire(device, NULL);
|
||||
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 56de135..0f5b038 100644
|
||||
index ebdb49e..58c817d 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -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;
|
||||
@@ -3073,6 +3073,7 @@ void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs,
|
||||
void (*callback)(void *object), void *object) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned int start_idx, unsigned int index_count,
|
||||
unsigned int start_instance, unsigned int instance_count, BOOL indexed) DECLSPEC_HIDDEN;
|
||||
+void wined3d_cs_emit_glfinish(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
|
||||
|
||||
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
|
||||
* fixed function semantics as D3DCOLOR or FLOAT16 */
|
||||
void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *swapchain,
|
||||
const RECT *src_rect, const RECT *dst_rect, HWND dst_window_override, DWORD flags) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *query, DWORD flags) DECLSPEC_HIDDEN;
|
||||
--
|
||||
2.8.0
|
||||
2.9.0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 95d77becc5a2fb73947a9fbb45dbc928da09cf9a Mon Sep 17 00:00:00 2001
|
||||
From 7ebe534411e0736bc269649ea40bf6db4d2c898f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Sun, 7 Apr 2013 17:33:20 +0200
|
||||
Subject: wined3d: Send base vertex index updates through the cs
|
||||
@@ -10,10 +10,10 @@ Subject: wined3d: Send base vertex index updates through the cs
|
||||
3 files changed, 50 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index a68e9e6..0a3780b 100644
|
||||
index 1cec729..5424965 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -68,6 +68,7 @@ enum wined3d_cs_op
|
||||
@@ -71,6 +71,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_SET_VS_CONSTS_F,
|
||||
WINED3D_CS_OP_SET_PS_CONSTS_F,
|
||||
WINED3D_CS_OP_GLFINISH,
|
||||
@@ -21,7 +21,7 @@ index a68e9e6..0a3780b 100644
|
||||
WINED3D_CS_OP_STOP,
|
||||
};
|
||||
|
||||
@@ -306,6 +307,12 @@ struct wined3d_cs_finish
|
||||
@@ -328,6 +329,12 @@ struct wined3d_cs_finish
|
||||
enum wined3d_cs_op opcode;
|
||||
};
|
||||
|
||||
@@ -34,7 +34,7 @@ index a68e9e6..0a3780b 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)
|
||||
{
|
||||
@@ -543,9 +550,24 @@ static UINT wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
|
||||
@@ -565,9 +572,24 @@ static UINT wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
|
||||
struct wined3d_shader_sampler_map_entry *entry;
|
||||
struct wined3d_shader_resource_view *view;
|
||||
const struct wined3d_cs_draw *op = data;
|
||||
@@ -59,7 +59,7 @@ index a68e9e6..0a3780b 100644
|
||||
if (!cs->device->adapter->gl_info.supported[ARB_DRAW_ELEMENTS_BASE_VERTEX]
|
||||
&& state->load_base_vertex_index != op->base_vertex_idx)
|
||||
{
|
||||
@@ -1086,7 +1108,6 @@ static UINT wined3d_cs_exec_transfer_stateblock(struct wined3d_cs *cs, const voi
|
||||
@@ -1108,7 +1130,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 */
|
||||
|
||||
@@ -67,7 +67,7 @@ index a68e9e6..0a3780b 100644
|
||||
cs->state.gl_primitive_type = op->state.gl_primitive_type;
|
||||
|
||||
memcpy(cs->state.vs_consts_b, op->state.vs_consts_b, sizeof(cs->state.vs_consts_b));
|
||||
@@ -1109,7 +1130,6 @@ void wined3d_cs_emit_transfer_stateblock(struct wined3d_cs *cs, const struct win
|
||||
@@ -1131,7 +1152,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 */
|
||||
@@ -75,7 +75,7 @@ index a68e9e6..0a3780b 100644
|
||||
op->state.gl_primitive_type = state->gl_primitive_type;
|
||||
|
||||
memcpy(op->state.vs_consts_b, state->vs_consts_b, sizeof(op->state.vs_consts_b));
|
||||
@@ -1545,6 +1565,28 @@ void wined3d_cs_emit_glfinish(struct wined3d_cs *cs)
|
||||
@@ -1632,6 +1652,28 @@ void wined3d_cs_emit_glfinish(struct wined3d_cs *cs)
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ index a68e9e6..0a3780b 100644
|
||||
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_FENCE */ wined3d_cs_exec_fence,
|
||||
@@ -1579,6 +1621,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -1669,6 +1711,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_SET_VS_CONSTS_F */ wined3d_cs_exec_set_vs_consts_f,
|
||||
/* WINED3D_CS_OP_SET_PS_CONSTS_F */ wined3d_cs_exec_set_ps_consts_f,
|
||||
/* WINED3D_CS_OP_GLFINISH */ wined3d_cs_exec_glfinish,
|
||||
@@ -113,10 +113,10 @@ index a68e9e6..0a3780b 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 7a43657..fcb8d7e 100644
|
||||
index a516505..72266fb 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -1987,6 +1987,9 @@ void CDECL wined3d_device_set_base_vertex_index(struct wined3d_device *device, I
|
||||
@@ -1996,6 +1996,9 @@ void CDECL wined3d_device_set_base_vertex_index(struct wined3d_device *device, I
|
||||
TRACE("device %p, base_index %d.\n", device, base_index);
|
||||
|
||||
device->update_state->base_vertex_index = base_index;
|
||||
@@ -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 efa41ae..6096c23 100644
|
||||
index c2fc67c..0abec70 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -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;
|
||||
@@ -3076,6 +3076,8 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
|
||||
const RECT *src_rect, const RECT *dst_rect, HWND dst_window_override, DWORD flags) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *query, DWORD flags) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_reset_state(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
|
||||
+void wined3d_cs_emit_set_base_vertex_index(struct wined3d_cs *cs,
|
||||
+ UINT base_vertex_index) DECLSPEC_HIDDEN;
|
||||
|
||||
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
|
||||
* fixed function semantics as D3DCOLOR or FLOAT16 */
|
||||
void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx,
|
||||
const struct wined3d_vec4 *plane) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture *texture,
|
||||
--
|
||||
2.8.0
|
||||
2.9.0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From b0f1bcf4dbb0c48a34335bbe243581e4270e93bd Mon Sep 17 00:00:00 2001
|
||||
From e5be3dd2d9e963f7f447fb379a2739a2f5428ccb 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 0a3780b..aef2374 100644
|
||||
index 5424965..d467911 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -69,6 +69,7 @@ enum wined3d_cs_op
|
||||
@@ -72,6 +72,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 0a3780b..aef2374 100644
|
||||
WINED3D_CS_OP_STOP,
|
||||
};
|
||||
|
||||
@@ -313,6 +314,12 @@ struct wined3d_cs_set_base_vertex_index
|
||||
@@ -335,6 +336,12 @@ struct wined3d_cs_set_base_vertex_index
|
||||
UINT base_vertex_index;
|
||||
};
|
||||
|
||||
@@ -35,7 +35,7 @@ index 0a3780b..aef2374 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)
|
||||
{
|
||||
@@ -1107,9 +1114,6 @@ static UINT wined3d_cs_exec_transfer_stateblock(struct wined3d_cs *cs, const voi
|
||||
@@ -1129,9 +1136,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 0a3780b..aef2374 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));
|
||||
|
||||
@@ -1130,8 +1134,6 @@ void wined3d_cs_emit_transfer_stateblock(struct wined3d_cs *cs, const struct win
|
||||
@@ -1152,8 +1156,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 0a3780b..aef2374 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));
|
||||
|
||||
@@ -1587,6 +1589,32 @@ void wined3d_cs_emit_set_base_vertex_index(struct wined3d_cs *cs,
|
||||
@@ -1674,6 +1676,32 @@ void wined3d_cs_emit_set_base_vertex_index(struct wined3d_cs *cs,
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ index 0a3780b..aef2374 100644
|
||||
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_FENCE */ wined3d_cs_exec_fence,
|
||||
@@ -1622,6 +1650,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -1712,6 +1740,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 0a3780b..aef2374 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 fcb8d7e..36405a1 100644
|
||||
index 72266fb..7bd3994 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -3485,7 +3485,6 @@ void CDECL wined3d_device_set_primitive_type(struct wined3d_device *device,
|
||||
@@ -3520,7 +3520,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 fcb8d7e..36405a1 100644
|
||||
TRACE("device %p, primitive_type %s\n", device, debug_d3dprimitivetype(primitive_type));
|
||||
|
||||
gl_primitive_type = gl_primitive_type_from_d3d(primitive_type);
|
||||
@@ -3493,8 +3492,8 @@ void CDECL wined3d_device_set_primitive_type(struct wined3d_device *device,
|
||||
@@ -3528,8 +3527,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,7 +119,7 @@ index fcb8d7e..36405a1 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 08f5ed5..a9f313c 100644
|
||||
index bb3c0cc..732a45b 100644
|
||||
--- a/dlls/wined3d/stateblock.c
|
||||
+++ b/dlls/wined3d/stateblock.c
|
||||
@@ -1009,8 +1009,8 @@ void CDECL wined3d_stateblock_apply(const struct wined3d_stateblock *stateblock)
|
||||
@@ -134,18 +134,18 @@ index 08f5ed5..a9f313c 100644
|
||||
|
||||
if (stateblock->changed.indices)
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 6096c23..ee8c1cb 100644
|
||||
index 0abec70..5648bda 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -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;
|
||||
@@ -3093,6 +3093,8 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
|
||||
void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_material *material) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_predication(struct wined3d_cs *cs,
|
||||
struct wined3d_query *predicate, BOOL value) DECLSPEC_HIDDEN;
|
||||
+void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs,
|
||||
+ GLenum primitive_type) DECLSPEC_HIDDEN;
|
||||
|
||||
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
|
||||
* fixed function semantics as D3DCOLOR or FLOAT16 */
|
||||
void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
|
||||
struct wined3d_rasterizer_state *rasterizer_state) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs,
|
||||
--
|
||||
2.8.0
|
||||
2.9.0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 10d1d1d3b94c9ae89534864389235c2f982cb999 Mon Sep 17 00:00:00 2001
|
||||
From 5e8ed679aaf41f24f450b08750deb54f4abc24ae Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Tue, 9 Apr 2013 21:50:30 +0200
|
||||
Subject: wined3d: Send bool constant updates through the command stream
|
||||
@@ -10,11 +10,11 @@ Subject: wined3d: Send bool constant updates through the command stream
|
||||
3 files changed, 77 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 71603a1..db7699c 100644
|
||||
index d467911..afec5de 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -68,7 +68,9 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_QUERY_ISSUE,
|
||||
@@ -69,7 +69,9 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_UNLOAD_RESOURCE,
|
||||
WINED3D_CS_OP_STATEBLOCK,
|
||||
WINED3D_CS_OP_SET_VS_CONSTS_F,
|
||||
+ WINED3D_CS_OP_SET_VS_CONSTS_B,
|
||||
@@ -23,7 +23,7 @@ index 71603a1..db7699c 100644
|
||||
WINED3D_CS_OP_GLFINISH,
|
||||
WINED3D_CS_OP_SET_BASE_VERTEX_INDEX,
|
||||
WINED3D_CS_OP_SET_PRIMITIVE_TYPE,
|
||||
@@ -318,6 +320,14 @@ struct wined3d_cs_set_consts_f
|
||||
@@ -325,6 +327,14 @@ struct wined3d_cs_set_consts_f
|
||||
struct wined3d_vec4 constants[1];
|
||||
};
|
||||
|
||||
@@ -38,7 +38,7 @@ index 71603a1..db7699c 100644
|
||||
struct wined3d_cs_finish
|
||||
{
|
||||
enum wined3d_cs_op opcode;
|
||||
@@ -1129,10 +1139,8 @@ static UINT wined3d_cs_exec_transfer_stateblock(struct wined3d_cs *cs, const voi
|
||||
@@ -1136,10 +1146,8 @@ static UINT wined3d_cs_exec_transfer_stateblock(struct wined3d_cs *cs, const voi
|
||||
|
||||
/* Don't memcpy the entire struct, we'll remove single items as we add dedicated
|
||||
* ops for setting states */
|
||||
@@ -49,7 +49,7 @@ index 71603a1..db7699c 100644
|
||||
memcpy(cs->state.ps_consts_i, op->state.ps_consts_i, sizeof(cs->state.ps_consts_i));
|
||||
|
||||
memcpy(cs->state.lights, op->state.lights, sizeof(cs->state.lights));
|
||||
@@ -1149,10 +1157,8 @@ void wined3d_cs_emit_transfer_stateblock(struct wined3d_cs *cs, const struct win
|
||||
@@ -1156,10 +1164,8 @@ void wined3d_cs_emit_transfer_stateblock(struct wined3d_cs *cs, const struct win
|
||||
|
||||
/* Don't memcpy the entire struct, we'll remove single items as we add dedicated
|
||||
* ops for setting states */
|
||||
@@ -60,7 +60,7 @@ index 71603a1..db7699c 100644
|
||||
memcpy(op->state.ps_consts_i, state->ps_consts_i, sizeof(op->state.ps_consts_i));
|
||||
|
||||
/* FIXME: This is not ideal. CS is still running synchronously, so this is ok.
|
||||
@@ -1334,6 +1340,63 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
|
||||
@@ -1341,6 +1347,63 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
|
||||
op->value = value;
|
||||
|
||||
cs->ops->submit(cs);
|
||||
@@ -124,8 +124,8 @@ index 71603a1..db7699c 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_texture_state(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1708,7 +1771,9 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_QUERY_ISSUE */ wined3d_cs_exec_query_issue,
|
||||
@@ -1737,7 +1800,9 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_UNLOAD_RESOURCE */ wined3d_cs_exec_unload_resource,
|
||||
/* WINED3D_CS_OP_STATEBLOCK */ wined3d_cs_exec_transfer_stateblock,
|
||||
/* WINED3D_CS_OP_SET_VS_CONSTS_F */ wined3d_cs_exec_set_vs_consts_f,
|
||||
+ /* WINED3D_CS_OP_SET_VS_CONSTS_B */ wined3d_cs_exec_set_vs_consts_b,
|
||||
@@ -135,10 +135,10 @@ index 71603a1..db7699c 100644
|
||||
/* WINED3D_CS_OP_SET_BASE_VERTEX_INDEX */ wined3d_cs_exec_set_base_vertex_index,
|
||||
/* WINED3D_CS_OP_SET_PRIMITIVE_TYPE */ wined3d_cs_exec_set_primitive_type,
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 9230bd3..55ae32e 100644
|
||||
index 50535a0..ab4fb98 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -2396,7 +2396,7 @@ struct wined3d_sampler * CDECL wined3d_device_get_vs_sampler(const struct wined3
|
||||
@@ -2405,7 +2405,7 @@ struct wined3d_sampler * CDECL wined3d_device_get_vs_sampler(const struct wined3
|
||||
return device->state.sampler[WINED3D_SHADER_TYPE_VERTEX][idx];
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ index 9230bd3..55ae32e 100644
|
||||
{
|
||||
UINT i;
|
||||
|
||||
@@ -2433,7 +2433,8 @@ HRESULT CDECL wined3d_device_set_vs_consts_b(struct wined3d_device *device,
|
||||
@@ -2442,7 +2442,8 @@ HRESULT CDECL wined3d_device_set_vs_consts_b(struct wined3d_device *device,
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -157,7 +157,7 @@ index 9230bd3..55ae32e 100644
|
||||
}
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -2667,7 +2668,8 @@ HRESULT CDECL wined3d_device_set_ps_consts_b(struct wined3d_device *device,
|
||||
@@ -2676,7 +2677,8 @@ HRESULT CDECL wined3d_device_set_ps_consts_b(struct wined3d_device *device,
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -168,10 +168,10 @@ index 9230bd3..55ae32e 100644
|
||||
|
||||
return WINED3D_OK;
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 6741bb5..28a536e 100644
|
||||
index 2797ac1..db5cc52 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2528,6 +2528,7 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
|
||||
@@ -2531,6 +2531,7 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
|
||||
void device_resource_add(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
void device_resource_released(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
void device_invalidate_state(const struct wined3d_device *device, DWORD state) DECLSPEC_HIDDEN;
|
||||
@@ -179,15 +179,15 @@ index 6741bb5..28a536e 100644
|
||||
|
||||
static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD state)
|
||||
{
|
||||
@@ -3118,6 +3119,8 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs,
|
||||
void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_viewport *viewport) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
unsigned int count, const struct wined3d_vec4 *constants, enum wined3d_shader_type type) DECLSPEC_HIDDEN;
|
||||
@@ -3084,6 +3085,8 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
|
||||
WORD flags, const struct wined3d_color_key *color_key) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_shader_type type,
|
||||
UINT cb_idx, struct wined3d_buffer *buffer) DECLSPEC_HIDDEN;
|
||||
+void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
+ unsigned int count, const BOOL *constants, enum wined3d_shader_type type) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_glfinish(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_base_vertex_index(struct wined3d_cs *cs,
|
||||
UINT base_vertex_index) 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_transfer_stateblock(struct wined3d_cs *cs,
|
||||
--
|
||||
2.9.0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 53a64b6c48b846b82a5ca1c48465572bcc059c4a Mon Sep 17 00:00:00 2001
|
||||
From 879bfd8464ee9d78b3bc03b2171fdf20e8253713 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Wed, 10 Apr 2013 14:20:47 +0200
|
||||
Subject: wined3d: Send int constant updates through the command stream
|
||||
@@ -10,10 +10,10 @@ Subject: wined3d: Send int constant updates through the command stream
|
||||
3 files changed, 75 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index ffec875..de5767e 100644
|
||||
index afec5de..2f422ba 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -67,8 +67,10 @@ enum wined3d_cs_op
|
||||
@@ -70,8 +70,10 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_STATEBLOCK,
|
||||
WINED3D_CS_OP_SET_VS_CONSTS_F,
|
||||
WINED3D_CS_OP_SET_VS_CONSTS_B,
|
||||
@@ -24,7 +24,7 @@ index ffec875..de5767e 100644
|
||||
WINED3D_CS_OP_GLFINISH,
|
||||
WINED3D_CS_OP_SET_BASE_VERTEX_INDEX,
|
||||
WINED3D_CS_OP_SET_PRIMITIVE_TYPE,
|
||||
@@ -313,6 +315,14 @@ struct wined3d_cs_set_consts_b
|
||||
@@ -335,6 +337,14 @@ struct wined3d_cs_set_consts_b
|
||||
BOOL constants[1];
|
||||
};
|
||||
|
||||
@@ -39,7 +39,7 @@ index ffec875..de5767e 100644
|
||||
struct wined3d_cs_finish
|
||||
{
|
||||
enum wined3d_cs_op opcode;
|
||||
@@ -992,9 +1002,6 @@ static UINT wined3d_cs_exec_transfer_stateblock(struct wined3d_cs *cs, const voi
|
||||
@@ -1146,9 +1156,6 @@ static UINT wined3d_cs_exec_transfer_stateblock(struct wined3d_cs *cs, const voi
|
||||
|
||||
/* Don't memcpy the entire struct, we'll remove single items as we add dedicated
|
||||
* ops for setting states */
|
||||
@@ -49,7 +49,7 @@ index ffec875..de5767e 100644
|
||||
|
||||
memcpy(cs->state.lights, op->state.lights, sizeof(cs->state.lights));
|
||||
|
||||
@@ -1010,9 +1017,6 @@ void wined3d_cs_emit_transfer_stateblock(struct wined3d_cs *cs, const struct win
|
||||
@@ -1164,9 +1171,6 @@ void wined3d_cs_emit_transfer_stateblock(struct wined3d_cs *cs, const struct win
|
||||
|
||||
/* Don't memcpy the entire struct, we'll remove single items as we add dedicated
|
||||
* ops for setting states */
|
||||
@@ -59,7 +59,7 @@ index ffec875..de5767e 100644
|
||||
|
||||
/* FIXME: This is not ideal. CS is still running synchronously, so this is ok.
|
||||
* It will go away soon anyway. */
|
||||
@@ -1230,6 +1234,63 @@ void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
@@ -1406,6 +1410,63 @@ void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@ index ffec875..de5767e 100644
|
||||
static UINT wined3d_cs_exec_set_texture_state(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
const struct wined3d_cs_set_texture_state *op = data;
|
||||
@@ -1579,8 +1640,10 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -1801,8 +1862,10 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_STATEBLOCK */ wined3d_cs_exec_transfer_stateblock,
|
||||
/* WINED3D_CS_OP_SET_VS_CONSTS_F */ wined3d_cs_exec_set_vs_consts_f,
|
||||
/* WINED3D_CS_OP_SET_VS_CONSTS_B */ wined3d_cs_exec_set_vs_consts_b,
|
||||
@@ -135,10 +135,10 @@ index ffec875..de5767e 100644
|
||||
/* WINED3D_CS_OP_SET_BASE_VERTEX_INDEX */ wined3d_cs_exec_set_base_vertex_index,
|
||||
/* WINED3D_CS_OP_SET_PRIMITIVE_TYPE */ wined3d_cs_exec_set_primitive_type,
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 1b2e7e3..766e393 100644
|
||||
index ab4fb98..c0f8dc8 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -2457,7 +2457,8 @@ HRESULT CDECL wined3d_device_set_vs_consts_i(struct wined3d_device *device,
|
||||
@@ -2492,7 +2492,8 @@ HRESULT CDECL wined3d_device_set_vs_consts_i(struct wined3d_device *device,
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -148,7 +148,7 @@ index 1b2e7e3..766e393 100644
|
||||
}
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -2692,7 +2693,8 @@ HRESULT CDECL wined3d_device_set_ps_consts_i(struct wined3d_device *device,
|
||||
@@ -2727,7 +2728,8 @@ HRESULT CDECL wined3d_device_set_ps_consts_i(struct wined3d_device *device,
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -159,18 +159,18 @@ index 1b2e7e3..766e393 100644
|
||||
|
||||
return WINED3D_OK;
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 3e09851..b783c7e 100644
|
||||
index db5cc52..ae13efb 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -3013,6 +3013,8 @@ void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
unsigned int count, const struct wined3d_vec4 *constants, enum wined3d_shader_type type) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
@@ -3089,6 +3089,8 @@ void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
unsigned int count, const BOOL *constants, enum wined3d_shader_type type) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
unsigned int count, const struct wined3d_vec4 *constants, enum wined3d_shader_type type) DECLSPEC_HIDDEN;
|
||||
+void wined3d_cs_emit_set_consts_i(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
+ unsigned int count, const struct wined3d_ivec4 *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;
|
||||
void wined3d_cs_emit_transfer_stateblock(struct wined3d_cs *cs,
|
||||
const struct wined3d_state *state) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs,
|
||||
--
|
||||
2.8.0
|
||||
2.9.0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From dec9faf13d51f50f6e7393490a2634f4482e6ea0 Mon Sep 17 00:00:00 2001
|
||||
From d72ba7f4c8842b750e822fe95d91274f0c5e6d51 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,18 +10,18 @@ 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 0ca8f23..da077f7 100644
|
||||
index 2f422ba..d03dd1c 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -66,7 +66,6 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_RESET_STATE,
|
||||
@@ -67,7 +67,6 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_DESTROY_OBJECT,
|
||||
WINED3D_CS_OP_QUERY_ISSUE,
|
||||
WINED3D_CS_OP_UNLOAD_RESOURCE,
|
||||
- WINED3D_CS_OP_STATEBLOCK,
|
||||
WINED3D_CS_OP_SET_VS_CONSTS_F,
|
||||
WINED3D_CS_OP_SET_VS_CONSTS_B,
|
||||
WINED3D_CS_OP_SET_VS_CONSTS_I,
|
||||
@@ -76,6 +75,8 @@ enum wined3d_cs_op
|
||||
@@ -77,6 +76,8 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_GLFINISH,
|
||||
WINED3D_CS_OP_SET_BASE_VERTEX_INDEX,
|
||||
WINED3D_CS_OP_SET_PRIMITIVE_TYPE,
|
||||
@@ -30,8 +30,8 @@ index 0ca8f23..da077f7 100644
|
||||
WINED3D_CS_OP_STOP,
|
||||
};
|
||||
|
||||
@@ -308,12 +309,6 @@ struct wined3d_cs_query_issue
|
||||
DWORD flags;
|
||||
@@ -315,12 +316,6 @@ struct wined3d_cs_unload_resource
|
||||
struct wined3d_resource *resource;
|
||||
};
|
||||
|
||||
-struct wined3d_cs_stateblock
|
||||
@@ -43,7 +43,7 @@ index 0ca8f23..da077f7 100644
|
||||
struct wined3d_cs_set_consts_f
|
||||
{
|
||||
enum wined3d_cs_op opcode;
|
||||
@@ -355,6 +350,19 @@ struct wined3d_cs_set_primitive_type
|
||||
@@ -362,6 +357,19 @@ struct wined3d_cs_set_primitive_type
|
||||
GLenum gl_primitive_type;
|
||||
};
|
||||
|
||||
@@ -63,7 +63,7 @@ index 0ca8f23..da077f7 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)
|
||||
{
|
||||
@@ -1143,35 +1151,6 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
|
||||
@@ -1150,35 +1158,6 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ index 0ca8f23..da077f7 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;
|
||||
@@ -1798,6 +1777,152 @@ void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs, GLenum primitive_
|
||||
@@ -1826,6 +1805,152 @@ void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs, GLenum primitive_
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@@ -252,15 +252,15 @@ index 0ca8f23..da077f7 100644
|
||||
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_FENCE */ wined3d_cs_exec_fence,
|
||||
@@ -1830,7 +1955,6 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_RESET_STATE */ wined3d_cs_exec_reset_state,
|
||||
@@ -1859,7 +1984,6 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_DESTROY_OBJECT */ wined3d_cs_exec_destroy_object,
|
||||
/* WINED3D_CS_OP_QUERY_ISSUE */ wined3d_cs_exec_query_issue,
|
||||
/* WINED3D_CS_OP_UNLOAD_RESOURCE */ wined3d_cs_exec_unload_resource,
|
||||
- /* WINED3D_CS_OP_STATEBLOCK */ wined3d_cs_exec_transfer_stateblock,
|
||||
/* WINED3D_CS_OP_SET_VS_CONSTS_F */ wined3d_cs_exec_set_vs_consts_f,
|
||||
/* WINED3D_CS_OP_SET_VS_CONSTS_B */ wined3d_cs_exec_set_vs_consts_b,
|
||||
/* WINED3D_CS_OP_SET_VS_CONSTS_I */ wined3d_cs_exec_set_vs_consts_i,
|
||||
@@ -1840,6 +1964,8 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -1869,6 +1993,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,10 +270,10 @@ index 0ca8f23..da077f7 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 91ab533..caec3e88 100644
|
||||
index c0f8dc8..ee197af 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,
|
||||
@@ -1610,14 +1610,6 @@ HRESULT CDECL wined3d_device_set_light(struct wined3d_device *device,
|
||||
light->direction.x, light->direction.y, light->direction.z,
|
||||
light->range, light->falloff, light->theta, light->phi);
|
||||
|
||||
@@ -288,7 +288,7 @@ index 91ab533..caec3e88 100644
|
||||
/* Save away the information. */
|
||||
object->OriginalParms = *light;
|
||||
|
||||
@@ -1688,6 +1680,9 @@ HRESULT CDECL wined3d_device_set_light(struct wined3d_device *device,
|
||||
@@ -1697,6 +1689,9 @@ HRESULT CDECL wined3d_device_set_light(struct wined3d_device *device,
|
||||
FIXME("Unrecognized light type %#x.\n", light->type);
|
||||
}
|
||||
|
||||
@@ -298,7 +298,7 @@ index 91ab533..caec3e88 100644
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
@@ -1760,12 +1755,6 @@ HRESULT CDECL wined3d_device_set_light_enable(struct wined3d_device *device, UIN
|
||||
@@ -1769,12 +1764,6 @@ HRESULT CDECL wined3d_device_set_light_enable(struct wined3d_device *device, UIN
|
||||
{
|
||||
if (light_info->glIndex != -1)
|
||||
{
|
||||
@@ -311,7 +311,7 @@ index 91ab533..caec3e88 100644
|
||||
device->update_state->lights[light_info->glIndex] = NULL;
|
||||
light_info->glIndex = -1;
|
||||
}
|
||||
@@ -1807,16 +1796,12 @@ HRESULT CDECL wined3d_device_set_light_enable(struct wined3d_device *device, UIN
|
||||
@@ -1816,16 +1805,12 @@ HRESULT CDECL wined3d_device_set_light_enable(struct wined3d_device *device, UIN
|
||||
WARN("Too many concurrently active lights\n");
|
||||
return WINED3D_OK;
|
||||
}
|
||||
@@ -331,7 +331,7 @@ index 91ab533..caec3e88 100644
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
@@ -3540,7 +3525,6 @@ HRESULT CDECL wined3d_device_draw_primitive(struct wined3d_device *device, UINT
|
||||
@@ -3549,7 +3534,6 @@ HRESULT CDECL wined3d_device_draw_primitive(struct wined3d_device *device, UINT
|
||||
{
|
||||
TRACE("device %p, start_vertex %u, vertex_count %u.\n", device, start_vertex, vertex_count);
|
||||
|
||||
@@ -339,7 +339,7 @@ index 91ab533..caec3e88 100644
|
||||
wined3d_cs_emit_draw(device->cs, 0, start_vertex, vertex_count, 0, 0, FALSE);
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -3569,7 +3553,6 @@ HRESULT CDECL wined3d_device_draw_indexed_primitive(struct wined3d_device *devic
|
||||
@@ -3578,7 +3562,6 @@ HRESULT CDECL wined3d_device_draw_indexed_primitive(struct wined3d_device *devic
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@@ -347,7 +347,7 @@ index 91ab533..caec3e88 100644
|
||||
wined3d_cs_emit_draw(device->cs, device->state.base_vertex_index, start_idx, index_count, 0, 0, TRUE);
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -3581,7 +3564,6 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device
|
||||
@@ -3590,7 +3573,6 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device
|
||||
TRACE("device %p, start_idx %u, index_count %u, start_instance %u, instance_count %u.\n",
|
||||
device, start_idx, index_count, start_instance, instance_count);
|
||||
|
||||
@@ -356,10 +356,10 @@ index 91ab533..caec3e88 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 18f7d78..3069877 100644
|
||||
index ae13efb..4c57f7b 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -3032,7 +3032,9 @@ struct wined3d_cs_block
|
||||
@@ -3035,7 +3035,9 @@ struct wined3d_cs_block
|
||||
{
|
||||
struct list entry;
|
||||
UINT pos;
|
||||
@@ -370,24 +370,21 @@ index 18f7d78..3069877 100644
|
||||
};
|
||||
|
||||
struct wined3d_cs_ops
|
||||
@@ -3079,8 +3081,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;
|
||||
@@ -3091,12 +3093,12 @@ void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
unsigned int count, const struct wined3d_vec4 *constants, enum wined3d_shader_type type) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_consts_i(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
unsigned int count, const struct wined3d_ivec4 *constants, enum wined3d_shader_type type) DECLSPEC_HIDDEN;
|
||||
-void wined3d_cs_emit_transfer_stateblock(struct wined3d_cs *cs,
|
||||
- const struct wined3d_state *state) DECLSPEC_HIDDEN;
|
||||
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,
|
||||
@@ -3128,6 +3128,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;
|
||||
enum wined3d_format_id format_id, unsigned int offset) 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;
|
||||
|
||||
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
|
||||
* fixed function semantics as D3DCOLOR or FLOAT16 */
|
||||
void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_material *material) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_predication(struct wined3d_cs *cs,
|
||||
struct wined3d_query *predicate, BOOL value) DECLSPEC_HIDDEN;
|
||||
--
|
||||
2.9.0
|
||||
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
From 902b45818f4c0d733065be2e253d8a39f41b1cfe Mon Sep 17 00:00:00 2001
|
||||
From db37e592d76e30834d83029cdfdec6f42a322086 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Wed, 10 Apr 2013 19:10:41 +0200
|
||||
Subject: wined3d: Prevent the command stream from running ahead too far
|
||||
|
||||
---
|
||||
dlls/wined3d/cs.c | 8 ++++++++
|
||||
dlls/wined3d/wined3d_private.h | 2 ++
|
||||
2 files changed, 10 insertions(+)
|
||||
dlls/wined3d/cs.c | 16 ++++++++++++++++
|
||||
dlls/wined3d/wined3d_private.h | 2 ++
|
||||
2 files changed, 18 insertions(+)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 00c26b4..509ed82 100644
|
||||
index d03dd1c..7311ac5 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -487,6 +487,8 @@ static UINT wined3d_cs_exec_present(struct wined3d_cs *cs, const void *data)
|
||||
@@ -509,6 +509,8 @@ static UINT wined3d_cs_exec_present(struct wined3d_cs *cs, const void *data)
|
||||
swapchain->swapchain_ops->swapchain_present(swapchain, &op->src_rect, &op->dst_rect, op->flags,
|
||||
cs->state.fb.depth_stencil);
|
||||
|
||||
@@ -21,7 +21,7 @@ index 00c26b4..509ed82 100644
|
||||
wined3d_resource_release(&swapchain->front_buffer->resource);
|
||||
for (i = 0; i < swapchain->desc.backbuffer_count; ++i)
|
||||
{
|
||||
@@ -501,6 +503,7 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
|
||||
@@ -523,6 +525,7 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
|
||||
{
|
||||
struct wined3d_cs_present *op;
|
||||
unsigned int i;
|
||||
@@ -29,7 +29,7 @@ index 00c26b4..509ed82 100644
|
||||
|
||||
op = cs->ops->require_space(cs, sizeof(*op));
|
||||
op->opcode = WINED3D_CS_OP_PRESENT;
|
||||
@@ -516,7 +519,12 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
|
||||
@@ -538,7 +541,20 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
|
||||
wined3d_resource_acquire(&swapchain->back_buffers[i]->resource);
|
||||
}
|
||||
|
||||
@@ -37,16 +37,24 @@ index 00c26b4..509ed82 100644
|
||||
+
|
||||
cs->ops->submit(cs);
|
||||
+
|
||||
+ /* D3D10 documentation suggests that Windows allows the game to run
|
||||
+ * 3 frames ahead of the GPU. Increasing this above 1 causes uneven
|
||||
+ * animation in some games, most notably StarCraft II. The framerates
|
||||
+ * don't show this problem. The issue is more noticable with vsync
|
||||
+ * on, but also happens with vsync off.
|
||||
+ *
|
||||
+ * In Counter-Strike: Source a frame difference of 3 causes noticable
|
||||
+ * input delay that makes the game unplayable. */
|
||||
+ while (pending > 1)
|
||||
+ pending = InterlockedCompareExchange(&cs->pending_presents, 0, 0);
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_clear(struct wined3d_cs *cs, const void *data)
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 76c7fbf..b49ceaf 100644
|
||||
index 4c57f7b..1d84bf9 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -3012,6 +3012,8 @@ struct wined3d_cs
|
||||
@@ -3061,6 +3061,8 @@ struct wined3d_cs
|
||||
|
||||
struct wined3d_cs_list free_list;
|
||||
struct wined3d_cs_list exec_list;
|
||||
@@ -56,5 +64,5 @@ index 76c7fbf..b49ceaf 100644
|
||||
|
||||
struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device) DECLSPEC_HIDDEN;
|
||||
--
|
||||
2.8.0
|
||||
2.9.0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 524919d5d089cbcb8759cdad91c55b767ae735c6 Mon Sep 17 00:00:00 2001
|
||||
From 9674800f8e960faf599b27ac2c72bed131fb02e7 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Mon, 29 Apr 2013 18:49:53 +0200
|
||||
Subject: wined3d: Send blits through the command stream.
|
||||
@@ -6,30 +6,16 @@ Subject: wined3d: Send blits through the command stream.
|
||||
This needs more work. This patch breaks error handling, and the split
|
||||
between surface_blt and surface_blt_ugly isn't particularly nice.
|
||||
---
|
||||
dlls/d3d9/tests/visual.c | 2 +-
|
||||
dlls/wined3d/cs.c | 50 ++++++++
|
||||
dlls/wined3d/surface.c | 253 ++++++++++++++++++++++++-----------------
|
||||
dlls/wined3d/wined3d_private.h | 8 ++
|
||||
4 files changed, 208 insertions(+), 105 deletions(-)
|
||||
3 files changed, 207 insertions(+), 104 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
|
||||
index a2adc54..ccff548 100644
|
||||
--- a/dlls/d3d9/tests/visual.c
|
||||
+++ b/dlls/d3d9/tests/visual.c
|
||||
@@ -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}, */
|
||||
- {D3DFMT_DXT1, "D3DFMT_DXT1", BLOCKS | TODO_FILL_RETURN, 0},
|
||||
+ {D3DFMT_DXT1, "D3DFMT_DXT1", BLOCKS, 0},
|
||||
/* Vendor-specific formats like ATI2N are a non-issue here since they're not
|
||||
* 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 f6c2b68..25f7b3e 100644
|
||||
index 62e250c..3465f40 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -75,6 +75,7 @@ enum wined3d_cs_op
|
||||
@@ -78,6 +78,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_SET_PRIMITIVE_TYPE,
|
||||
WINED3D_CS_OP_SET_LIGHT,
|
||||
WINED3D_CS_OP_SET_LIGHT_ENABLE,
|
||||
@@ -37,7 +23,7 @@ index f6c2b68..25f7b3e 100644
|
||||
WINED3D_CS_OP_STOP,
|
||||
};
|
||||
|
||||
@@ -348,6 +349,18 @@ struct wined3d_cs_set_light_enable
|
||||
@@ -370,6 +371,18 @@ struct wined3d_cs_set_light_enable
|
||||
BOOL enable;
|
||||
};
|
||||
|
||||
@@ -56,7 +42,7 @@ index f6c2b68..25f7b3e 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)
|
||||
{
|
||||
@@ -1661,6 +1674,9 @@ static UINT wined3d_cs_exec_glfinish(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1756,6 +1769,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 +52,7 @@ index f6c2b68..25f7b3e 100644
|
||||
context = context_acquire(device, NULL);
|
||||
context->gl_info->gl_ops.gl.p_glFinish();
|
||||
context_release(context);
|
||||
@@ -1872,6 +1888,38 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, UINT idx, BOOL enab
|
||||
@@ -1967,6 +1983,38 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, UINT idx, BOOL enab
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@@ -105,7 +91,7 @@ index f6c2b68..25f7b3e 100644
|
||||
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_FENCE */ wined3d_cs_exec_fence,
|
||||
@@ -1913,6 +1961,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -2011,6 +2059,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 +99,7 @@ index f6c2b68..25f7b3e 100644
|
||||
};
|
||||
|
||||
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
|
||||
@@ -1991,6 +2040,7 @@ static DWORD WINAPI wined3d_cs_run(void *thread_param)
|
||||
@@ -2089,6 +2138,7 @@ static DWORD WINAPI wined3d_cs_run(void *thread_param)
|
||||
|
||||
TRACE("Started.\n");
|
||||
|
||||
@@ -122,10 +108,10 @@ index f6c2b68..25f7b3e 100644
|
||||
{
|
||||
struct wined3d_cs_block *block;
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 6944c72..d1cc5f6 100644
|
||||
index 5601804..ac6eddb 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -4110,7 +4110,7 @@ const struct blit_shader cpu_blit = {
|
||||
@@ -4103,7 +4103,7 @@ const struct blit_shader cpu_blit = {
|
||||
cpu_blit_blit_surface,
|
||||
};
|
||||
|
||||
@@ -134,7 +120,7 @@ index 6944c72..d1cc5f6 100644
|
||||
struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags,
|
||||
const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter)
|
||||
{
|
||||
@@ -4120,9 +4120,8 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
@@ -4113,9 +4113,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 +132,7 @@ index 6944c72..d1cc5f6 100644
|
||||
DWORD src_ds_flags, dst_ds_flags;
|
||||
BOOL scale, convert;
|
||||
|
||||
@@ -4135,91 +4134,17 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
@@ -4128,91 +4127,17 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
| WINED3D_BLT_DO_NOT_WAIT
|
||||
| WINED3D_BLT_ALPHA_TEST;
|
||||
|
||||
@@ -243,7 +229,7 @@ index 6944c72..d1cc5f6 100644
|
||||
}
|
||||
|
||||
if (!device->d3d_initialized)
|
||||
@@ -4244,11 +4169,6 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
@@ -4237,11 +4162,6 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
goto fallback;
|
||||
}
|
||||
|
||||
@@ -255,7 +241,7 @@ index 6944c72..d1cc5f6 100644
|
||||
dst_swapchain = dst_texture->swapchain;
|
||||
|
||||
/* This isn't strictly needed. FBO blits for example could deal with
|
||||
@@ -4284,22 +4204,16 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
@@ -4277,22 +4197,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 +267,7 @@ index 6944c72..d1cc5f6 100644
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -4335,7 +4249,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
@@ -4328,7 +4242,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 +276,7 @@ index 6944c72..d1cc5f6 100644
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -4378,7 +4292,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
@@ -4371,7 +4285,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
context, dst_texture->resource.draw_binding);
|
||||
context_release(context);
|
||||
}
|
||||
@@ -299,7 +285,7 @@ index 6944c72..d1cc5f6 100644
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4402,7 +4316,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
@@ -4395,7 +4309,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 +294,7 @@ index 6944c72..d1cc5f6 100644
|
||||
}
|
||||
|
||||
if (fbo_blit_supported(&device->adapter->gl_info, blit_op,
|
||||
@@ -4423,7 +4337,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
@@ -4416,7 +4330,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 +303,7 @@ index 6944c72..d1cc5f6 100644
|
||||
}
|
||||
|
||||
blitter = wined3d_select_blitter(&device->adapter->gl_info, &device->adapter->d3d_info, blit_op,
|
||||
@@ -4433,7 +4347,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
@@ -4426,7 +4340,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 +312,7 @@ index 6944c72..d1cc5f6 100644
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4441,9 +4355,140 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
@@ -4434,9 +4348,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 +456,10 @@ index 6944c72..d1cc5f6 100644
|
||||
+ return WINED3D_OK;
|
||||
}
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 8e09b0f..d9d610d 100644
|
||||
index 1d84bf9..d632cfd 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2904,6 +2904,9 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
|
||||
@@ -2913,6 +2913,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 +469,7 @@ index 8e09b0f..d9d610d 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;
|
||||
@@ -3044,6 +3047,7 @@ struct wined3d_cs
|
||||
@@ -3053,6 +3056,7 @@ struct wined3d_cs
|
||||
struct wined3d_device *device;
|
||||
struct wined3d_state state;
|
||||
HANDLE thread;
|
||||
@@ -491,17 +477,17 @@ index 8e09b0f..d9d610d 100644
|
||||
DWORD tls_idx;
|
||||
struct wined3d_surface *onscreen_depth_stencil;
|
||||
|
||||
@@ -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;
|
||||
@@ -3070,6 +3074,10 @@ void wined3d_cs_destroy(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_switch_onscreen_ds(struct wined3d_cs *cs, struct wined3d_context *context,
|
||||
struct wined3d_surface *depth_stencil) DECLSPEC_HIDDEN;
|
||||
|
||||
+void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surface,
|
||||
+ 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;
|
||||
|
||||
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
|
||||
* fixed function semantics as D3DCOLOR or FLOAT16 */
|
||||
void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *rects,
|
||||
DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs,
|
||||
--
|
||||
2.8.0
|
||||
2.9.0
|
||||
|
||||
|
||||
@@ -1,31 +1,17 @@
|
||||
From f8e2c7f9ecd141f831b29d41beaa1e3b473fc1e9 Mon Sep 17 00:00:00 2001
|
||||
From 62fb174940b36a427ae7c6b2ffd07f431da54dc6 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Fri, 28 Aug 2015 00:01:39 +0200
|
||||
Subject: wined3d: Hack to reject unsupported color fills.
|
||||
|
||||
---
|
||||
dlls/d3d9/tests/visual.c | 2 +-
|
||||
dlls/wined3d/surface.c | 8 ++++++++
|
||||
2 files changed, 9 insertions(+), 1 deletion(-)
|
||||
dlls/wined3d/surface.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
|
||||
index 0c64b31..a308311 100644
|
||||
--- a/dlls/d3d9/tests/visual.c
|
||||
+++ b/dlls/d3d9/tests/visual.c
|
||||
@@ -1339,7 +1339,7 @@ static void color_fill_test(void)
|
||||
* result on Wine.
|
||||
* {D3DFMT_YUY2, "D3DFMT_YUY2", BLOCKS, 0},
|
||||
* {D3DFMT_UYVY, "D3DFMT_UYVY", BLOCKS, 0}, */
|
||||
- {D3DFMT_DXT1, "D3DFMT_DXT1", BLOCKS, 0},
|
||||
+ {D3DFMT_DXT1, "D3DFMT_DXT1", BLOCKS | TODO_FILL_RETURN, 0},
|
||||
/* Vendor-specific formats like ATI2N are a non-issue here since they're not
|
||||
* supported as offscreen plain surfaces and do not support D3DUSAGE_RENDERTARGET
|
||||
* when created as texture. */
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 3423e83..978c826 100644
|
||||
index ac6eddb..ea9c210 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -4313,6 +4313,14 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
@@ -4454,6 +4454,14 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,5 +27,5 @@ index 3423e83..978c826 100644
|
||||
flags &= ~WINED3D_BLT_FX;
|
||||
|
||||
--
|
||||
2.8.0
|
||||
2.9.0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 59429a42d6de889fdbda3bd1f05e2d6cef45712a Mon Sep 17 00:00:00 2001
|
||||
From 9e967922aa91e11c19bb935bdcf4dddc739d547e 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 25f7b3e..8496d42 100644
|
||||
index 201d596..356461c 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -76,6 +76,7 @@ enum wined3d_cs_op
|
||||
@@ -79,6 +79,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 25f7b3e..8496d42 100644
|
||||
WINED3D_CS_OP_STOP,
|
||||
};
|
||||
|
||||
@@ -361,6 +362,18 @@ struct wined3d_cs_blt
|
||||
@@ -383,6 +384,18 @@ struct wined3d_cs_blt
|
||||
enum wined3d_texture_filter_type filter;
|
||||
};
|
||||
|
||||
@@ -40,7 +40,7 @@ index 25f7b3e..8496d42 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)
|
||||
{
|
||||
@@ -1920,6 +1933,39 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
|
||||
@@ -2007,6 +2020,39 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ index 25f7b3e..8496d42 100644
|
||||
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_FENCE */ wined3d_cs_exec_fence,
|
||||
@@ -1962,6 +2008,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -2052,6 +2098,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 25f7b3e..8496d42 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 7946e7d..5a1580c 100644
|
||||
index 6286b49..d15ff97 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -4181,8 +4181,8 @@ HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *devi
|
||||
@@ -4216,8 +4216,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 7946e7d..5a1580c 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);
|
||||
@@ -4221,17 +4221,8 @@ HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *devi
|
||||
@@ -4256,17 +4256,8 @@ HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *devi
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@@ -123,19 +123,19 @@ index 7946e7d..5a1580c 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 d9d610d..426c10d 100644
|
||||
index f41915b..ec650d5 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -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,
|
||||
@@ -3080,6 +3080,9 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
|
||||
enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *rects,
|
||||
DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil) DECLSPEC_HIDDEN;
|
||||
+void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarget_view *view,
|
||||
+ const RECT *rect, DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil,
|
||||
+ const struct blit_shader *blitter) DECLSPEC_HIDDEN;
|
||||
|
||||
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
|
||||
* fixed function semantics as D3DCOLOR or FLOAT16 */
|
||||
void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs,
|
||||
void (*callback)(void *object), void *object) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned int start_idx, unsigned int index_count,
|
||||
--
|
||||
2.8.0
|
||||
2.9.0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 39ded1220f3314f3ffe059fa6791444ea7e8b5c1 Mon Sep 17 00:00:00 2001
|
||||
From 9ddf0916b91ba7b9cc77b79ac3b4030d5b6c9dee 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(+), 85 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 737c39a..0fc98be 100644
|
||||
index f6b6b49..6dd95af 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -79,6 +79,8 @@ enum wined3d_cs_op
|
||||
@@ -80,6 +80,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 737c39a..0fc98be 100644
|
||||
WINED3D_CS_OP_STOP,
|
||||
};
|
||||
|
||||
@@ -389,6 +391,22 @@ struct wined3d_cs_clear_rtv
|
||||
@@ -396,6 +398,22 @@ struct wined3d_cs_clear_rtv
|
||||
const struct blit_shader *blitter;
|
||||
};
|
||||
|
||||
@@ -46,7 +46,7 @@ index 737c39a..0fc98be 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)
|
||||
{
|
||||
@@ -2025,6 +2043,59 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
|
||||
@@ -2061,6 +2079,59 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ index 737c39a..0fc98be 100644
|
||||
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_FENCE */ wined3d_cs_exec_fence,
|
||||
@@ -2070,6 +2141,8 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -2107,6 +2178,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 737c39a..0fc98be 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 2437b5a..cf93667 100644
|
||||
index b1ac7bf..1acf5d5 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -1750,6 +1750,63 @@ static void wined3d_texture_unload(struct wined3d_resource *resource)
|
||||
@@ -1749,6 +1749,63 @@ static void wined3d_texture_unload(struct wined3d_resource *resource)
|
||||
wined3d_texture_unload_gl_texture(texture);
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ index 2437b5a..cf93667 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)
|
||||
{
|
||||
@@ -1757,13 +1814,9 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
|
||||
@@ -1756,13 +1813,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 2437b5a..cf93667 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);
|
||||
@@ -1808,53 +1861,9 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
|
||||
@@ -1807,53 +1860,9 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@@ -252,7 +252,7 @@ index 2437b5a..cf93667 100644
|
||||
|
||||
if (fmt_flags & WINED3DFMT_FLAG_BROKEN_PITCH)
|
||||
{
|
||||
@@ -1890,17 +1899,6 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
|
||||
@@ -1889,17 +1898,6 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
|
||||
}
|
||||
}
|
||||
|
||||
@@ -270,7 +270,7 @@ index 2437b5a..cf93667 100644
|
||||
++resource->map_count;
|
||||
++sub_resource->map_count;
|
||||
|
||||
@@ -1910,14 +1908,38 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
|
||||
@@ -1909,14 +1907,38 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
@@ -313,7 +313,7 @@ index 2437b5a..cf93667 100644
|
||||
|
||||
TRACE("resource %p, sub_resource_idx %u.\n", resource, sub_resource_idx);
|
||||
|
||||
@@ -1933,27 +1955,7 @@ static HRESULT texture_resource_sub_resource_unmap(struct wined3d_resource *reso
|
||||
@@ -1932,27 +1954,7 @@ static HRESULT texture_resource_sub_resource_unmap(struct wined3d_resource *reso
|
||||
return WINEDDERR_NOTLOCKED;
|
||||
}
|
||||
|
||||
@@ -343,7 +343,7 @@ index 2437b5a..cf93667 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 c7b2e81..bc7ba09 100644
|
||||
index 4862f79..d9c33c6 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2787,6 +2787,8 @@ void *wined3d_texture_map_bo_address(const struct wined3d_bo_address *data, size
|
||||
@@ -364,17 +364,17 @@ index c7b2e81..bc7ba09 100644
|
||||
void wined3d_texture_upload_data(struct wined3d_texture *texture, unsigned int sub_resource_idx,
|
||||
const struct wined3d_context *context, const struct wined3d_const_bo_address *data,
|
||||
unsigned int row_pitch, unsigned int slice_pitch) DECLSPEC_HIDDEN;
|
||||
@@ -3146,6 +3150,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;
|
||||
@@ -3146,6 +3150,10 @@ 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_texture_map(struct wined3d_cs *cs, struct wined3d_texture *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;
|
||||
void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
|
||||
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
|
||||
* fixed function semantics as D3DCOLOR or FLOAT16 */
|
||||
--
|
||||
2.9.0
|
||||
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
From baa655f9be4d40201483994dfd81fd166ca4484e Mon Sep 17 00:00:00 2001
|
||||
From e7e3a3a2157e282988cb3350745373259a5d040f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Thu, 4 Jul 2013 23:33:14 +0200
|
||||
Subject: wined3d: Replace the linked lists with a ringbuffer
|
||||
|
||||
---
|
||||
dlls/wined3d/cs.c | 369 ++++++++++++++++++-----------------------
|
||||
dlls/wined3d/cs.c | 371 ++++++++++++++++++-----------------------
|
||||
dlls/wined3d/wined3d_private.h | 20 +--
|
||||
2 files changed, 164 insertions(+), 225 deletions(-)
|
||||
2 files changed, 165 insertions(+), 226 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 0fc98be..10df183 100644
|
||||
index 6dd95af..f66056b 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -22,20 +22,10 @@
|
||||
@@ -35,7 +35,7 @@ index 0fc98be..10df183 100644
|
||||
WINED3D_CS_OP_FENCE,
|
||||
WINED3D_CS_OP_PRESENT,
|
||||
WINED3D_CS_OP_CLEAR,
|
||||
@@ -407,99 +397,30 @@ struct wined3d_cs_texture_unmap
|
||||
@@ -414,99 +404,30 @@ struct wined3d_cs_texture_unmap
|
||||
unsigned int sub_resource_idx;
|
||||
};
|
||||
|
||||
@@ -149,7 +149,7 @@ index 0fc98be..10df183 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_fence(struct wined3d_cs *cs, const void *data)
|
||||
@@ -520,14 +441,14 @@ static void wined3d_cs_emit_fence(struct wined3d_cs *cs, BOOL *signalled)
|
||||
@@ -527,14 +448,14 @@ static void wined3d_cs_emit_fence(struct wined3d_cs *cs, BOOL *signalled)
|
||||
op = cs->ops->require_space(cs, sizeof(*op));
|
||||
op->opcode = WINED3D_CS_OP_FENCE;
|
||||
op->signalled = signalled;
|
||||
@@ -166,16 +166,16 @@ index 0fc98be..10df183 100644
|
||||
|
||||
/* A busy wait should be fine, we're not supposed to have to wait very
|
||||
* long. */
|
||||
@@ -580,7 +501,7 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
|
||||
@@ -587,7 +508,7 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
|
||||
|
||||
pending = InterlockedIncrement(&cs->pending_presents);
|
||||
|
||||
- cs->ops->submit(cs);
|
||||
+ cs->ops->submit(cs, sizeof(*op));
|
||||
|
||||
while (pending > 1)
|
||||
pending = InterlockedCompareExchange(&cs->pending_presents, 0, 0);
|
||||
@@ -622,8 +543,8 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
/* D3D10 documentation suggests that Windows allows the game to run
|
||||
* 3 frames ahead of the GPU. Increasing this above 1 causes uneven
|
||||
@@ -637,8 +558,8 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
const struct wined3d_state *state = &cs->device->state;
|
||||
struct wined3d_cs_clear *op;
|
||||
unsigned int i;
|
||||
@@ -186,7 +186,7 @@ index 0fc98be..10df183 100644
|
||||
op->opcode = WINED3D_CS_OP_CLEAR;
|
||||
op->flags = flags;
|
||||
op->color = *color;
|
||||
@@ -643,7 +564,7 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
@@ -658,7 +579,7 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
if (flags & (WINED3DCLEAR_ZBUFFER | WINED3DCLEAR_STENCIL))
|
||||
wined3d_resource_acquire(state->fb.depth_stencil->resource);
|
||||
|
||||
@@ -195,7 +195,7 @@ index 0fc98be..10df183 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
|
||||
@@ -784,7 +705,7 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned i
|
||||
@@ -799,7 +720,7 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned i
|
||||
}
|
||||
}
|
||||
|
||||
@@ -204,7 +204,7 @@ index 0fc98be..10df183 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_predication(struct wined3d_cs *cs, const void *data)
|
||||
@@ -806,7 +727,7 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query
|
||||
@@ -821,7 +742,7 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query
|
||||
op->predicate = predicate;
|
||||
op->value = value;
|
||||
|
||||
@@ -213,7 +213,7 @@ index 0fc98be..10df183 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_viewport(struct wined3d_cs *cs, const void *data)
|
||||
@@ -827,7 +748,7 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
|
||||
@@ -842,7 +763,7 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
|
||||
op->opcode = WINED3D_CS_OP_SET_VIEWPORT;
|
||||
op->viewport = *viewport;
|
||||
|
||||
@@ -222,7 +222,7 @@ index 0fc98be..10df183 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_scissor_rect(struct wined3d_cs *cs, const void *data)
|
||||
@@ -848,7 +769,7 @@ void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
|
||||
@@ -863,7 +784,7 @@ void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
|
||||
op->opcode = WINED3D_CS_OP_SET_SCISSOR_RECT;
|
||||
op->rect = *rect;
|
||||
|
||||
@@ -231,7 +231,7 @@ index 0fc98be..10df183 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_rendertarget_view(struct wined3d_cs *cs, const void *data)
|
||||
@@ -871,7 +792,7 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
|
||||
@@ -886,7 +807,7 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
|
||||
op->view_idx = view_idx;
|
||||
op->view = view;
|
||||
|
||||
@@ -240,7 +240,7 @@ index 0fc98be..10df183 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const void *data)
|
||||
@@ -925,7 +846,7 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3
|
||||
@@ -940,7 +861,7 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3
|
||||
op->opcode = WINED3D_CS_OP_SET_DEPTH_STENCIL_VIEW;
|
||||
op->view = view;
|
||||
|
||||
@@ -249,7 +249,7 @@ index 0fc98be..10df183 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_vertex_declaration(struct wined3d_cs *cs, const void *data)
|
||||
@@ -946,7 +867,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
|
||||
@@ -961,7 +882,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
|
||||
op->opcode = WINED3D_CS_OP_SET_VERTEX_DECLARATION;
|
||||
op->declaration = declaration;
|
||||
|
||||
@@ -258,7 +258,7 @@ index 0fc98be..10df183 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_stream_source(struct wined3d_cs *cs, const void *data)
|
||||
@@ -983,7 +904,7 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -998,7 +919,7 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
|
||||
op->offset = offset;
|
||||
op->stride = stride;
|
||||
|
||||
@@ -267,7 +267,7 @@ index 0fc98be..10df183 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_stream_source_freq(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1010,7 +931,7 @@ void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_i
|
||||
@@ -1025,7 +946,7 @@ void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_i
|
||||
op->frequency = frequency;
|
||||
op->flags = flags;
|
||||
|
||||
@@ -276,7 +276,7 @@ index 0fc98be..10df183 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_stream_output(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1043,7 +964,7 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -1058,7 +979,7 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
|
||||
op->buffer = buffer;
|
||||
op->offset = offset;
|
||||
|
||||
@@ -285,7 +285,7 @@ index 0fc98be..10df183 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_index_buffer(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1077,7 +998,7 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
|
||||
@@ -1092,7 +1013,7 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
|
||||
op->format_id = format_id;
|
||||
op->offset = offset;
|
||||
|
||||
@@ -294,7 +294,7 @@ index 0fc98be..10df183 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_constant_buffer(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1108,7 +1029,7 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
|
||||
@@ -1123,7 +1044,7 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
|
||||
op->cb_idx = cb_idx;
|
||||
op->buffer = buffer;
|
||||
|
||||
@@ -303,7 +303,7 @@ index 0fc98be..10df183 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_texture(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1200,7 +1121,7 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
|
||||
@@ -1215,7 +1136,7 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
|
||||
op->opcode = WINED3D_CS_OP_SET_TEXTURE;
|
||||
op->stage = stage;
|
||||
op->texture = texture;
|
||||
@@ -312,7 +312,7 @@ index 0fc98be..10df183 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_shader_resource_view(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1224,7 +1145,7 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
|
||||
@@ -1239,7 +1160,7 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
|
||||
op->view_idx = view_idx;
|
||||
op->view = view;
|
||||
|
||||
@@ -321,7 +321,7 @@ index 0fc98be..10df183 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_sampler(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1248,7 +1169,7 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
@@ -1263,7 +1184,7 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
op->sampler_idx = sampler_idx;
|
||||
op->sampler = sampler;
|
||||
|
||||
@@ -330,7 +330,7 @@ index 0fc98be..10df183 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_shader(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1271,7 +1192,7 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
@@ -1286,7 +1207,7 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
op->type = type;
|
||||
op->shader = shader;
|
||||
|
||||
@@ -339,7 +339,7 @@ index 0fc98be..10df183 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_rasterizer_state(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1293,7 +1214,7 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
|
||||
@@ -1308,7 +1229,7 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
|
||||
op->opcode = WINED3D_CS_OP_SET_RASTERIZER_STATE;
|
||||
op->state = rasterizer_state;
|
||||
|
||||
@@ -348,7 +348,7 @@ index 0fc98be..10df183 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_vs_consts_f(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1326,8 +1247,9 @@ void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
@@ -1341,8 +1262,9 @@ void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
const struct wined3d_vec4 *constants, enum wined3d_shader_type type)
|
||||
{
|
||||
struct wined3d_cs_set_consts_f *op;
|
||||
@@ -359,7 +359,7 @@ index 0fc98be..10df183 100644
|
||||
switch (type)
|
||||
{
|
||||
case WINED3D_SHADER_TYPE_PIXEL:
|
||||
@@ -1352,7 +1274,7 @@ void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
@@ -1367,7 +1289,7 @@ void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
op->count = count;
|
||||
memcpy(op->constants, constants, sizeof(op->constants[0]) * count);
|
||||
|
||||
@@ -368,7 +368,7 @@ index 0fc98be..10df183 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_render_state(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1374,8 +1296,8 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
|
||||
@@ -1389,8 +1311,8 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
|
||||
op->state = state;
|
||||
op->value = value;
|
||||
|
||||
@@ -379,7 +379,7 @@ index 0fc98be..10df183 100644
|
||||
|
||||
static UINT wined3d_cs_exec_set_vs_consts_b(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
@@ -1405,8 +1327,9 @@ void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
@@ -1420,8 +1342,9 @@ void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
unsigned int count, const BOOL *constants, enum wined3d_shader_type type)
|
||||
{
|
||||
struct wined3d_cs_set_consts_b *op;
|
||||
@@ -390,7 +390,7 @@ index 0fc98be..10df183 100644
|
||||
switch (type)
|
||||
{
|
||||
case WINED3D_SHADER_TYPE_PIXEL:
|
||||
@@ -1431,7 +1354,7 @@ void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
@@ -1446,7 +1369,7 @@ void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
op->count = count;
|
||||
memcpy(op->constants, constants, sizeof(op->constants[0]) * count);
|
||||
|
||||
@@ -399,7 +399,7 @@ index 0fc98be..10df183 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_vs_consts_i(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1462,8 +1385,9 @@ void wined3d_cs_emit_set_consts_i(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
@@ -1477,8 +1400,9 @@ void wined3d_cs_emit_set_consts_i(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
const struct wined3d_ivec4 *constants, enum wined3d_shader_type type)
|
||||
{
|
||||
struct wined3d_cs_set_consts_i *op;
|
||||
@@ -410,7 +410,7 @@ index 0fc98be..10df183 100644
|
||||
switch (type)
|
||||
{
|
||||
case WINED3D_SHADER_TYPE_PIXEL:
|
||||
@@ -1488,7 +1412,7 @@ void wined3d_cs_emit_set_consts_i(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
@@ -1503,7 +1427,7 @@ void wined3d_cs_emit_set_consts_i(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
op->count = count;
|
||||
memcpy(op->constants, constants, sizeof(op->constants[0]) * count);
|
||||
|
||||
@@ -419,7 +419,7 @@ index 0fc98be..10df183 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_texture_state(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1512,7 +1436,7 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
|
||||
@@ -1527,7 +1451,7 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
|
||||
op->state = state;
|
||||
op->value = value;
|
||||
|
||||
@@ -428,7 +428,7 @@ index 0fc98be..10df183 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_sampler_state(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1536,7 +1460,7 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
|
||||
@@ -1551,7 +1475,7 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
|
||||
op->state = state;
|
||||
op->value = value;
|
||||
|
||||
@@ -437,7 +437,7 @@ index 0fc98be..10df183 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_transform(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1560,7 +1484,7 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
|
||||
@@ -1575,7 +1499,7 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
|
||||
op->state = state;
|
||||
op->matrix = *matrix;
|
||||
|
||||
@@ -446,7 +446,7 @@ index 0fc98be..10df183 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_clip_plane(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1582,7 +1506,7 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
|
||||
@@ -1597,7 +1521,7 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
|
||||
op->plane_idx = plane_idx;
|
||||
op->plane = *plane;
|
||||
|
||||
@@ -455,7 +455,7 @@ index 0fc98be..10df183 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1667,7 +1591,7 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
|
||||
@@ -1682,7 +1606,7 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
|
||||
else
|
||||
op->set = 0;
|
||||
|
||||
@@ -464,7 +464,7 @@ index 0fc98be..10df183 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_material(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1688,7 +1612,7 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
|
||||
@@ -1703,7 +1627,7 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
|
||||
op->opcode = WINED3D_CS_OP_SET_MATERIAL;
|
||||
op->material = *material;
|
||||
|
||||
@@ -473,7 +473,7 @@ index 0fc98be..10df183 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1712,7 +1636,7 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
@@ -1727,7 +1651,7 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
op = cs->ops->require_space(cs, sizeof(*op));
|
||||
op->opcode = WINED3D_CS_OP_RESET_STATE;
|
||||
|
||||
@@ -482,7 +482,7 @@ index 0fc98be..10df183 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_destroy_object(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1733,7 +1657,7 @@ void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs, void (*callback)(void
|
||||
@@ -1748,7 +1672,7 @@ void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs, void (*callback)(void
|
||||
op->callback = callback;
|
||||
op->object = object;
|
||||
|
||||
@@ -491,16 +491,25 @@ index 0fc98be..10df183 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_query_issue(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1755,7 +1679,7 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
|
||||
@@ -1770,7 +1694,7 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
|
||||
op->query = query;
|
||||
op->flags = flags;
|
||||
|
||||
- cs->ops->submit(cs);
|
||||
+ cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_unload_resource(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1791,7 +1715,7 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou
|
||||
op->opcode = WINED3D_CS_OP_UNLOAD_RESOURCE;
|
||||
op->resource = resource;
|
||||
|
||||
- cs->ops->submit(cs);
|
||||
+ cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_glfinish(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1781,7 +1705,7 @@ void wined3d_cs_emit_glfinish(struct wined3d_cs *cs)
|
||||
@@ -1817,7 +1741,7 @@ void wined3d_cs_emit_glfinish(struct wined3d_cs *cs)
|
||||
op = cs->ops->require_space(cs, sizeof(*op));
|
||||
op->opcode = WINED3D_CS_OP_GLFINISH;
|
||||
|
||||
@@ -509,7 +518,7 @@ index 0fc98be..10df183 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_base_vertex_index(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1803,7 +1727,7 @@ void wined3d_cs_emit_set_base_vertex_index(struct wined3d_cs *cs,
|
||||
@@ -1839,7 +1763,7 @@ void wined3d_cs_emit_set_base_vertex_index(struct wined3d_cs *cs,
|
||||
op->opcode = WINED3D_CS_OP_SET_BASE_VERTEX_INDEX;
|
||||
op->base_vertex_index = base_vertex_index;
|
||||
|
||||
@@ -518,7 +527,7 @@ index 0fc98be..10df183 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_primitive_type(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1829,7 +1753,7 @@ void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs, GLenum primitive_
|
||||
@@ -1865,7 +1789,7 @@ void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs, GLenum primitive_
|
||||
op->opcode = WINED3D_CS_OP_SET_PRIMITIVE_TYPE;
|
||||
op->gl_primitive_type = primitive_type;
|
||||
|
||||
@@ -527,7 +536,7 @@ index 0fc98be..10df183 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_light(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1886,7 +1810,7 @@ void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light
|
||||
@@ -1922,7 +1846,7 @@ void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light
|
||||
op->opcode = WINED3D_CS_OP_SET_LIGHT;
|
||||
op->light = *light;
|
||||
|
||||
@@ -536,7 +545,7 @@ index 0fc98be..10df183 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_light_enable(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1975,7 +1899,7 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, UINT idx, BOOL enab
|
||||
@@ -2011,7 +1935,7 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, UINT idx, BOOL enab
|
||||
op->idx = idx;
|
||||
op->enable = enable;
|
||||
|
||||
@@ -545,7 +554,7 @@ index 0fc98be..10df183 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_blt(struct wined3d_cs *cs, const void *data)
|
||||
@@ -2007,7 +1931,7 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
|
||||
@@ -2043,7 +1967,7 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
|
||||
if (fx)
|
||||
op->fx = *fx;
|
||||
|
||||
@@ -554,7 +563,7 @@ index 0fc98be..10df183 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_clear_rtv(struct wined3d_cs *cs, const void *data)
|
||||
@@ -2040,7 +1964,7 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
|
||||
@@ -2076,7 +2000,7 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
|
||||
op->stencil = stencil;
|
||||
op->blitter = blitter;
|
||||
|
||||
@@ -563,7 +572,7 @@ index 0fc98be..10df183 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_texture_map(struct wined3d_cs *cs, const void *data)
|
||||
@@ -2065,12 +1989,14 @@ void *wined3d_cs_emit_texture_map(struct wined3d_cs *cs, struct wined3d_texture
|
||||
@@ -2101,12 +2025,14 @@ void *wined3d_cs_emit_texture_map(struct wined3d_cs *cs, struct wined3d_texture
|
||||
op->flags = flags;
|
||||
op->mem = &ret;
|
||||
|
||||
@@ -579,7 +588,7 @@ index 0fc98be..10df183 100644
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -2093,11 +2019,13 @@ void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture
|
||||
@@ -2129,11 +2055,13 @@ void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture
|
||||
op->texture = texture;
|
||||
op->sub_resource_idx = sub_resource_idx;
|
||||
|
||||
@@ -594,7 +603,7 @@ index 0fc98be..10df183 100644
|
||||
/* WINED3D_CS_OP_FENCE */ wined3d_cs_exec_fence,
|
||||
/* WINED3D_CS_OP_PRESENT */ wined3d_cs_exec_present,
|
||||
/* WINED3D_CS_OP_CLEAR */ wined3d_cs_exec_clear,
|
||||
@@ -2145,42 +2073,59 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -2182,42 +2110,59 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_TEXTURE_UNMAP */ wined3d_cs_exec_texture_unmap,
|
||||
};
|
||||
|
||||
@@ -677,7 +686,7 @@ index 0fc98be..10df183 100644
|
||||
};
|
||||
|
||||
/* FIXME: wined3d_device_uninit_3d() should either flush and wait, or be an
|
||||
@@ -2192,9 +2137,38 @@ static void wined3d_cs_emit_stop(struct wined3d_cs *cs)
|
||||
@@ -2229,9 +2174,38 @@ static void wined3d_cs_emit_stop(struct wined3d_cs *cs)
|
||||
op = wined3d_cs_mt_require_space(cs, sizeof(*op));
|
||||
op->opcode = WINED3D_CS_OP_STOP;
|
||||
|
||||
@@ -717,7 +726,7 @@ index 0fc98be..10df183 100644
|
||||
void wined3d_cs_switch_onscreen_ds(struct wined3d_cs *cs,
|
||||
struct wined3d_context *context, struct wined3d_surface *depth_stencil)
|
||||
{
|
||||
@@ -2218,31 +2192,32 @@ void wined3d_cs_switch_onscreen_ds(struct wined3d_cs *cs,
|
||||
@@ -2255,31 +2229,32 @@ void wined3d_cs_switch_onscreen_ds(struct wined3d_cs *cs,
|
||||
static DWORD WINAPI wined3d_cs_run(void *thread_param)
|
||||
{
|
||||
struct wined3d_cs *cs = thread_param;
|
||||
@@ -764,7 +773,7 @@ index 0fc98be..10df183 100644
|
||||
}
|
||||
|
||||
done:
|
||||
@@ -2267,25 +2242,10 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
@@ -2304,25 +2279,10 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
cs->ops = &wined3d_cs_st_ops;
|
||||
cs->device = device;
|
||||
|
||||
@@ -790,7 +799,7 @@ index 0fc98be..10df183 100644
|
||||
if (!(cs->thread = CreateThread(NULL, 0, wined3d_cs_run, cs, 0, NULL)))
|
||||
{
|
||||
ERR("Failed to create wined3d command stream thread.\n");
|
||||
@@ -2297,12 +2257,7 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
@@ -2334,12 +2294,7 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
|
||||
err:
|
||||
if (cs)
|
||||
@@ -803,7 +812,7 @@ index 0fc98be..10df183 100644
|
||||
HeapFree(GetProcessHeap(), 0, cs);
|
||||
return NULL;
|
||||
}
|
||||
@@ -2321,17 +2276,7 @@ void wined3d_cs_destroy(struct wined3d_cs *cs)
|
||||
@@ -2358,17 +2313,7 @@ void wined3d_cs_destroy(struct wined3d_cs *cs)
|
||||
CloseHandle(cs->thread);
|
||||
if (ret != WAIT_OBJECT_0)
|
||||
ERR("Wait failed (%#x).\n", ret);
|
||||
@@ -822,7 +831,7 @@ index 0fc98be..10df183 100644
|
||||
HeapFree(GetProcessHeap(), 0, cs);
|
||||
}
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 135caad..34a00b1 100644
|
||||
index d9c33c6..c1150a6 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -31,6 +31,7 @@
|
||||
@@ -833,7 +842,7 @@ index 135caad..34a00b1 100644
|
||||
#include <stdarg.h>
|
||||
#include <math.h>
|
||||
#include <limits.h>
|
||||
@@ -3035,19 +3036,17 @@ struct wined3d_cs_list
|
||||
@@ -3038,19 +3039,17 @@ struct wined3d_cs_list
|
||||
struct list blocks;
|
||||
};
|
||||
|
||||
@@ -858,7 +867,7 @@ index 135caad..34a00b1 100644
|
||||
void (*finish)(struct wined3d_cs *cs);
|
||||
};
|
||||
|
||||
@@ -3058,14 +3057,9 @@ struct wined3d_cs
|
||||
@@ -3061,14 +3060,9 @@ struct wined3d_cs
|
||||
struct wined3d_state state;
|
||||
HANDLE thread;
|
||||
DWORD thread_id;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From a3f8b91880e4b0ea4a8a8a9dcb6cba9f05bc795b Mon Sep 17 00:00:00 2001
|
||||
From 2fb1651ce03c957a505acbbf282c04c59e47265b 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, 49 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 10df183..1c79290 100644
|
||||
index c04f293..20be430 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -71,6 +71,7 @@ enum wined3d_cs_op
|
||||
@@ -72,6 +72,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_CLEAR_RTV,
|
||||
WINED3D_CS_OP_TEXTURE_MAP,
|
||||
WINED3D_CS_OP_TEXTURE_UNMAP,
|
||||
@@ -21,7 +21,7 @@ index 10df183..1c79290 100644
|
||||
WINED3D_CS_OP_STOP,
|
||||
};
|
||||
|
||||
@@ -403,6 +404,13 @@ struct wined3d_cs_skip
|
||||
@@ -410,6 +411,13 @@ struct wined3d_cs_skip
|
||||
DWORD size;
|
||||
};
|
||||
|
||||
@@ -35,7 +35,7 @@ index 10df183..1c79290 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);
|
||||
@@ -2022,6 +2030,33 @@ void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture
|
||||
@@ -2050,6 +2058,33 @@ void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ index 10df183..1c79290 100644
|
||||
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
|
||||
@@ -2071,6 +2106,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -2100,6 +2135,7 @@ 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,
|
||||
@@ -131,7 +131,7 @@ index 8b15765..c64e5fb 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 34a00b1..c0c5b38 100644
|
||||
index d894b3b..8b0f2a6 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -1437,6 +1437,7 @@ struct wined3d_occlusion_query
|
||||
@@ -142,14 +142,14 @@ index 34a00b1..c0c5b38 100644
|
||||
};
|
||||
|
||||
struct wined3d_timestamp_query
|
||||
@@ -3145,6 +3146,7 @@ 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;
|
||||
@@ -3089,6 +3090,7 @@ void wined3d_cs_emit_glfinish(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *swapchain,
|
||||
const RECT *src_rect, const RECT *dst_rect, HWND dst_window_override, DWORD flags) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *query, DWORD flags) DECLSPEC_HIDDEN;
|
||||
+void wined3d_cs_emit_query_poll(struct wined3d_cs *cs, struct wined3d_query *query, BOOL *ret) DECLSPEC_HIDDEN;
|
||||
|
||||
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
|
||||
* fixed function semantics as D3DCOLOR or FLOAT16 */
|
||||
void wined3d_cs_emit_reset_state(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_base_vertex_index(struct wined3d_cs *cs,
|
||||
UINT base_vertex_index) DECLSPEC_HIDDEN;
|
||||
--
|
||||
2.9.0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From d1901e9158ced30ba849f799ba1b612d8e74752d Mon Sep 17 00:00:00 2001
|
||||
From 30ac0963aabd73ccd9a2035f828cc10ad8e9dc76 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
|
||||
@@ -10,10 +10,10 @@ Subject: wined3d: Poll queries automatically in the CS
|
||||
3 files changed, 46 insertions(+), 50 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 2952104..f7ffc1c 100644
|
||||
index 9054fc3..920f93d 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -71,7 +71,6 @@ enum wined3d_cs_op
|
||||
@@ -72,7 +72,6 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_CLEAR_RTV,
|
||||
WINED3D_CS_OP_TEXTURE_MAP,
|
||||
WINED3D_CS_OP_TEXTURE_UNMAP,
|
||||
@@ -21,7 +21,7 @@ index 2952104..f7ffc1c 100644
|
||||
WINED3D_CS_OP_STOP,
|
||||
};
|
||||
|
||||
@@ -404,13 +403,6 @@ struct wined3d_cs_skip
|
||||
@@ -411,13 +410,6 @@ struct wined3d_cs_skip
|
||||
DWORD size;
|
||||
};
|
||||
|
||||
@@ -35,7 +35,7 @@ index 2952104..f7ffc1c 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);
|
||||
@@ -1675,8 +1667,9 @@ static UINT wined3d_cs_exec_query_issue(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1682,8 +1674,9 @@ static UINT wined3d_cs_exec_query_issue(struct wined3d_cs *cs, const void *data)
|
||||
|
||||
query->query_ops->query_issue(query, op->flags);
|
||||
|
||||
@@ -47,7 +47,7 @@ index 2952104..f7ffc1c 100644
|
||||
|
||||
return sizeof(*op);
|
||||
}
|
||||
@@ -2033,33 +2026,6 @@ void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture
|
||||
@@ -2061,33 +2054,6 @@ void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ index 2952104..f7ffc1c 100644
|
||||
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
|
||||
@@ -2109,7 +2075,6 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -2138,7 +2104,6 @@ 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,
|
||||
@@ -89,7 +89,7 @@ index 2952104..f7ffc1c 100644
|
||||
};
|
||||
|
||||
static void *wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size)
|
||||
@@ -2228,17 +2193,45 @@ void wined3d_cs_switch_onscreen_ds(struct wined3d_cs *cs,
|
||||
@@ -2257,17 +2222,45 @@ void wined3d_cs_switch_onscreen_ds(struct wined3d_cs *cs,
|
||||
wined3d_texture_incref(cs->onscreen_depth_stencil->container);
|
||||
}
|
||||
|
||||
@@ -194,7 +194,7 @@ index 99a1411..b5e1fde 100644
|
||||
if (data)
|
||||
memcpy(data, query->data, min(data_size, query->data_size));
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index a10b30f..e6d2602 100644
|
||||
index d6518c7..83d270e 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -1396,7 +1396,8 @@ struct wined3d_query
|
||||
@@ -207,7 +207,7 @@ index a10b30f..e6d2602 100644
|
||||
};
|
||||
|
||||
union wined3d_gl_query_object
|
||||
@@ -3064,6 +3065,7 @@ struct wined3d_cs
|
||||
@@ -3067,6 +3068,7 @@ struct wined3d_cs
|
||||
struct wined3d_cs_queue queue;
|
||||
|
||||
LONG pending_presents;
|
||||
@@ -215,14 +215,14 @@ index a10b30f..e6d2602 100644
|
||||
};
|
||||
|
||||
struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device) DECLSPEC_HIDDEN;
|
||||
@@ -3147,7 +3149,6 @@ 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;
|
||||
@@ -3091,7 +3093,6 @@ void wined3d_cs_emit_glfinish(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *swapchain,
|
||||
const RECT *src_rect, const RECT *dst_rect, HWND dst_window_override, DWORD flags) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *query, DWORD flags) DECLSPEC_HIDDEN;
|
||||
-void wined3d_cs_emit_query_poll(struct wined3d_cs *cs, struct wined3d_query *query, BOOL *ret) DECLSPEC_HIDDEN;
|
||||
|
||||
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
|
||||
* fixed function semantics as D3DCOLOR or FLOAT16 */
|
||||
void wined3d_cs_emit_reset_state(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_base_vertex_index(struct wined3d_cs *cs,
|
||||
UINT base_vertex_index) DECLSPEC_HIDDEN;
|
||||
--
|
||||
2.9.0
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user