mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
Rebase against 0f2a776a59006a15fb84a2a51237d3484f136966.
This commit is contained in:
parent
0fabea78c6
commit
d926a91bfa
@ -51,7 +51,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "77fc4697dd7c2b81181c4549c22210bc16913736"
|
||||
echo "0f2a776a59006a15fb84a2a51237d3484f136966"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 7720d0dce434a561ff6c6c6e3d0ac3787691f851 Mon Sep 17 00:00:00 2001
|
||||
From d85d4d230b8d8d5fc13ef101272a53ccad04d4c1 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.
|
||||
@ -18,10 +18,10 @@ moving allocation of all locations (including sysmem) there.
|
||||
6 files changed, 34 insertions(+), 22 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
index e741969..49e1c56 100644
|
||||
index 085ed03..20d7868 100644
|
||||
--- a/dlls/wined3d/context.c
|
||||
+++ b/dlls/wined3d/context.c
|
||||
@@ -2442,7 +2442,6 @@ static void context_validate_onscreen_formats(struct wined3d_context *context,
|
||||
@@ -2455,7 +2455,6 @@ static void context_validate_onscreen_formats(struct wined3d_context *context,
|
||||
{
|
||||
/* Onscreen surfaces are always in a swapchain */
|
||||
struct wined3d_swapchain *swapchain = context->current_rt.texture->swapchain;
|
||||
@ -29,7 +29,7 @@ index e741969..49e1c56 100644
|
||||
|
||||
if (context->render_offscreen || !depth_stencil) return;
|
||||
if (match_depth_stencil_format(swapchain->ds_format, depth_stencil->format)) return;
|
||||
@@ -2453,8 +2452,8 @@ static void context_validate_onscreen_formats(struct wined3d_context *context,
|
||||
@@ -2466,8 +2465,8 @@ static void context_validate_onscreen_formats(struct wined3d_context *context,
|
||||
WARN("Depth stencil format is not supported by WGL, rendering the backbuffer in an FBO\n");
|
||||
|
||||
/* The currently active context is the necessary context to access the swapchain's onscreen buffers */
|
||||
@ -41,7 +41,7 @@ index e741969..49e1c56 100644
|
||||
swapchain_update_draw_bindings(swapchain);
|
||||
context_set_render_offscreen(context, TRUE);
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 0964da8..66cd8c1 100644
|
||||
index a5a3fc4..b3ecf33 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -324,14 +324,15 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
|
||||
@ -64,7 +64,7 @@ index 0964da8..66cd8c1 100644
|
||||
context, rtv->resource->draw_binding);
|
||||
}
|
||||
}
|
||||
@@ -4155,7 +4156,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
@@ -4184,7 +4185,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
if (!dst_point.x && !dst_point.y && src_rect.right == width && src_rect.bottom == height)
|
||||
wined3d_texture_prepare_texture(texture, context, FALSE);
|
||||
else
|
||||
@ -74,10 +74,10 @@ index 0964da8..66cd8c1 100644
|
||||
|
||||
wined3d_surface_upload_data(surface, gl_info, resource->format,
|
||||
diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c
|
||||
index c086491..78628c5 100644
|
||||
index 9f92851..1821db4 100644
|
||||
--- a/dlls/wined3d/drawprim.c
|
||||
+++ b/dlls/wined3d/drawprim.c
|
||||
@@ -437,19 +437,19 @@ void draw_primitive(struct wined3d_device *device, const struct wined3d_state *s
|
||||
@@ -438,19 +438,19 @@ void draw_primitive(struct wined3d_device *device, const struct wined3d_state *s
|
||||
for (i = 0; i < gl_info->limits.buffers; ++i)
|
||||
{
|
||||
struct wined3d_rendertarget_view *rtv = fb->render_targets[i];
|
||||
@ -103,7 +103,7 @@ index c086491..78628c5 100644
|
||||
}
|
||||
}
|
||||
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
index f65a00d..df840f3 100644
|
||||
index 9596735..ea52af6 100644
|
||||
--- a/dlls/wined3d/swapchain.c
|
||||
+++ b/dlls/wined3d/swapchain.c
|
||||
@@ -327,7 +327,7 @@ static void swapchain_blit(const struct wined3d_swapchain *swapchain,
|
||||
@ -134,10 +134,10 @@ index f65a00d..df840f3 100644
|
||||
|
||||
if (swapchain->render_to_fbo)
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index c5c1114..cf98940 100644
|
||||
index 17140aa..4ef9e88 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -322,7 +322,7 @@ static void wined3d_texture_update_map_binding(struct wined3d_texture *texture)
|
||||
@@ -352,7 +352,7 @@ static void wined3d_texture_update_map_binding(struct wined3d_texture *texture)
|
||||
for (i = 0; i < sub_count; ++i)
|
||||
{
|
||||
if (texture->sub_resources[i].locations == texture->resource.map_binding
|
||||
@ -146,7 +146,7 @@ index c5c1114..cf98940 100644
|
||||
ERR("Failed to load location %s.\n", wined3d_debug_location(map_binding));
|
||||
if (texture->resource.map_binding == WINED3D_LOCATION_BUFFER)
|
||||
wined3d_texture_remove_buffer_object(texture, i, context->gl_info);
|
||||
@@ -786,7 +786,7 @@ void wined3d_texture_load(struct wined3d_texture *texture,
|
||||
@@ -914,7 +914,7 @@ void wined3d_texture_load(struct wined3d_texture *texture,
|
||||
TRACE("Reloading because of color key value change.\n");
|
||||
for (i = 0; i < sub_count; i++)
|
||||
{
|
||||
@ -155,7 +155,7 @@ index c5c1114..cf98940 100644
|
||||
ERR("Failed to load location %s.\n", wined3d_debug_location(texture->resource.map_binding));
|
||||
else
|
||||
wined3d_texture_invalidate_location(texture, i, ~texture->resource.map_binding);
|
||||
@@ -804,7 +804,7 @@ void wined3d_texture_load(struct wined3d_texture *texture,
|
||||
@@ -932,7 +932,7 @@ void wined3d_texture_load(struct wined3d_texture *texture,
|
||||
/* Reload the surfaces if the texture is marked dirty. */
|
||||
for (i = 0; i < sub_count; ++i)
|
||||
{
|
||||
@ -164,7 +164,7 @@ index c5c1114..cf98940 100644
|
||||
srgb ? WINED3D_LOCATION_TEXTURE_SRGB : WINED3D_LOCATION_TEXTURE_RGB))
|
||||
ERR("Failed to load location (srgb %#x).\n", srgb);
|
||||
}
|
||||
@@ -1285,7 +1285,7 @@ HRESULT CDECL wined3d_texture_add_dirty_region(struct wined3d_texture *texture,
|
||||
@@ -1413,7 +1413,7 @@ HRESULT CDECL wined3d_texture_add_dirty_region(struct wined3d_texture *texture,
|
||||
WARN("Ignoring dirty_region %s.\n", debug_box(dirty_region));
|
||||
|
||||
context = context_acquire(texture->resource.device, NULL);
|
||||
@ -173,15 +173,15 @@ index c5c1114..cf98940 100644
|
||||
context, texture->resource.map_binding))
|
||||
{
|
||||
ERR("Failed to load location %s.\n", wined3d_debug_location(texture->resource.map_binding));
|
||||
@@ -1331,6 +1331,7 @@ static HRESULT wined3d_texture_upload_data(struct wined3d_texture *texture,
|
||||
return WINED3D_OK;
|
||||
@@ -1434,6 +1434,7 @@ static void wined3d_texture_upload_data(struct wined3d_texture *texture, unsigne
|
||||
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_sub_resource_data *data)
|
||||
{
|
||||
@@ -1525,7 +1526,7 @@ static void wined3d_texture_unload(struct wined3d_resource *resource)
|
||||
const struct wined3d_context *context, const struct wined3d_const_bo_address *data,
|
||||
unsigned int row_pitch, unsigned int slice_pitch)
|
||||
@@ -1592,7 +1593,7 @@ static void wined3d_texture_unload(struct wined3d_resource *resource)
|
||||
struct wined3d_texture_sub_resource *sub_resource = &texture->sub_resources[i];
|
||||
|
||||
if (resource->pool != WINED3D_POOL_DEFAULT
|
||||
@ -190,7 +190,7 @@ index c5c1114..cf98940 100644
|
||||
{
|
||||
wined3d_texture_invalidate_location(texture, i, ~resource->map_binding);
|
||||
}
|
||||
@@ -1644,7 +1645,7 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
|
||||
@@ -1711,7 +1712,7 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
|
||||
{
|
||||
if (resource->usage & WINED3DUSAGE_DYNAMIC)
|
||||
WARN_(d3d_perf)("Mapping a dynamic texture without WINED3D_MAP_DISCARD.\n");
|
||||
@ -199,15 +199,15 @@ index c5c1114..cf98940 100644
|
||||
sub_resource_idx, context, texture->resource.map_binding);
|
||||
}
|
||||
|
||||
@@ -2004,6 +2005,7 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
|
||||
@@ -2073,6 +2074,7 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
+/* Context activation is done by the caller. */
|
||||
static void texture3d_upload_data(struct wined3d_texture *texture, unsigned int sub_resource_idx,
|
||||
const struct wined3d_context *context, const struct wined3d_sub_resource_data *data)
|
||||
{
|
||||
@@ -2633,3 +2635,10 @@ HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsign
|
||||
const struct wined3d_context *context, const struct wined3d_const_bo_address *data,
|
||||
unsigned int row_pitch, unsigned int slice_pitch)
|
||||
@@ -2883,3 +2885,10 @@ HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsign
|
||||
|
||||
return WINED3D_OK;
|
||||
}
|
||||
@ -219,10 +219,10 @@ index c5c1114..cf98940 100644
|
||||
+ return texture->texture_ops->texture_load_location(texture, sub_resource_idx, context, location);
|
||||
+}
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index d51d465..9a5989d 100644
|
||||
index 1873a79..7fd8ae0 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2584,6 +2584,8 @@ void *wined3d_texture_map_bo_address(const struct wined3d_bo_address *data, size
|
||||
@@ -2761,6 +2761,8 @@ void *wined3d_texture_map_bo_address(const struct wined3d_bo_address *data, size
|
||||
const struct wined3d_gl_info *gl_info, GLenum binding, DWORD flags) DECLSPEC_HIDDEN;
|
||||
BOOL wined3d_texture_prepare_location(struct wined3d_texture *texture, unsigned int sub_resource_idx,
|
||||
struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
|
||||
@ -232,5 +232,5 @@ index d51d465..9a5989d 100644
|
||||
struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN;
|
||||
void wined3d_texture_set_map_binding(struct wined3d_texture *texture, DWORD map_binding) DECLSPEC_HIDDEN;
|
||||
--
|
||||
2.8.0
|
||||
2.9.0
|
||||
|
||||
|
@ -1,16 +1,16 @@
|
||||
From 58b512db9806c5b765e05bd63fc34decf955b30d Mon Sep 17 00:00:00 2001
|
||||
From 1ae4626e129479f2b9d92e1a3fbf643b3173496b 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 | 365 +++++++++++++++++++++++++++++++++++++----
|
||||
dlls/wined3d/cs.c | 369 +++++++++++++++++++++++++++++++++++++----
|
||||
dlls/wined3d/wined3d_main.c | 9 +
|
||||
dlls/wined3d/wined3d_private.h | 18 ++
|
||||
3 files changed, 363 insertions(+), 29 deletions(-)
|
||||
3 files changed, 366 insertions(+), 30 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 44cfb39..a3245a0 100644
|
||||
index 0553d4a..5d97d9a 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 44cfb39..a3245a0 100644
|
||||
WINED3D_CS_OP_PRESENT,
|
||||
WINED3D_CS_OP_CLEAR,
|
||||
WINED3D_CS_OP_DRAW,
|
||||
@@ -54,6 +65,18 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_SET_MATERIAL,
|
||||
@@ -55,6 +66,18 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_RESET_STATE,
|
||||
WINED3D_CS_OP_DESTROY_OBJECT,
|
||||
WINED3D_CS_OP_QUERY_ISSUE,
|
||||
+ WINED3D_CS_OP_STOP,
|
||||
+};
|
||||
+
|
||||
@ -52,8 +52,8 @@ index 44cfb39..a3245a0 100644
|
||||
};
|
||||
|
||||
struct wined3d_cs_present
|
||||
@@ -267,7 +290,134 @@ struct wined3d_cs_destroy_object
|
||||
void *object;
|
||||
@@ -275,7 +298,134 @@ struct wined3d_cs_query_issue
|
||||
DWORD flags;
|
||||
};
|
||||
|
||||
-static void wined3d_cs_exec_present(struct wined3d_cs *cs, const void *data)
|
||||
@ -188,7 +188,7 @@ index 44cfb39..a3245a0 100644
|
||||
{
|
||||
const struct wined3d_cs_present *op = data;
|
||||
struct wined3d_swapchain *swapchain;
|
||||
@@ -283,6 +433,8 @@ static void wined3d_cs_exec_present(struct wined3d_cs *cs, const void *data)
|
||||
@@ -291,6 +441,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 44cfb39..a3245a0 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *swapchain,
|
||||
@@ -308,13 +460,14 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
|
||||
@@ -316,13 +468,14 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -213,7 +213,7 @@ index 44cfb39..a3245a0 100644
|
||||
|
||||
device = cs->device;
|
||||
state = &device->state;
|
||||
@@ -333,6 +486,8 @@ static void wined3d_cs_exec_clear(struct wined3d_cs *cs, const void *data)
|
||||
@@ -341,6 +494,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 44cfb39..a3245a0 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *rects,
|
||||
@@ -365,7 +520,7 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
@@ -373,7 +528,7 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -231,7 +231,7 @@ index 44cfb39..a3245a0 100644
|
||||
{
|
||||
struct wined3d_state *state = &cs->device->state;
|
||||
struct wined3d_shader_sampler_map_entry *entry;
|
||||
@@ -424,6 +579,8 @@ static void wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
|
||||
@@ -432,6 +587,8 @@ static void wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
|
||||
wined3d_resource_release(view->resource);
|
||||
}
|
||||
}
|
||||
@ -240,7 +240,7 @@ index 44cfb39..a3245a0 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned int start_idx,
|
||||
@@ -489,12 +646,14 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned i
|
||||
@@ -497,12 +654,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 44cfb39..a3245a0 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query *predicate, BOOL value)
|
||||
@@ -509,12 +668,14 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query
|
||||
@@ -517,12 +676,14 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -272,7 +272,7 @@ index 44cfb39..a3245a0 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_viewport *viewport)
|
||||
@@ -528,12 +689,14 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
|
||||
@@ -536,12 +697,14 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -288,7 +288,7 @@ index 44cfb39..a3245a0 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
|
||||
@@ -547,12 +710,14 @@ 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)
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -304,7 +304,7 @@ index 44cfb39..a3245a0 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int view_idx,
|
||||
@@ -568,7 +733,7 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
|
||||
@@ -576,7 +741,7 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -313,7 +313,7 @@ index 44cfb39..a3245a0 100644
|
||||
{
|
||||
const struct wined3d_cs_set_depth_stencil_view *op = data;
|
||||
struct wined3d_device *device = cs->device;
|
||||
@@ -607,6 +772,8 @@ static void wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
|
||||
@@ -615,6 +780,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 44cfb39..a3245a0 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3d_rendertarget_view *view)
|
||||
@@ -620,12 +787,14 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3
|
||||
@@ -628,12 +795,14 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -338,7 +338,7 @@ index 44cfb39..a3245a0 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3d_vertex_declaration *declaration)
|
||||
@@ -639,7 +808,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
|
||||
@@ -647,7 +816,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -347,7 +347,7 @@ index 44cfb39..a3245a0 100644
|
||||
{
|
||||
const struct wined3d_cs_set_stream_source *op = data;
|
||||
struct wined3d_stream_state *stream;
|
||||
@@ -657,6 +826,8 @@ static void wined3d_cs_exec_set_stream_source(struct wined3d_cs *cs, const void
|
||||
@@ -665,6 +834,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 44cfb39..a3245a0 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -674,7 +845,7 @@ 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,
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -365,7 +365,7 @@ index 44cfb39..a3245a0 100644
|
||||
{
|
||||
const struct wined3d_cs_set_stream_source_freq *op = data;
|
||||
struct wined3d_stream_state *stream;
|
||||
@@ -684,6 +855,8 @@ static void wined3d_cs_exec_set_stream_source_freq(struct wined3d_cs *cs, const
|
||||
@@ -692,6 +863,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 44cfb39..a3245a0 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_idx, UINT frequency, UINT flags)
|
||||
@@ -699,7 +872,7 @@ void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_i
|
||||
@@ -707,7 +880,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 44cfb39..a3245a0 100644
|
||||
{
|
||||
const struct wined3d_cs_set_stream_output *op = data;
|
||||
struct wined3d_stream_output *stream;
|
||||
@@ -714,6 +887,8 @@ static void wined3d_cs_exec_set_stream_output(struct wined3d_cs *cs, const void
|
||||
@@ -722,6 +895,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 44cfb39..a3245a0 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -730,7 +905,7 @@ 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,
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -401,7 +401,7 @@ index 44cfb39..a3245a0 100644
|
||||
{
|
||||
const struct wined3d_cs_set_index_buffer *op = data;
|
||||
struct wined3d_buffer *prev;
|
||||
@@ -746,6 +921,8 @@ static void wined3d_cs_exec_set_index_buffer(struct wined3d_cs *cs, const void *
|
||||
@@ -754,6 +929,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 44cfb39..a3245a0 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buffer *buffer,
|
||||
@@ -762,7 +939,7 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
|
||||
@@ -770,7 +947,7 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -419,7 +419,7 @@ index 44cfb39..a3245a0 100644
|
||||
{
|
||||
const struct wined3d_cs_set_constant_buffer *op = data;
|
||||
struct wined3d_buffer *prev;
|
||||
@@ -776,6 +953,7 @@ static void wined3d_cs_exec_set_constant_buffer(struct wined3d_cs *cs, const voi
|
||||
@@ -784,6 +961,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 44cfb39..a3245a0 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_shader_type type,
|
||||
@@ -792,7 +970,7 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
|
||||
@@ -800,7 +978,7 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -436,7 +436,7 @@ index 44cfb39..a3245a0 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;
|
||||
@@ -869,6 +1047,8 @@ static void wined3d_cs_exec_set_texture(struct wined3d_cs *cs, const void *data)
|
||||
@@ -877,6 +1055,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 44cfb39..a3245a0 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined3d_texture *texture)
|
||||
@@ -883,12 +1063,14 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
|
||||
@@ -891,12 +1071,14 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -461,7 +461,7 @@ index 44cfb39..a3245a0 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3d_shader_type type,
|
||||
@@ -905,12 +1087,14 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
|
||||
@@ -913,12 +1095,14 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -477,7 +477,7 @@ index 44cfb39..a3245a0 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type type,
|
||||
@@ -927,13 +1111,15 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
@@ -935,13 +1119,15 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -494,7 +494,7 @@ index 44cfb39..a3245a0 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type type, struct wined3d_shader *shader)
|
||||
@@ -948,12 +1134,14 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
@@ -956,12 +1142,14 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -510,7 +510,7 @@ index 44cfb39..a3245a0 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
|
||||
@@ -968,12 +1156,14 @@ 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,
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -526,7 +526,7 @@ index 44cfb39..a3245a0 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render_state state, DWORD value)
|
||||
@@ -988,12 +1178,14 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
|
||||
@@ -996,12 +1186,14 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -542,7 +542,7 @@ index 44cfb39..a3245a0 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
|
||||
@@ -1010,12 +1202,14 @@ 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,
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -558,7 +558,7 @@ index 44cfb39..a3245a0 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
|
||||
@@ -1032,13 +1226,15 @@ 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,
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -575,7 +575,7 @@ index 44cfb39..a3245a0 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform_state state,
|
||||
@@ -1054,12 +1250,14 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
|
||||
@@ -1062,12 +1258,14 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -591,7 +591,7 @@ index 44cfb39..a3245a0 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const struct wined3d_vec4 *plane)
|
||||
@@ -1074,7 +1272,7 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
|
||||
@@ -1082,7 +1280,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 44cfb39..a3245a0 100644
|
||||
{
|
||||
const struct wined3d_cs_set_color_key *op = data;
|
||||
struct wined3d_texture *texture = op->texture;
|
||||
@@ -1135,6 +1333,8 @@ static void wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *dat
|
||||
@@ -1143,6 +1341,8 @@ static void wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *dat
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -609,7 +609,7 @@ index 44cfb39..a3245a0 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture *texture,
|
||||
@@ -1157,12 +1357,14 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
|
||||
@@ -1165,12 +1365,14 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -625,7 +625,7 @@ index 44cfb39..a3245a0 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_material *material)
|
||||
@@ -1176,7 +1378,7 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
|
||||
@@ -1184,7 +1386,7 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -634,7 +634,7 @@ index 44cfb39..a3245a0 100644
|
||||
{
|
||||
struct wined3d_adapter *adapter = cs->device->adapter;
|
||||
HRESULT hr;
|
||||
@@ -1186,6 +1388,8 @@ static void wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1194,6 +1396,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 44cfb39..a3245a0 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
@@ -1198,11 +1402,13 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
@@ -1206,11 +1410,13 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -658,7 +658,23 @@ index 44cfb39..a3245a0 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs, void (*callback)(void *object), void *object)
|
||||
@@ -1217,8 +1423,9 @@ void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs, void (*callback)(void
|
||||
@@ -1225,12 +1431,14 @@ void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs, void (*callback)(void
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
-static void wined3d_cs_exec_query_issue(struct wined3d_cs *cs, const void *data)
|
||||
+static UINT wined3d_cs_exec_query_issue(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
const struct wined3d_cs_query_issue *op = data;
|
||||
struct wined3d_query *query = op->query;
|
||||
|
||||
query->query_ops->query_issue(query, op->flags);
|
||||
+
|
||||
+ return sizeof(*op);
|
||||
}
|
||||
|
||||
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
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -669,7 +685,7 @@ index 44cfb39..a3245a0 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,
|
||||
@@ -1279,6 +1486,58 @@ static const struct wined3d_cs_ops wined3d_cs_st_ops =
|
||||
@@ -1308,6 +1517,58 @@ static const struct wined3d_cs_ops wined3d_cs_st_ops =
|
||||
wined3d_cs_st_submit,
|
||||
};
|
||||
|
||||
@ -728,7 +744,7 @@ index 44cfb39..a3245a0 100644
|
||||
struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
|
||||
@@ -1305,12 +1564,60 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
@@ -1334,12 +1595,60 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -817,7 +833,7 @@ index 1dd6a8b..f573dcb 100644
|
||||
|
||||
if (appkey) RegCloseKey( appkey );
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 0659aa5..71bbe74 100644
|
||||
index b8511dc..5320680 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -310,6 +310,7 @@ struct wined3d_settings
|
||||
@ -828,7 +844,7 @@ index 0659aa5..71bbe74 100644
|
||||
};
|
||||
|
||||
extern struct wined3d_settings wined3d_settings DECLSPEC_HIDDEN;
|
||||
@@ -3031,6 +3032,18 @@ HRESULT state_init(struct wined3d_state *state, const struct wined3d_gl_info *gl
|
||||
@@ -3026,6 +3027,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;
|
||||
|
||||
@ -847,7 +863,7 @@ index 0659aa5..71bbe74 100644
|
||||
struct wined3d_cs_ops
|
||||
{
|
||||
void *(*require_space)(struct wined3d_cs *cs, size_t size);
|
||||
@@ -3042,9 +3055,14 @@ struct wined3d_cs
|
||||
@@ -3037,9 +3050,14 @@ struct wined3d_cs
|
||||
const struct wined3d_cs_ops *ops;
|
||||
struct wined3d_device *device;
|
||||
struct wined3d_state state;
|
||||
@ -863,5 +879,5 @@ index 0659aa5..71bbe74 100644
|
||||
|
||||
struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device) DECLSPEC_HIDDEN;
|
||||
--
|
||||
2.8.0
|
||||
2.9.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 1236a4b57b6e2ce2a5a22e8ac1a88a048fed0a62 Mon Sep 17 00:00:00 2001
|
||||
From ffb4510b1d1584bdd4571eff25b126ae86082628 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 6226cea..d7895ca 100644
|
||||
index 0fbdc2c..e693cde 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -64,6 +64,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_SET_MATERIAL,
|
||||
@@ -66,6 +66,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_RESET_STATE,
|
||||
WINED3D_CS_OP_DESTROY_OBJECT,
|
||||
WINED3D_CS_OP_QUERY_ISSUE,
|
||||
+ WINED3D_CS_OP_STATEBLOCK,
|
||||
WINED3D_CS_OP_STOP,
|
||||
};
|
||||
|
||||
@@ -283,6 +284,12 @@ struct wined3d_cs_destroy_object
|
||||
void *object;
|
||||
@@ -298,6 +299,12 @@ struct wined3d_cs_query_issue
|
||||
DWORD flags;
|
||||
};
|
||||
|
||||
+struct wined3d_cs_stateblock
|
||||
@ -34,7 +34,7 @@ index 6226cea..d7895ca 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)
|
||||
{
|
||||
@@ -463,7 +470,7 @@ static UINT wined3d_cs_exec_clear(struct wined3d_cs *cs, const void *data)
|
||||
@@ -478,7 +485,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 6226cea..d7895ca 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,
|
||||
@@ -515,7 +522,7 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
@@ -530,7 +537,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 6226cea..d7895ca 100644
|
||||
struct wined3d_shader_sampler_map_entry *entry;
|
||||
struct wined3d_shader_resource_view *view;
|
||||
const struct wined3d_cs_draw *op = data;
|
||||
@@ -1052,6 +1059,55 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
|
||||
@@ -1067,6 +1074,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 6226cea..d7895ca 100644
|
||||
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
@@ -1424,6 +1480,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_SET_MATERIAL */ wined3d_cs_exec_set_material,
|
||||
@@ -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,
|
||||
/* WINED3D_CS_OP_DESTROY_OBJECT */ wined3d_cs_exec_destroy_object,
|
||||
/* WINED3D_CS_OP_QUERY_ISSUE */ wined3d_cs_exec_query_issue,
|
||||
+ /* WINED3D_CS_OP_STATEBLOCK */ wined3d_cs_exec_transfer_stateblock,
|
||||
};
|
||||
|
||||
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
|
||||
@@ -1513,7 +1570,7 @@ done:
|
||||
@@ -1574,7 +1631,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 6226cea..d7895ca 100644
|
||||
|
||||
if (!(cs = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*cs))))
|
||||
return NULL;
|
||||
@@ -1521,8 +1578,7 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
@@ -1582,8 +1639,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 6226cea..d7895ca 100644
|
||||
}
|
||||
|
||||
cs->ops = &wined3d_cs_st_ops;
|
||||
@@ -1531,17 +1587,13 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
@@ -1592,17 +1648,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 6226cea..d7895ca 100644
|
||||
}
|
||||
|
||||
if (wined3d_settings.cs_multithreaded)
|
||||
@@ -1554,15 +1606,22 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
@@ -1615,15 +1667,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 6226cea..d7895ca 100644
|
||||
|
||||
void wined3d_cs_destroy(struct wined3d_cs *cs)
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 3461343..36efae2 100644
|
||||
index 48d4af4..07c086f 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -3519,6 +3519,7 @@ HRESULT CDECL wined3d_device_draw_primitive(struct wined3d_device *device, UINT
|
||||
@@ -3545,6 +3545,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 3461343..36efae2 100644
|
||||
wined3d_cs_emit_draw(device->cs, 0, start_vertex, vertex_count, 0, 0, FALSE);
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -3547,6 +3548,7 @@ HRESULT CDECL wined3d_device_draw_indexed_primitive(struct wined3d_device *devic
|
||||
@@ -3573,6 +3574,7 @@ HRESULT CDECL wined3d_device_draw_indexed_primitive(struct wined3d_device *devic
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@ -203,7 +203,7 @@ index 3461343..36efae2 100644
|
||||
wined3d_cs_emit_draw(device->cs, device->state.base_vertex_index, start_idx, index_count, 0, 0, TRUE);
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -3558,6 +3560,7 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device
|
||||
@@ -3584,6 +3586,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 3461343..36efae2 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 fafc1cb..4e39d98 100644
|
||||
index b5a8a30..c460520 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2990,7 +2990,7 @@ struct wined3d_cs_block
|
||||
@@ -3036,7 +3036,7 @@ struct wined3d_cs_block
|
||||
{
|
||||
struct list entry;
|
||||
UINT pos;
|
||||
@ -224,7 +224,7 @@ index fafc1cb..4e39d98 100644
|
||||
};
|
||||
|
||||
struct wined3d_cs_ops
|
||||
@@ -3033,6 +3033,8 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
|
||||
@@ -3080,6 +3080,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;
|
||||
@ -234,5 +234,5 @@ index fafc1cb..4e39d98 100644
|
||||
struct wined3d_rendertarget_view *view) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buffer *buffer,
|
||||
--
|
||||
2.8.0
|
||||
2.9.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 38ac2472c5c9a70a5a8515fe4e2a249eb0ea0a74 Mon Sep 17 00:00:00 2001
|
||||
From 0c8b5c8eb141991e967ff7fd7694be40704233d9 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 d7895ca..dcbafa6 100644
|
||||
index e693cde..ec1cc22 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -65,6 +65,8 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_RESET_STATE,
|
||||
@@ -67,6 +67,8 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_DESTROY_OBJECT,
|
||||
WINED3D_CS_OP_QUERY_ISSUE,
|
||||
WINED3D_CS_OP_STATEBLOCK,
|
||||
+ WINED3D_CS_OP_SET_VS_CONSTS_F,
|
||||
+ WINED3D_CS_OP_SET_PS_CONSTS_F,
|
||||
WINED3D_CS_OP_STOP,
|
||||
};
|
||||
|
||||
@@ -290,6 +292,14 @@ struct wined3d_cs_stateblock
|
||||
@@ -305,6 +307,14 @@ struct wined3d_cs_stateblock
|
||||
struct wined3d_state state;
|
||||
};
|
||||
|
||||
@ -37,7 +37,7 @@ index d7895ca..dcbafa6 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)
|
||||
{
|
||||
@@ -1074,11 +1084,9 @@ static UINT wined3d_cs_exec_transfer_stateblock(struct wined3d_cs *cs, const voi
|
||||
@@ -1089,11 +1099,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 d7895ca..dcbafa6 100644
|
||||
|
||||
memcpy(cs->state.lights, op->state.lights, sizeof(cs->state.lights));
|
||||
|
||||
@@ -1099,11 +1107,9 @@ void wined3d_cs_emit_transfer_stateblock(struct wined3d_cs *cs, const struct win
|
||||
@@ -1114,11 +1122,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 d7895ca..dcbafa6 100644
|
||||
|
||||
/* FIXME: This is not ideal. CS is still running synchronously, so this is ok.
|
||||
* It will go away soon anyway. */
|
||||
@@ -1183,6 +1189,65 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
@@ -1220,6 +1226,65 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -127,9 +127,9 @@ index d7895ca..dcbafa6 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;
|
||||
@@ -1481,6 +1546,8 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_RESET_STATE */ wined3d_cs_exec_reset_state,
|
||||
@@ -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,
|
||||
/* WINED3D_CS_OP_QUERY_ISSUE */ wined3d_cs_exec_query_issue,
|
||||
/* 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 d7895ca..dcbafa6 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 36efae2..77ca973 100644
|
||||
index 07c086f..9e5dfd6 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -2518,7 +2518,8 @@ HRESULT CDECL wined3d_device_set_vs_consts_f(struct wined3d_device *device,
|
||||
@@ -2544,7 +2544,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 36efae2..77ca973 100644
|
||||
|
||||
return WINED3D_OK;
|
||||
}
|
||||
@@ -2752,7 +2753,8 @@ HRESULT CDECL wined3d_device_set_ps_consts_f(struct wined3d_device *device,
|
||||
@@ -2778,7 +2779,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,10 +161,10 @@ index 36efae2..77ca973 100644
|
||||
return WINED3D_OK;
|
||||
}
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 30610a2..56de135 100644
|
||||
index c460520..567f84a 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -3109,6 +3109,8 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
|
||||
@@ -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;
|
||||
@ -174,5 +174,5 @@ index 30610a2..56de135 100644
|
||||
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
|
||||
* fixed function semantics as D3DCOLOR or FLOAT16 */
|
||||
--
|
||||
2.8.0
|
||||
2.9.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From a76d4c29517eed17544b8dcfb9e8194bec6d60e3 Mon Sep 17 00:00:00 2001
|
||||
From 10d1d1d3b94c9ae89534864389235c2f982cb999 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 48c101e..ffec875 100644
|
||||
index 71603a1..db7699c 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -66,7 +66,9 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_DESTROY_OBJECT,
|
||||
@@ -68,7 +68,9 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_QUERY_ISSUE,
|
||||
WINED3D_CS_OP_STATEBLOCK,
|
||||
WINED3D_CS_OP_SET_VS_CONSTS_F,
|
||||
+ WINED3D_CS_OP_SET_VS_CONSTS_B,
|
||||
@ -23,7 +23,7 @@ index 48c101e..ffec875 100644
|
||||
WINED3D_CS_OP_GLFINISH,
|
||||
WINED3D_CS_OP_SET_BASE_VERTEX_INDEX,
|
||||
WINED3D_CS_OP_SET_PRIMITIVE_TYPE,
|
||||
@@ -303,6 +305,14 @@ struct wined3d_cs_set_consts_f
|
||||
@@ -318,6 +320,14 @@ struct wined3d_cs_set_consts_f
|
||||
struct wined3d_vec4 constants[1];
|
||||
};
|
||||
|
||||
@ -38,7 +38,7 @@ index 48c101e..ffec875 100644
|
||||
struct wined3d_cs_finish
|
||||
{
|
||||
enum wined3d_cs_op opcode;
|
||||
@@ -982,10 +992,8 @@ static UINT wined3d_cs_exec_transfer_stateblock(struct wined3d_cs *cs, const voi
|
||||
@@ -1129,10 +1139,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 48c101e..ffec875 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));
|
||||
@@ -1002,10 +1010,8 @@ void wined3d_cs_emit_transfer_stateblock(struct wined3d_cs *cs, const struct win
|
||||
@@ -1149,10 +1157,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 48c101e..ffec875 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.
|
||||
@@ -1165,6 +1171,63 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
|
||||
@@ -1334,6 +1340,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 48c101e..ffec875 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_texture_state(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1515,7 +1578,9 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_DESTROY_OBJECT */ wined3d_cs_exec_destroy_object,
|
||||
@@ -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,
|
||||
/* 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 48c101e..ffec875 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 0b8534a..1b2e7e3 100644
|
||||
index 9230bd3..55ae32e 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -2370,7 +2370,7 @@ struct wined3d_sampler * CDECL wined3d_device_get_vs_sampler(const struct wined3
|
||||
@@ -2396,7 +2396,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 0b8534a..1b2e7e3 100644
|
||||
{
|
||||
UINT i;
|
||||
|
||||
@@ -2407,7 +2407,8 @@ HRESULT CDECL wined3d_device_set_vs_consts_b(struct wined3d_device *device,
|
||||
@@ -2433,7 +2433,8 @@ HRESULT CDECL wined3d_device_set_vs_consts_b(struct wined3d_device *device,
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -157,7 +157,7 @@ index 0b8534a..1b2e7e3 100644
|
||||
}
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -2641,7 +2642,8 @@ HRESULT CDECL wined3d_device_set_ps_consts_b(struct wined3d_device *device,
|
||||
@@ -2667,7 +2668,8 @@ HRESULT CDECL wined3d_device_set_ps_consts_b(struct wined3d_device *device,
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -168,10 +168,10 @@ index 0b8534a..1b2e7e3 100644
|
||||
|
||||
return WINED3D_OK;
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 8ad91bc..3e09851 100644
|
||||
index 6741bb5..28a536e 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2430,6 +2430,7 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
|
||||
@@ -2528,6 +2528,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,7 +179,7 @@ index 8ad91bc..3e09851 100644
|
||||
|
||||
static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD state)
|
||||
{
|
||||
@@ -3010,6 +3011,8 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs,
|
||||
@@ -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;
|
||||
@ -189,5 +189,5 @@ index 8ad91bc..3e09851 100644
|
||||
void wined3d_cs_emit_set_base_vertex_index(struct wined3d_cs *cs,
|
||||
UINT base_vertex_index) DECLSPEC_HIDDEN;
|
||||
--
|
||||
2.8.0
|
||||
2.9.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 9087e6cbcc3113c89bb617a7ab9cb0134d6ecd9d Mon Sep 17 00:00:00 2001
|
||||
From dec9faf13d51f50f6e7393490a2634f4482e6ea0 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 af7ec74..00c26b4 100644
|
||||
index 0ca8f23..da077f7 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -64,7 +64,6 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_SET_MATERIAL,
|
||||
@@ -66,7 +66,6 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_RESET_STATE,
|
||||
WINED3D_CS_OP_DESTROY_OBJECT,
|
||||
WINED3D_CS_OP_QUERY_ISSUE,
|
||||
- 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,
|
||||
@@ -74,6 +73,8 @@ enum wined3d_cs_op
|
||||
@@ -76,6 +75,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 af7ec74..00c26b4 100644
|
||||
WINED3D_CS_OP_STOP,
|
||||
};
|
||||
|
||||
@@ -293,12 +294,6 @@ struct wined3d_cs_destroy_object
|
||||
void *object;
|
||||
@@ -308,12 +309,6 @@ struct wined3d_cs_query_issue
|
||||
DWORD flags;
|
||||
};
|
||||
|
||||
-struct wined3d_cs_stateblock
|
||||
@ -43,7 +43,7 @@ index af7ec74..00c26b4 100644
|
||||
struct wined3d_cs_set_consts_f
|
||||
{
|
||||
enum wined3d_cs_op opcode;
|
||||
@@ -340,6 +335,19 @@ struct wined3d_cs_set_primitive_type
|
||||
@@ -355,6 +350,19 @@ struct wined3d_cs_set_primitive_type
|
||||
GLenum gl_primitive_type;
|
||||
};
|
||||
|
||||
@ -63,7 +63,7 @@ index af7ec74..00c26b4 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)
|
||||
{
|
||||
@@ -1128,35 +1136,6 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
|
||||
@@ -1143,35 +1151,6 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -99,7 +99,7 @@ index af7ec74..00c26b4 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;
|
||||
@@ -1739,6 +1718,152 @@ void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs, GLenum primitive_
|
||||
@@ -1798,6 +1777,152 @@ void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs, GLenum primitive_
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -252,15 +252,15 @@ index af7ec74..00c26b4 100644
|
||||
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_FENCE */ wined3d_cs_exec_fence,
|
||||
@@ -1769,7 +1894,6 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_SET_MATERIAL */ wined3d_cs_exec_set_material,
|
||||
@@ -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,
|
||||
/* WINED3D_CS_OP_DESTROY_OBJECT */ wined3d_cs_exec_destroy_object,
|
||||
/* WINED3D_CS_OP_QUERY_ISSUE */ wined3d_cs_exec_query_issue,
|
||||
- /* 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,
|
||||
@@ -1779,6 +1903,8 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -1840,6 +1964,8 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_GLFINISH */ wined3d_cs_exec_glfinish,
|
||||
/* WINED3D_CS_OP_SET_BASE_VERTEX_INDEX */ wined3d_cs_exec_set_base_vertex_index,
|
||||
/* WINED3D_CS_OP_SET_PRIMITIVE_TYPE */ wined3d_cs_exec_set_primitive_type,
|
||||
@ -270,7 +270,7 @@ index af7ec74..00c26b4 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 09cb1ba..4b209d3 100644
|
||||
index 91ab533..caec3e88 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,
|
||||
@ -331,7 +331,7 @@ index 09cb1ba..4b209d3 100644
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
@@ -3514,7 +3499,6 @@ HRESULT CDECL wined3d_device_draw_primitive(struct wined3d_device *device, UINT
|
||||
@@ -3540,7 +3525,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 09cb1ba..4b209d3 100644
|
||||
wined3d_cs_emit_draw(device->cs, 0, start_vertex, vertex_count, 0, 0, FALSE);
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -3543,7 +3527,6 @@ HRESULT CDECL wined3d_device_draw_indexed_primitive(struct wined3d_device *devic
|
||||
@@ -3569,7 +3553,6 @@ HRESULT CDECL wined3d_device_draw_indexed_primitive(struct wined3d_device *devic
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@ -347,7 +347,7 @@ index 09cb1ba..4b209d3 100644
|
||||
wined3d_cs_emit_draw(device->cs, device->state.base_vertex_index, start_idx, index_count, 0, 0, TRUE);
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -3555,7 +3538,6 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device
|
||||
@@ -3581,7 +3564,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 09cb1ba..4b209d3 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 29f9063..bc8eec2 100644
|
||||
index 18f7d78..3069877 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -3026,7 +3026,9 @@ struct wined3d_cs_block
|
||||
@@ -3032,7 +3032,9 @@ struct wined3d_cs_block
|
||||
{
|
||||
struct list entry;
|
||||
UINT pos;
|
||||
@ -370,7 +370,7 @@ index 29f9063..bc8eec2 100644
|
||||
};
|
||||
|
||||
struct wined3d_cs_ops
|
||||
@@ -3072,8 +3074,6 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
|
||||
@@ -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;
|
||||
@ -379,7 +379,7 @@ index 29f9063..bc8eec2 100644
|
||||
void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs,
|
||||
struct wined3d_rendertarget_view *view) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buffer *buffer,
|
||||
@@ -3119,6 +3119,8 @@ void wined3d_cs_emit_set_base_vertex_index(struct wined3d_cs *cs,
|
||||
@@ -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;
|
||||
@ -389,5 +389,5 @@ index 29f9063..bc8eec2 100644
|
||||
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
|
||||
* fixed function semantics as D3DCOLOR or FLOAT16 */
|
||||
--
|
||||
2.8.0
|
||||
2.9.0
|
||||
|
||||
|
@ -1,15 +1,15 @@
|
||||
From d34a6b379ff644f59aa7efa4c33979a8dbff3c49 Mon Sep 17 00:00:00 2001
|
||||
From baa655f9be4d40201483994dfd81fd166ca4484e 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 | 367 ++++++++++++++++++-----------------------
|
||||
dlls/wined3d/cs.c | 369 ++++++++++++++++++-----------------------
|
||||
dlls/wined3d/wined3d_private.h | 20 +--
|
||||
2 files changed, 163 insertions(+), 224 deletions(-)
|
||||
2 files changed, 164 insertions(+), 225 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 5d8e20c..fb5ae07 100644
|
||||
index 0fc98be..10df183 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -22,20 +22,10 @@
|
||||
@ -35,7 +35,7 @@ index 5d8e20c..fb5ae07 100644
|
||||
WINED3D_CS_OP_FENCE,
|
||||
WINED3D_CS_OP_PRESENT,
|
||||
WINED3D_CS_OP_CLEAR,
|
||||
@@ -399,99 +389,30 @@ struct wined3d_cs_texture_unmap
|
||||
@@ -407,99 +397,30 @@ struct wined3d_cs_texture_unmap
|
||||
unsigned int sub_resource_idx;
|
||||
};
|
||||
|
||||
@ -149,7 +149,7 @@ index 5d8e20c..fb5ae07 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_fence(struct wined3d_cs *cs, const void *data)
|
||||
@@ -512,14 +433,14 @@ static void wined3d_cs_emit_fence(struct wined3d_cs *cs, BOOL *signalled)
|
||||
@@ -520,14 +441,14 @@ static void wined3d_cs_emit_fence(struct wined3d_cs *cs, BOOL *signalled)
|
||||
op = cs->ops->require_space(cs, sizeof(*op));
|
||||
op->opcode = WINED3D_CS_OP_FENCE;
|
||||
op->signalled = signalled;
|
||||
@ -166,7 +166,7 @@ index 5d8e20c..fb5ae07 100644
|
||||
|
||||
/* A busy wait should be fine, we're not supposed to have to wait very
|
||||
* long. */
|
||||
@@ -572,7 +493,7 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
|
||||
@@ -580,7 +501,7 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
|
||||
|
||||
pending = InterlockedIncrement(&cs->pending_presents);
|
||||
|
||||
@ -175,7 +175,7 @@ index 5d8e20c..fb5ae07 100644
|
||||
|
||||
while (pending > 1)
|
||||
pending = InterlockedCompareExchange(&cs->pending_presents, 0, 0);
|
||||
@@ -614,8 +535,8 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
@@ -622,8 +543,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 5d8e20c..fb5ae07 100644
|
||||
op->opcode = WINED3D_CS_OP_CLEAR;
|
||||
op->flags = flags;
|
||||
op->color = *color;
|
||||
@@ -635,7 +556,7 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
@@ -643,7 +564,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 5d8e20c..fb5ae07 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
|
||||
@@ -776,7 +697,7 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned i
|
||||
@@ -784,7 +705,7 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned i
|
||||
}
|
||||
}
|
||||
|
||||
@ -204,7 +204,7 @@ index 5d8e20c..fb5ae07 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_predication(struct wined3d_cs *cs, const void *data)
|
||||
@@ -798,7 +719,7 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query
|
||||
@@ -806,7 +727,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 5d8e20c..fb5ae07 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_viewport(struct wined3d_cs *cs, const void *data)
|
||||
@@ -819,7 +740,7 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
|
||||
@@ -827,7 +748,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 5d8e20c..fb5ae07 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_scissor_rect(struct wined3d_cs *cs, const void *data)
|
||||
@@ -840,7 +761,7 @@ void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
|
||||
@@ -848,7 +769,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 5d8e20c..fb5ae07 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_rendertarget_view(struct wined3d_cs *cs, const void *data)
|
||||
@@ -863,7 +784,7 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
|
||||
@@ -871,7 +792,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 5d8e20c..fb5ae07 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const void *data)
|
||||
@@ -917,7 +838,7 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3
|
||||
@@ -925,7 +846,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 5d8e20c..fb5ae07 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_vertex_declaration(struct wined3d_cs *cs, const void *data)
|
||||
@@ -938,7 +859,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
|
||||
@@ -946,7 +867,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 5d8e20c..fb5ae07 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_stream_source(struct wined3d_cs *cs, const void *data)
|
||||
@@ -975,7 +896,7 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -983,7 +904,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 5d8e20c..fb5ae07 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_stream_source_freq(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1002,7 +923,7 @@ void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_i
|
||||
@@ -1010,7 +931,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 5d8e20c..fb5ae07 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_stream_output(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1035,7 +956,7 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -1043,7 +964,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 5d8e20c..fb5ae07 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_index_buffer(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1069,7 +990,7 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
|
||||
@@ -1077,7 +998,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 5d8e20c..fb5ae07 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_constant_buffer(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1100,7 +1021,7 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
|
||||
@@ -1108,7 +1029,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 5d8e20c..fb5ae07 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_texture(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1192,7 +1113,7 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
|
||||
@@ -1200,7 +1121,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 5d8e20c..fb5ae07 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_shader_resource_view(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1216,7 +1137,7 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
|
||||
@@ -1224,7 +1145,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 5d8e20c..fb5ae07 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_sampler(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1240,7 +1161,7 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
@@ -1248,7 +1169,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 5d8e20c..fb5ae07 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_shader(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1263,7 +1184,7 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
@@ -1271,7 +1192,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 5d8e20c..fb5ae07 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_rasterizer_state(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1285,7 +1206,7 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
|
||||
@@ -1293,7 +1214,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 5d8e20c..fb5ae07 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_vs_consts_f(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1318,8 +1239,9 @@ void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
@@ -1326,8 +1247,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 5d8e20c..fb5ae07 100644
|
||||
switch (type)
|
||||
{
|
||||
case WINED3D_SHADER_TYPE_PIXEL:
|
||||
@@ -1344,7 +1266,7 @@ void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
@@ -1352,7 +1274,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 5d8e20c..fb5ae07 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_render_state(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1366,8 +1288,8 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
|
||||
@@ -1374,8 +1296,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 5d8e20c..fb5ae07 100644
|
||||
|
||||
static UINT wined3d_cs_exec_set_vs_consts_b(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
@@ -1397,8 +1319,9 @@ void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
@@ -1405,8 +1327,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 5d8e20c..fb5ae07 100644
|
||||
switch (type)
|
||||
{
|
||||
case WINED3D_SHADER_TYPE_PIXEL:
|
||||
@@ -1423,7 +1346,7 @@ void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
@@ -1431,7 +1354,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 5d8e20c..fb5ae07 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_vs_consts_i(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1454,8 +1377,9 @@ void wined3d_cs_emit_set_consts_i(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
@@ -1462,8 +1385,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 5d8e20c..fb5ae07 100644
|
||||
switch (type)
|
||||
{
|
||||
case WINED3D_SHADER_TYPE_PIXEL:
|
||||
@@ -1480,7 +1404,7 @@ void wined3d_cs_emit_set_consts_i(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
@@ -1488,7 +1412,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 5d8e20c..fb5ae07 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_texture_state(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1504,7 +1428,7 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
|
||||
@@ -1512,7 +1436,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 5d8e20c..fb5ae07 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_sampler_state(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1528,7 +1452,7 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
|
||||
@@ -1536,7 +1460,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 5d8e20c..fb5ae07 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_transform(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1552,7 +1476,7 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
|
||||
@@ -1560,7 +1484,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 5d8e20c..fb5ae07 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_clip_plane(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1574,7 +1498,7 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
|
||||
@@ -1582,7 +1506,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 5d8e20c..fb5ae07 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1659,7 +1583,7 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
|
||||
@@ -1667,7 +1591,7 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
|
||||
else
|
||||
op->set = 0;
|
||||
|
||||
@ -464,7 +464,7 @@ index 5d8e20c..fb5ae07 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_material(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1680,7 +1604,7 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
|
||||
@@ -1688,7 +1612,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 5d8e20c..fb5ae07 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1704,7 +1628,7 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
@@ -1712,7 +1636,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,16 +482,25 @@ index 5d8e20c..fb5ae07 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_destroy_object(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1725,7 +1649,7 @@ void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs, void (*callback)(void
|
||||
@@ -1733,7 +1657,7 @@ void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs, void (*callback)(void
|
||||
op->callback = callback;
|
||||
op->object = object;
|
||||
|
||||
- cs->ops->submit(cs);
|
||||
+ cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
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
|
||||
op->query = query;
|
||||
op->flags = flags;
|
||||
|
||||
- cs->ops->submit(cs);
|
||||
+ cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_glfinish(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1751,7 +1675,7 @@ void wined3d_cs_emit_glfinish(struct wined3d_cs *cs)
|
||||
@@ -1781,7 +1705,7 @@ void wined3d_cs_emit_glfinish(struct wined3d_cs *cs)
|
||||
op = cs->ops->require_space(cs, sizeof(*op));
|
||||
op->opcode = WINED3D_CS_OP_GLFINISH;
|
||||
|
||||
@ -500,7 +509,7 @@ index 5d8e20c..fb5ae07 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_base_vertex_index(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1773,7 +1697,7 @@ void wined3d_cs_emit_set_base_vertex_index(struct wined3d_cs *cs,
|
||||
@@ -1803,7 +1727,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;
|
||||
|
||||
@ -509,7 +518,7 @@ index 5d8e20c..fb5ae07 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_primitive_type(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1799,7 +1723,7 @@ void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs, GLenum primitive_
|
||||
@@ -1829,7 +1753,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;
|
||||
|
||||
@ -518,7 +527,7 @@ index 5d8e20c..fb5ae07 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_light(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1856,7 +1780,7 @@ void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light
|
||||
@@ -1886,7 +1810,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;
|
||||
|
||||
@ -527,7 +536,7 @@ index 5d8e20c..fb5ae07 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_light_enable(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1945,7 +1869,7 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, UINT idx, BOOL enab
|
||||
@@ -1975,7 +1899,7 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, UINT idx, BOOL enab
|
||||
op->idx = idx;
|
||||
op->enable = enable;
|
||||
|
||||
@ -536,7 +545,7 @@ index 5d8e20c..fb5ae07 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_blt(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1977,7 +1901,7 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
|
||||
@@ -2007,7 +1931,7 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
|
||||
if (fx)
|
||||
op->fx = *fx;
|
||||
|
||||
@ -545,7 +554,7 @@ index 5d8e20c..fb5ae07 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_clear_rtv(struct wined3d_cs *cs, const void *data)
|
||||
@@ -2010,7 +1934,7 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
|
||||
@@ -2040,7 +1964,7 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
|
||||
op->stencil = stencil;
|
||||
op->blitter = blitter;
|
||||
|
||||
@ -554,7 +563,7 @@ index 5d8e20c..fb5ae07 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_texture_map(struct wined3d_cs *cs, const void *data)
|
||||
@@ -2035,12 +1959,14 @@ void *wined3d_cs_emit_texture_map(struct wined3d_cs *cs, struct wined3d_texture
|
||||
@@ -2065,12 +1989,14 @@ void *wined3d_cs_emit_texture_map(struct wined3d_cs *cs, struct wined3d_texture
|
||||
op->flags = flags;
|
||||
op->mem = &ret;
|
||||
|
||||
@ -570,7 +579,7 @@ index 5d8e20c..fb5ae07 100644
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -2063,11 +1989,13 @@ void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture
|
||||
@@ -2093,11 +2019,13 @@ void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture
|
||||
op->texture = texture;
|
||||
op->sub_resource_idx = sub_resource_idx;
|
||||
|
||||
@ -585,7 +594,7 @@ index 5d8e20c..fb5ae07 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,
|
||||
@@ -2114,42 +2042,59 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -2145,42 +2073,59 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_TEXTURE_UNMAP */ wined3d_cs_exec_texture_unmap,
|
||||
};
|
||||
|
||||
@ -668,7 +677,7 @@ index 5d8e20c..fb5ae07 100644
|
||||
};
|
||||
|
||||
/* FIXME: wined3d_device_uninit_3d() should either flush and wait, or be an
|
||||
@@ -2161,9 +2106,38 @@ static void wined3d_cs_emit_stop(struct wined3d_cs *cs)
|
||||
@@ -2192,9 +2137,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;
|
||||
|
||||
@ -708,7 +717,7 @@ index 5d8e20c..fb5ae07 100644
|
||||
void wined3d_cs_switch_onscreen_ds(struct wined3d_cs *cs,
|
||||
struct wined3d_context *context, struct wined3d_surface *depth_stencil)
|
||||
{
|
||||
@@ -2187,31 +2161,32 @@ void wined3d_cs_switch_onscreen_ds(struct wined3d_cs *cs,
|
||||
@@ -2218,31 +2192,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;
|
||||
@ -755,7 +764,7 @@ index 5d8e20c..fb5ae07 100644
|
||||
}
|
||||
|
||||
done:
|
||||
@@ -2236,25 +2211,10 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
@@ -2267,25 +2242,10 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
cs->ops = &wined3d_cs_st_ops;
|
||||
cs->device = device;
|
||||
|
||||
@ -781,7 +790,7 @@ index 5d8e20c..fb5ae07 100644
|
||||
if (!(cs->thread = CreateThread(NULL, 0, wined3d_cs_run, cs, 0, NULL)))
|
||||
{
|
||||
ERR("Failed to create wined3d command stream thread.\n");
|
||||
@@ -2266,12 +2226,7 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
@@ -2297,12 +2257,7 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
|
||||
err:
|
||||
if (cs)
|
||||
@ -794,7 +803,7 @@ index 5d8e20c..fb5ae07 100644
|
||||
HeapFree(GetProcessHeap(), 0, cs);
|
||||
return NULL;
|
||||
}
|
||||
@@ -2290,17 +2245,7 @@ void wined3d_cs_destroy(struct wined3d_cs *cs)
|
||||
@@ -2321,17 +2276,7 @@ void wined3d_cs_destroy(struct wined3d_cs *cs)
|
||||
CloseHandle(cs->thread);
|
||||
if (ret != WAIT_OBJECT_0)
|
||||
ERR("Wait failed (%#x).\n", ret);
|
||||
@ -813,7 +822,7 @@ index 5d8e20c..fb5ae07 100644
|
||||
HeapFree(GetProcessHeap(), 0, cs);
|
||||
}
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index b8553ec..86de475 100644
|
||||
index 135caad..34a00b1 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -31,6 +31,7 @@
|
||||
@ -824,7 +833,7 @@ index b8553ec..86de475 100644
|
||||
#include <stdarg.h>
|
||||
#include <math.h>
|
||||
#include <limits.h>
|
||||
@@ -3040,19 +3041,17 @@ struct wined3d_cs_list
|
||||
@@ -3035,19 +3036,17 @@ struct wined3d_cs_list
|
||||
struct list blocks;
|
||||
};
|
||||
|
||||
@ -849,7 +858,7 @@ index b8553ec..86de475 100644
|
||||
void (*finish)(struct wined3d_cs *cs);
|
||||
};
|
||||
|
||||
@@ -3063,14 +3062,9 @@ struct wined3d_cs
|
||||
@@ -3058,14 +3057,9 @@ struct wined3d_cs
|
||||
struct wined3d_state state;
|
||||
HANDLE thread;
|
||||
DWORD thread_id;
|
||||
@ -866,5 +875,5 @@ index b8553ec..86de475 100644
|
||||
LONG pending_presents;
|
||||
};
|
||||
--
|
||||
2.8.0
|
||||
2.9.0
|
||||
|
||||
|
@ -1,38 +1,30 @@
|
||||
From 277335bfb1e48eead7bbe911657e9258f15fb794 Mon Sep 17 00:00:00 2001
|
||||
From a3f8b91880e4b0ea4a8a8a9dcb6cba9f05bc795b 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
|
||||
|
||||
---
|
||||
dlls/wined3d/cs.c | 66 ++++++++++++++++++++++++++++++++++++++++++
|
||||
dlls/wined3d/query.c | 17 +++++++----
|
||||
dlls/wined3d/wined3d_private.h | 4 +++
|
||||
3 files changed, 82 insertions(+), 5 deletions(-)
|
||||
dlls/wined3d/cs.c | 36 ++++++++++++++++++++++++++++++++++++
|
||||
dlls/wined3d/query.c | 15 +++++++++++----
|
||||
dlls/wined3d/wined3d_private.h | 2 ++
|
||||
3 files changed, 49 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index fb5ae07..90bb9f2 100644
|
||||
index 10df183..1c79290 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -70,6 +70,8 @@ enum wined3d_cs_op
|
||||
@@ -71,6 +71,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_CLEAR_RTV,
|
||||
WINED3D_CS_OP_TEXTURE_MAP,
|
||||
WINED3D_CS_OP_TEXTURE_UNMAP,
|
||||
+ WINED3D_CS_OP_QUERY_ISSUE,
|
||||
+ WINED3D_CS_OP_QUERY_POLL,
|
||||
WINED3D_CS_OP_STOP,
|
||||
};
|
||||
|
||||
@@ -395,6 +397,20 @@ struct wined3d_cs_skip
|
||||
@@ -403,6 +404,13 @@ struct wined3d_cs_skip
|
||||
DWORD size;
|
||||
};
|
||||
|
||||
+struct wined3d_cs_query_issue
|
||||
+{
|
||||
+ enum wined3d_cs_op opcode;
|
||||
+ struct wined3d_query *query;
|
||||
+ DWORD flags;
|
||||
+};
|
||||
+
|
||||
+struct wined3d_cs_query_poll
|
||||
+{
|
||||
+ enum wined3d_cs_op opcode;
|
||||
@ -43,31 +35,10 @@ index fb5ae07..90bb9f2 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);
|
||||
@@ -1992,6 +2008,54 @@ void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture
|
||||
@@ -2022,6 +2030,33 @@ void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
+static UINT wined3d_cs_exec_query_issue(struct wined3d_cs *cs, const void *data)
|
||||
+{
|
||||
+ const struct wined3d_cs_query_issue *op = data;
|
||||
+
|
||||
+ op->query->query_ops->query_issue(op->query, op->flags);
|
||||
+
|
||||
+ return sizeof(*op);
|
||||
+}
|
||||
+
|
||||
+void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *query, DWORD flags)
|
||||
+{
|
||||
+ struct wined3d_cs_query_issue *op;
|
||||
+
|
||||
+ op = cs->ops->require_space(cs, sizeof(*op));
|
||||
+ op->opcode = WINED3D_CS_OP_QUERY_ISSUE;
|
||||
+ op->query = query;
|
||||
+ op->flags = flags;
|
||||
+
|
||||
+ cs->ops->submit(cs, sizeof(*op));
|
||||
+}
|
||||
+
|
||||
+static UINT wined3d_cs_exec_query_poll(struct wined3d_cs *cs, const void *data)
|
||||
+{
|
||||
+ const struct wined3d_cs_query_poll *op = data;
|
||||
@ -98,17 +69,16 @@ index fb5ae07..90bb9f2 100644
|
||||
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
|
||||
@@ -2040,6 +2104,8 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -2071,6 +2106,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,
|
||||
+ /* WINED3D_CS_OP_QUERY_ISSUE */ wined3d_cs_exec_query_issue,
|
||||
+ /* WINED3D_CS_OP_QUERY_POLL */ wined3d_cs_exec_query_poll,
|
||||
};
|
||||
|
||||
static void *wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size)
|
||||
diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
|
||||
index 3bcf6f0..048a0cf 100644
|
||||
index 8b15765..c64e5fb 100644
|
||||
--- a/dlls/wined3d/query.c
|
||||
+++ b/dlls/wined3d/query.c
|
||||
@@ -338,8 +338,13 @@ HRESULT CDECL wined3d_query_get_data(struct wined3d_query *query,
|
||||
@ -127,15 +97,6 @@ index 3bcf6f0..048a0cf 100644
|
||||
|
||||
if (data)
|
||||
memcpy(data, query->data, min(data_size, query->data_size));
|
||||
@@ -358,7 +363,7 @@ HRESULT CDECL wined3d_query_issue(struct wined3d_query *query, DWORD flags)
|
||||
{
|
||||
TRACE("query %p, flags %#x.\n", query, flags);
|
||||
|
||||
- query->query_ops->query_issue(query, flags);
|
||||
+ wined3d_cs_emit_query_issue(query->device->cs, query, flags);
|
||||
|
||||
if (flags & WINED3DISSUE_BEGIN)
|
||||
query->state = QUERY_BUILDING;
|
||||
@@ -479,7 +484,7 @@ static void wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DWORD
|
||||
* restart. */
|
||||
if (flags & WINED3DISSUE_BEGIN)
|
||||
@ -170,7 +131,7 @@ index 3bcf6f0..048a0cf 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 5b44182..9c4ed1e 100644
|
||||
index 34a00b1..c0c5b38 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -1437,6 +1437,7 @@ struct wined3d_occlusion_query
|
||||
@ -181,12 +142,10 @@ index 5b44182..9c4ed1e 100644
|
||||
};
|
||||
|
||||
struct wined3d_timestamp_query
|
||||
@@ -3151,6 +3152,9 @@ void *wined3d_cs_emit_texture_map(struct wined3d_cs *cs, struct wined3d_texture
|
||||
@@ -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;
|
||||
+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
|
||||
|
@ -1,34 +1,30 @@
|
||||
From 84e3897a8d1dc4f1925979a2d876609735a0ef4d Mon Sep 17 00:00:00 2001
|
||||
From 4cff677153ca4c20bf4864281f5feb45eba8887b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Sat, 6 Jul 2013 18:31:41 +0200
|
||||
Subject: wined3d: Check our CS state to find out if a query is done
|
||||
|
||||
---
|
||||
dlls/wined3d/cs.c | 6 +++++-
|
||||
dlls/wined3d/cs.c | 3 +++
|
||||
dlls/wined3d/query.c | 9 +++++++++
|
||||
dlls/wined3d/wined3d_private.h | 1 +
|
||||
3 files changed, 15 insertions(+), 1 deletion(-)
|
||||
3 files changed, 13 insertions(+)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 90bb9f2..f51656c 100644
|
||||
index 1c79290..2952104 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -2011,8 +2011,12 @@ void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture
|
||||
static UINT wined3d_cs_exec_query_issue(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
const struct wined3d_cs_query_issue *op = data;
|
||||
+ struct wined3d_query *query = op->query;
|
||||
+
|
||||
+ query->query_ops->query_issue(query, op->flags);
|
||||
@@ -1675,6 +1675,9 @@ static UINT wined3d_cs_exec_query_issue(struct wined3d_cs *cs, const void *data)
|
||||
|
||||
query->query_ops->query_issue(query, op->flags);
|
||||
|
||||
- op->query->query_ops->query_issue(op->query, op->flags);
|
||||
+ if (op->flags & WINED3DISSUE_END)
|
||||
+ InterlockedIncrement(&query->counter_worker);
|
||||
|
||||
+
|
||||
return sizeof(*op);
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
|
||||
index 048a0cf..64dd14b 100644
|
||||
index c64e5fb..99a1411 100644
|
||||
--- a/dlls/wined3d/query.c
|
||||
+++ b/dlls/wined3d/query.c
|
||||
@@ -330,6 +330,12 @@ HRESULT CDECL wined3d_query_get_data(struct wined3d_query *query,
|
||||
@ -55,7 +51,7 @@ index 048a0cf..64dd14b 100644
|
||||
|
||||
if (flags & WINED3DISSUE_BEGIN)
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 9c4ed1e..a641df3 100644
|
||||
index c0c5b38..a10b30f 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -1396,6 +1396,7 @@ struct wined3d_query
|
||||
|
@ -1,4 +1,4 @@
|
||||
From e3d2b6d94063c692ebc130fdb29b518c97b5ef26 Mon Sep 17 00:00:00 2001
|
||||
From 1bea1e621c0fb6b91af41755e847f90cf438168b 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,19 +10,19 @@ Subject: wined3d: Poll queries automatically in the CS
|
||||
3 files changed, 54 insertions(+), 49 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index f51656c..b8a4a45 100644
|
||||
index 2952104..f7ffc1c 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -71,7 +71,6 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_CLEAR_RTV,
|
||||
WINED3D_CS_OP_TEXTURE_MAP,
|
||||
WINED3D_CS_OP_TEXTURE_UNMAP,
|
||||
WINED3D_CS_OP_QUERY_ISSUE,
|
||||
- WINED3D_CS_OP_QUERY_POLL,
|
||||
WINED3D_CS_OP_STOP,
|
||||
};
|
||||
|
||||
@@ -404,13 +403,6 @@ struct wined3d_cs_query_issue
|
||||
DWORD flags;
|
||||
@@ -404,13 +403,6 @@ struct wined3d_cs_skip
|
||||
DWORD size;
|
||||
};
|
||||
|
||||
-struct wined3d_cs_query_poll
|
||||
@ -35,7 +35,7 @@ index f51656c..b8a4a45 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);
|
||||
@@ -2015,8 +2007,9 @@ static UINT wined3d_cs_exec_query_issue(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1675,8 +1667,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 f51656c..b8a4a45 100644
|
||||
|
||||
return sizeof(*op);
|
||||
}
|
||||
@@ -2033,33 +2026,6 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
|
||||
@@ -2033,33 +2026,6 @@ void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@ -82,9 +82,9 @@ index f51656c..b8a4a45 100644
|
||||
{
|
||||
/* 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
|
||||
/* 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,
|
||||
/* WINED3D_CS_OP_QUERY_ISSUE */ wined3d_cs_exec_query_issue,
|
||||
- /* WINED3D_CS_OP_QUERY_POLL */ wined3d_cs_exec_query_poll,
|
||||
};
|
||||
|
||||
@ -136,7 +136,7 @@ index f51656c..b8a4a45 100644
|
||||
{
|
||||
continue;
|
||||
diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
|
||||
index 6a192c6..4996da9 100644
|
||||
index 99a1411..4048714 100644
|
||||
--- a/dlls/wined3d/query.c
|
||||
+++ b/dlls/wined3d/query.c
|
||||
@@ -37,6 +37,7 @@ static void wined3d_query_init(struct wined3d_query *query, struct wined3d_devic
|
||||
@ -203,7 +203,7 @@ index 6a192c6..4996da9 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 e7f2974..9edaa41 100644
|
||||
index a10b30f..5e45522 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -1396,7 +1396,8 @@ struct wined3d_query
|
||||
@ -216,7 +216,7 @@ index e7f2974..9edaa41 100644
|
||||
};
|
||||
|
||||
union wined3d_gl_query_object
|
||||
@@ -3070,6 +3071,7 @@ struct wined3d_cs
|
||||
@@ -3064,6 +3065,7 @@ struct wined3d_cs
|
||||
struct wined3d_cs_queue queue;
|
||||
|
||||
LONG pending_presents;
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 829a888c3e0d2790188ceb7d4412dce94512a6d6 Mon Sep 17 00:00:00 2001
|
||||
From 4709b7d806166b472356abb9776d80ba432bf012 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:03 +0200
|
||||
Subject: wined3d: Introduce a separate queue for priority commands
|
||||
@ -9,11 +9,11 @@ Subject: wined3d: Introduce a separate queue for priority commands
|
||||
2 files changed, 110 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index d721534..03ad89d 100644
|
||||
index f7ffc1c..5b829ba 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -383,7 +383,7 @@ struct wined3d_cs_query_issue
|
||||
DWORD flags;
|
||||
@@ -403,7 +403,7 @@ struct wined3d_cs_skip
|
||||
DWORD size;
|
||||
};
|
||||
|
||||
-static void wined3d_cs_submit(struct wined3d_cs *cs, size_t size)
|
||||
@ -21,7 +21,7 @@ index d721534..03ad89d 100644
|
||||
{
|
||||
LONG new_val = (cs->queue.head + size) & (WINED3D_CS_QUEUE_SIZE - 1);
|
||||
/* There is only one thread writing to queue.head, InterlockedExchange
|
||||
@@ -391,6 +391,14 @@ static void wined3d_cs_submit(struct wined3d_cs *cs, size_t size)
|
||||
@@ -411,6 +411,14 @@ static void wined3d_cs_submit(struct wined3d_cs *cs, size_t size)
|
||||
InterlockedExchange(&cs->queue.head, new_val);
|
||||
}
|
||||
|
||||
@ -36,7 +36,7 @@ index d721534..03ad89d 100644
|
||||
static UINT wined3d_cs_exec_nop(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
return sizeof(enum wined3d_cs_op);
|
||||
@@ -424,15 +432,16 @@ static void wined3d_cs_emit_fence(struct wined3d_cs *cs, BOOL *signalled)
|
||||
@@ -444,15 +452,16 @@ static void wined3d_cs_emit_fence(struct wined3d_cs *cs, BOOL *signalled)
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@ -59,8 +59,8 @@ index d721534..03ad89d 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_present(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1875,9 +1884,9 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_QUERY_ISSUE */ wined3d_cs_exec_query_issue,
|
||||
@@ -2077,9 +2086,9 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_TEXTURE_UNMAP */ wined3d_cs_exec_texture_unmap,
|
||||
};
|
||||
|
||||
-static void *wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size)
|
||||
@ -71,7 +71,7 @@ index d721534..03ad89d 100644
|
||||
size_t queue_size = sizeof(queue->data) / sizeof(*queue->data);
|
||||
|
||||
if (queue_size - size < queue->head)
|
||||
@@ -1885,7 +1894,7 @@ static void *wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size)
|
||||
@@ -2087,7 +2096,7 @@ static void *wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size)
|
||||
struct wined3d_cs_skip *skip;
|
||||
size_t nop_size = queue_size - queue->head;
|
||||
|
||||
@ -80,7 +80,7 @@ index d721534..03ad89d 100644
|
||||
if (nop_size < sizeof(*skip))
|
||||
{
|
||||
skip->opcode = WINED3D_CS_OP_NOP;
|
||||
@@ -1896,7 +1905,11 @@ static void *wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size)
|
||||
@@ -2098,7 +2107,11 @@ static void *wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size)
|
||||
skip->size = nop_size;
|
||||
}
|
||||
|
||||
@ -93,7 +93,7 @@ index d721534..03ad89d 100644
|
||||
assert(!queue->head);
|
||||
}
|
||||
|
||||
@@ -1923,12 +1936,15 @@ static void *wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size)
|
||||
@@ -2125,12 +2138,15 @@ static void *wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size)
|
||||
return &queue->data[queue->head];
|
||||
}
|
||||
|
||||
@ -114,7 +114,7 @@ index d721534..03ad89d 100644
|
||||
|
||||
/* FIXME: wined3d_device_uninit_3d() should either flush and wait, or be an
|
||||
* OP itself. */
|
||||
@@ -1939,9 +1955,63 @@ static void wined3d_cs_emit_stop(struct wined3d_cs *cs)
|
||||
@@ -2141,9 +2157,63 @@ 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;
|
||||
|
||||
@ -179,7 +179,7 @@ index d721534..03ad89d 100644
|
||||
static void wined3d_cs_st_submit(struct wined3d_cs *cs, size_t size)
|
||||
{
|
||||
enum wined3d_cs_op opcode = *(const enum wined3d_cs_op *)&cs->queue.data;
|
||||
@@ -1967,8 +2037,11 @@ static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
|
||||
@@ -2169,8 +2239,11 @@ static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
|
||||
static const struct wined3d_cs_ops wined3d_cs_st_ops =
|
||||
{
|
||||
wined3d_cs_st_require_space,
|
||||
@ -191,7 +191,7 @@ index d721534..03ad89d 100644
|
||||
};
|
||||
|
||||
void wined3d_cs_switch_onscreen_ds(struct wined3d_cs *cs,
|
||||
@@ -2015,6 +2088,7 @@ static DWORD WINAPI wined3d_cs_run(void *thread_param)
|
||||
@@ -2217,6 +2290,7 @@ static DWORD WINAPI wined3d_cs_run(void *thread_param)
|
||||
enum wined3d_cs_op opcode;
|
||||
LONG tail;
|
||||
char poll = 0;
|
||||
@ -199,7 +199,7 @@ index d721534..03ad89d 100644
|
||||
|
||||
TRACE("Started.\n");
|
||||
|
||||
@@ -2030,13 +2104,23 @@ static DWORD WINAPI wined3d_cs_run(void *thread_param)
|
||||
@@ -2232,13 +2306,23 @@ static DWORD WINAPI wined3d_cs_run(void *thread_param)
|
||||
else
|
||||
poll++;
|
||||
|
||||
@ -226,7 +226,7 @@ index d721534..03ad89d 100644
|
||||
|
||||
if (opcode >= WINED3D_CS_OP_STOP)
|
||||
{
|
||||
@@ -2045,9 +2129,9 @@ static DWORD WINAPI wined3d_cs_run(void *thread_param)
|
||||
@@ -2247,9 +2331,9 @@ static DWORD WINAPI wined3d_cs_run(void *thread_param)
|
||||
goto done;
|
||||
}
|
||||
|
||||
@ -239,10 +239,10 @@ index d721534..03ad89d 100644
|
||||
|
||||
done:
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index f7b3d0a..9efcd14 100644
|
||||
index 5e45522..05eaeb8 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2884,8 +2884,11 @@ struct wined3d_cs_queue
|
||||
@@ -3049,8 +3049,11 @@ struct wined3d_cs_queue
|
||||
struct wined3d_cs_ops
|
||||
{
|
||||
void *(*require_space)(struct wined3d_cs *cs, size_t size);
|
||||
@ -254,7 +254,7 @@ index f7b3d0a..9efcd14 100644
|
||||
};
|
||||
|
||||
struct wined3d_cs
|
||||
@@ -2897,7 +2900,7 @@ struct wined3d_cs
|
||||
@@ -3062,7 +3065,7 @@ struct wined3d_cs
|
||||
DWORD thread_id;
|
||||
struct wined3d_surface *onscreen_depth_stencil;
|
||||
|
||||
@ -264,5 +264,5 @@ index f7b3d0a..9efcd14 100644
|
||||
LONG pending_presents;
|
||||
struct list query_poll_list;
|
||||
--
|
||||
2.8.0
|
||||
2.9.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 5c74973f7c5ec68fbde36808b55771c81133b670 Mon Sep 17 00:00:00 2001
|
||||
From 48c046442f6e2ace49692a725e0b1ad2e67794d3 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Wed, 24 Jul 2013 17:27:35 +0200
|
||||
Subject: wined3d: Don't poll queries that failed to start
|
||||
@ -28,7 +28,7 @@ index fb55549..105cf45 100644
|
||||
list_add_tail(&cs->query_poll_list, &query->poll_list_entry);
|
||||
|
||||
diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
|
||||
index aa0973f..c7814a0 100644
|
||||
index b5e1fde..164a60e 100644
|
||||
--- a/dlls/wined3d/query.c
|
||||
+++ b/dlls/wined3d/query.c
|
||||
@@ -465,7 +465,7 @@ enum wined3d_query_type CDECL wined3d_query_get_type(const struct wined3d_query
|
||||
@ -84,7 +84,7 @@ index aa0973f..c7814a0 100644
|
||||
+static BOOL wined3d_timestamp_query_ops_issue(struct wined3d_query *query, DWORD flags)
|
||||
{
|
||||
struct wined3d_timestamp_query *tq = wined3d_timestamp_query_from_query(query);
|
||||
struct wined3d_device *device = query->device;
|
||||
const struct wined3d_gl_info *gl_info;
|
||||
@@ -613,6 +619,10 @@ static void wined3d_timestamp_query_ops_issue(struct wined3d_query *query, DWORD
|
||||
checkGLcall("glQueryCounter()");
|
||||
context_release(context);
|
||||
@ -133,7 +133,7 @@ index aa0973f..c7814a0 100644
|
||||
|
||||
static const struct wined3d_query_ops event_query_ops =
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 8a04b4c..20ea5a8 100644
|
||||
index 0da5480..0abb30b 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -1382,7 +1382,7 @@ enum wined3d_query_state
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 4e9e48376defff77261a0ae433694fc848b764b8 Mon Sep 17 00:00:00 2001
|
||||
From 71ed3d8f5da5ad95d6fe19222d2e2329cd942482 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Thu, 1 Aug 2013 00:10:40 +0200
|
||||
Subject: wined3d: Send texture preloads through the CS
|
||||
@ -10,19 +10,19 @@ Subject: wined3d: Send texture preloads through the CS
|
||||
3 files changed, 35 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 7b91220..811c4b7 100644
|
||||
index a1a9a2a..b056e22 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -71,6 +71,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_CLEAR_RTV,
|
||||
WINED3D_CS_OP_TEXTURE_MAP,
|
||||
WINED3D_CS_OP_TEXTURE_UNMAP,
|
||||
WINED3D_CS_OP_QUERY_ISSUE,
|
||||
+ WINED3D_CS_OP_TEXTURE_PRELOAD,
|
||||
WINED3D_CS_OP_STOP,
|
||||
};
|
||||
|
||||
@@ -403,6 +404,12 @@ struct wined3d_cs_query_issue
|
||||
DWORD flags;
|
||||
@@ -403,6 +404,12 @@ struct wined3d_cs_skip
|
||||
DWORD size;
|
||||
};
|
||||
|
||||
+struct wined3d_cs_texture_preload
|
||||
@ -34,7 +34,7 @@ index 7b91220..811c4b7 100644
|
||||
static void wined3d_cs_mt_submit(struct wined3d_cs *cs, size_t size)
|
||||
{
|
||||
LONG new_val = (cs->queue.head + size) & (WINED3D_CS_QUEUE_SIZE - 1);
|
||||
@@ -2059,6 +2066,30 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
|
||||
@@ -2059,6 +2066,30 @@ void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@ -66,15 +66,15 @@ index 7b91220..811c4b7 100644
|
||||
{
|
||||
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
|
||||
@@ -2108,6 +2139,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,
|
||||
/* WINED3D_CS_OP_QUERY_ISSUE */ wined3d_cs_exec_query_issue,
|
||||
+ /* WINED3D_CS_OP_TEXTURE_PRELOAD */ wined3d_cs_exec_texture_preload,
|
||||
};
|
||||
|
||||
static inline void *_wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size, BOOL prio)
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index e19484b..687799d 100644
|
||||
index 2b51935..a472b3e 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -920,10 +920,8 @@ void wined3d_texture_load(struct wined3d_texture *texture,
|
||||
@ -91,12 +91,12 @@ index e19484b..687799d 100644
|
||||
|
||||
void * CDECL wined3d_texture_get_parent(const struct wined3d_texture *texture)
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 20ea5a8..66fd4ae 100644
|
||||
index c49283e..7c632c9 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -3161,6 +3161,7 @@ void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture
|
||||
void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *query,
|
||||
DWORD flags) DECLSPEC_HIDDEN;
|
||||
@@ -3153,6 +3153,7 @@ void *wined3d_cs_emit_texture_map(struct wined3d_cs *cs, struct wined3d_texture
|
||||
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_query_poll(struct wined3d_cs *cs, struct wined3d_query *query, BOOL *ret) DECLSPEC_HIDDEN;
|
||||
+void wined3d_cs_emit_texture_preload(struct wined3d_cs *cs, struct wined3d_texture *texture) DECLSPEC_HIDDEN;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From e98df687ff8ca219bc6518a82f120b0fe856f9c7 Mon Sep 17 00:00:00 2001
|
||||
From 49c421c543e672fb83aaf887a51cabd52a9dd13b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Thu, 1 Aug 2013 00:33:48 +0200
|
||||
Subject: wined3d: Send update_texture calls through the CS
|
||||
@ -11,12 +11,12 @@ FIXME: This logic duplication is ugly.
|
||||
3 files changed, 137 insertions(+), 82 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 811c4b7..2cb9ad7 100644
|
||||
index b056e22..4611f41 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -72,6 +72,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_TEXTURE_MAP,
|
||||
WINED3D_CS_OP_TEXTURE_UNMAP,
|
||||
WINED3D_CS_OP_QUERY_ISSUE,
|
||||
WINED3D_CS_OP_TEXTURE_PRELOAD,
|
||||
+ WINED3D_CS_OP_UPDATE_TEXTURE,
|
||||
WINED3D_CS_OP_STOP,
|
||||
@ -68,8 +68,8 @@ index 811c4b7..2cb9ad7 100644
|
||||
{
|
||||
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
|
||||
@@ -2140,6 +2172,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_TEXTURE_MAP */ wined3d_cs_exec_texture_map,
|
||||
/* WINED3D_CS_OP_TEXTURE_UNMAP */ wined3d_cs_exec_texture_unmap,
|
||||
/* WINED3D_CS_OP_QUERY_ISSUE */ wined3d_cs_exec_query_issue,
|
||||
/* WINED3D_CS_OP_TEXTURE_PRELOAD */ wined3d_cs_exec_texture_preload,
|
||||
+ /* WINED3D_CS_OP_UPDATE_TEXTURE */ wined3d_cs_exec_update_texture,
|
||||
};
|
||||
@ -319,7 +319,7 @@ index d458747..99118f2 100644
|
||||
|
||||
HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device, DWORD *num_passes)
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index e2e8673..9caeb46 100644
|
||||
index 8af4864..3caec37 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2533,6 +2533,8 @@ void device_resource_add(struct wined3d_device *device, struct wined3d_resource
|
||||
@ -331,8 +331,8 @@ index e2e8673..9caeb46 100644
|
||||
|
||||
static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD state)
|
||||
{
|
||||
@@ -3162,6 +3164,8 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
|
||||
DWORD flags) DECLSPEC_HIDDEN;
|
||||
@@ -3154,6 +3156,8 @@ void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture
|
||||
unsigned int sub_resource_idx) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_query_poll(struct wined3d_cs *cs, struct wined3d_query *query, BOOL *ret) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_texture_preload(struct wined3d_cs *cs, struct wined3d_texture *texture) DECLSPEC_HIDDEN;
|
||||
+void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_texture *src,
|
||||
|
@ -1,4 +1,4 @@
|
||||
From ca779bf66fca8a4f62db32a30cc895def00cd4ed Mon Sep 17 00:00:00 2001
|
||||
From 90c36c36a147bdf75db57285ba85c1f504ea13ea Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Tue, 6 Aug 2013 13:50:31 +0200
|
||||
Subject: wined3d: Handle evit_managed_resources through the CS
|
||||
@ -10,18 +10,18 @@ Subject: wined3d: Handle evit_managed_resources through the CS
|
||||
3 files changed, 41 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index aa66603..5d5ddbb 100644
|
||||
index 4611f41..d1c9ae6 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -72,6 +72,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_QUERY_ISSUE,
|
||||
@@ -73,6 +73,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_TEXTURE_UNMAP,
|
||||
WINED3D_CS_OP_TEXTURE_PRELOAD,
|
||||
WINED3D_CS_OP_UPDATE_TEXTURE,
|
||||
+ WINED3D_CS_OP_EVICT_RESOURCE,
|
||||
WINED3D_CS_OP_STOP,
|
||||
};
|
||||
|
||||
@@ -410,6 +411,12 @@ struct wined3d_cs_update_texture
|
||||
@@ -417,6 +418,12 @@ struct wined3d_cs_update_texture
|
||||
struct wined3d_texture *src, *dst;
|
||||
};
|
||||
|
||||
@ -34,7 +34,7 @@ index aa66603..5d5ddbb 100644
|
||||
static void wined3d_cs_mt_submit(struct wined3d_cs *cs, size_t size)
|
||||
{
|
||||
LONG new_val = (cs->queue.head + size) & (WINED3D_CS_QUEUE_SIZE - 1);
|
||||
@@ -2093,6 +2100,35 @@ void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_textur
|
||||
@@ -2122,6 +2129,35 @@ void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_textur
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@ -70,8 +70,8 @@ index aa66603..5d5ddbb 100644
|
||||
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
|
||||
@@ -2143,6 +2179,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_QUERY_ISSUE */ wined3d_cs_exec_query_issue,
|
||||
@@ -2173,6 +2209,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_TEXTURE_UNMAP */ wined3d_cs_exec_texture_unmap,
|
||||
/* WINED3D_CS_OP_TEXTURE_PRELOAD */ wined3d_cs_exec_texture_preload,
|
||||
/* WINED3D_CS_OP_UPDATE_TEXTURE */ wined3d_cs_exec_update_texture,
|
||||
+ /* WINED3D_CS_OP_EVICT_RESOURCE */ wined3d_cs_exec_evict_resource,
|
||||
@ -79,10 +79,10 @@ index aa66603..5d5ddbb 100644
|
||||
|
||||
static inline void *_wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size, BOOL prio)
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index a4dd9fb..fd866ad 100644
|
||||
index 84071e4..612f1dd 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -4540,13 +4540,8 @@ void CDECL wined3d_device_evict_managed_resources(struct wined3d_device *device)
|
||||
@@ -4566,13 +4566,8 @@ void CDECL wined3d_device_evict_managed_resources(struct wined3d_device *device)
|
||||
|
||||
TRACE("device %p.\n", device);
|
||||
|
||||
@ -98,7 +98,7 @@ index a4dd9fb..fd866ad 100644
|
||||
LIST_FOR_EACH_ENTRY_SAFE(resource, cursor, &device->resources, struct wined3d_resource, resource_list_entry)
|
||||
{
|
||||
TRACE("Checking resource %p for eviction.\n", resource);
|
||||
@@ -4554,12 +4549,9 @@ void CDECL wined3d_device_evict_managed_resources(struct wined3d_device *device)
|
||||
@@ -4580,12 +4575,9 @@ void CDECL wined3d_device_evict_managed_resources(struct wined3d_device *device)
|
||||
if (resource->pool == WINED3D_POOL_MANAGED && !resource->map_count)
|
||||
{
|
||||
TRACE("Evicting %p.\n", resource);
|
||||
@ -113,10 +113,10 @@ index a4dd9fb..fd866ad 100644
|
||||
|
||||
static void delete_opengl_contexts(struct wined3d_device *device, struct wined3d_swapchain *swapchain)
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 47fdc9e..d823040 100644
|
||||
index 3caec37..1ea6b94 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -3155,6 +3155,7 @@ void wined3d_cs_emit_query_get_data(struct wined3d_cs *cs, struct wined3d_query
|
||||
@@ -3158,6 +3158,7 @@ void wined3d_cs_emit_query_poll(struct wined3d_cs *cs, struct wined3d_query *que
|
||||
void wined3d_cs_emit_texture_preload(struct wined3d_cs *cs, struct wined3d_texture *texture) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_texture *src,
|
||||
struct wined3d_texture *dst) DECLSPEC_HIDDEN;
|
||||
@ -125,5 +125,5 @@ index 47fdc9e..d823040 100644
|
||||
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
|
||||
* fixed function semantics as D3DCOLOR or FLOAT16 */
|
||||
--
|
||||
2.8.0
|
||||
2.9.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 0a4289bbeaf2981f822c11efeb4322ae7d4a14fc Mon Sep 17 00:00:00 2001
|
||||
From 15daab6805322dd6a81a83a4ee162703a23013b4 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Fri, 27 Sep 2013 17:58:25 +0200
|
||||
Subject: wined3d: Make resource maps and unmaps a priority command.
|
||||
@ -9,10 +9,10 @@ Subject: wined3d: Make resource maps and unmaps a priority command.
|
||||
2 files changed, 9 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 139d0c2..1b2378b 100644
|
||||
index 42a0567..64533ef 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -1944,20 +1944,16 @@ void *wined3d_cs_emit_texture_map(struct wined3d_cs *cs, struct wined3d_texture
|
||||
@@ -2076,20 +2076,16 @@ void *wined3d_cs_emit_texture_map(struct wined3d_cs *cs, struct wined3d_texture
|
||||
struct wined3d_cs_texture_map *op;
|
||||
void *ret;
|
||||
|
||||
@ -36,7 +36,7 @@ index 139d0c2..1b2378b 100644
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -1976,12 +1972,12 @@ void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture
|
||||
@@ -2108,12 +2104,12 @@ void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture
|
||||
{
|
||||
struct wined3d_cs_texture_unmap *op;
|
||||
|
||||
@ -50,12 +50,12 @@ index 139d0c2..1b2378b 100644
|
||||
+ cs->ops->submit_prio(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_query_issue(struct wined3d_cs *cs, const void *data)
|
||||
static UINT wined3d_cs_exec_texture_preload(struct wined3d_cs *cs, const void *data)
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index f918797..7b5e344 100644
|
||||
index 3c739fa..5145de0 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -1765,6 +1765,10 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
|
||||
@@ -1731,6 +1731,10 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
|
||||
|
||||
flags = wined3d_resource_sanitize_map_flags(resource, flags);
|
||||
|
||||
@ -67,5 +67,5 @@ index f918797..7b5e344 100644
|
||||
|
||||
base_memory = wined3d_cs_emit_texture_map(device->cs, texture, sub_resource_idx, flags);
|
||||
--
|
||||
2.8.0
|
||||
2.9.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 885bd3fb62e71c7faaf269dbe4709fd95c012065 Mon Sep 17 00:00:00 2001
|
||||
From 45dd4157e3456db1d50368029269acc72e082cf6 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefandoesinger@gmx.at>
|
||||
Date: Sun, 24 Apr 2016 15:07:54 +0100
|
||||
Subject: wined3d: Dirtify changed textures through the command stream.
|
||||
@ -14,18 +14,18 @@ FIXME: The lost unmap_dirtify = FALSE is unfortunate.
|
||||
3 files changed, 45 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 2187005..ee83438 100644
|
||||
index 9471829..eac0aaa 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -66,6 +66,7 @@ enum wined3d_cs_op
|
||||
@@ -69,6 +69,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_SET_LIGHT_ENABLE,
|
||||
WINED3D_CS_OP_BLT,
|
||||
WINED3D_CS_OP_CLEAR_RTV,
|
||||
+ WINED3D_CS_OP_TEXTURE_CHANGED,
|
||||
WINED3D_CS_OP_TEXTURE_MAP,
|
||||
WINED3D_CS_OP_TEXTURE_UNMAP,
|
||||
WINED3D_CS_OP_QUERY_ISSUE,
|
||||
@@ -375,6 +376,13 @@ struct wined3d_cs_texture_unmap
|
||||
WINED3D_CS_OP_TEXTURE_PRELOAD,
|
||||
@@ -401,6 +402,13 @@ struct wined3d_cs_texture_unmap
|
||||
unsigned int sub_resource_idx;
|
||||
};
|
||||
|
||||
@ -39,7 +39,7 @@ index 2187005..ee83438 100644
|
||||
struct wined3d_cs_skip
|
||||
{
|
||||
enum wined3d_cs_op opcode;
|
||||
@@ -1907,6 +1915,28 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
|
||||
@@ -2071,6 +2079,28 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@ -68,19 +68,19 @@ index 2187005..ee83438 100644
|
||||
static UINT wined3d_cs_exec_texture_map(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
const struct wined3d_cs_texture_map *op = data;
|
||||
@@ -2243,6 +2273,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -2337,6 +2367,7 @@ 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,
|
||||
+ /* WINED3D_CS_OP_TEXTURE_CHANGED */ wined3d_cs_exec_texture_changed,
|
||||
/* WINED3D_CS_OP_TEXTURE_MAP */ wined3d_cs_exec_texture_map,
|
||||
/* WINED3D_CS_OP_TEXTURE_UNMAP */ wined3d_cs_exec_texture_unmap,
|
||||
/* WINED3D_CS_OP_QUERY_ISSUE */ wined3d_cs_exec_query_issue,
|
||||
/* WINED3D_CS_OP_TEXTURE_PRELOAD */ wined3d_cs_exec_texture_preload,
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index 82f7aa0..1b656df 100644
|
||||
index 5145de0..605e851 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -1744,7 +1744,6 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
|
||||
@@ -1784,7 +1784,6 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
|
||||
|
||||
void wined3d_texture_unmap_internal(struct wined3d_texture *texture, unsigned int sub_resource_idx)
|
||||
{
|
||||
@ -88,7 +88,7 @@ index 82f7aa0..1b656df 100644
|
||||
struct wined3d_context *context = NULL;
|
||||
struct wined3d_bo_address data;
|
||||
|
||||
@@ -1768,12 +1767,11 @@ void wined3d_texture_unmap_internal(struct wined3d_texture *texture, unsigned in
|
||||
@@ -1808,12 +1807,11 @@ void wined3d_texture_unmap_internal(struct wined3d_texture *texture, unsigned in
|
||||
{
|
||||
FIXME("Depth / stencil buffer locking is not implemented.\n");
|
||||
}
|
||||
@ -105,7 +105,7 @@ index 82f7aa0..1b656df 100644
|
||||
}
|
||||
|
||||
static HRESULT texture_resource_sub_resource_unmap(struct wined3d_resource *resource, unsigned int sub_resource_idx)
|
||||
@@ -1798,6 +1796,12 @@ static HRESULT texture_resource_sub_resource_unmap(struct wined3d_resource *reso
|
||||
@@ -1838,6 +1836,12 @@ static HRESULT texture_resource_sub_resource_unmap(struct wined3d_resource *reso
|
||||
|
||||
wined3d_cs_emit_texture_unmap(device->cs, texture, sub_resource_idx);
|
||||
|
||||
@ -119,10 +119,10 @@ index 82f7aa0..1b656df 100644
|
||||
if (!--resource->map_count && texture->update_map_binding)
|
||||
wined3d_texture_update_map_binding(texture);
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 7ce28b1..0934cee 100644
|
||||
index b5785b4..68d076b 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2612,6 +2612,8 @@ void wined3d_texture_bind(struct wined3d_texture *texture,
|
||||
@@ -2774,6 +2774,8 @@ void wined3d_texture_bind(struct wined3d_texture *texture,
|
||||
struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN;
|
||||
void wined3d_texture_bind_and_dirtify(struct wined3d_texture *texture,
|
||||
struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN;
|
||||
@ -131,7 +131,7 @@ index 7ce28b1..0934cee 100644
|
||||
BOOL wined3d_texture_check_block_align(const struct wined3d_texture *texture,
|
||||
unsigned int level, const struct wined3d_box *box) DECLSPEC_HIDDEN;
|
||||
GLenum wined3d_texture_get_gl_buffer(const struct wined3d_texture *texture) DECLSPEC_HIDDEN;
|
||||
@@ -2998,6 +3000,8 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
|
||||
@@ -3151,6 +3153,8 @@ 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;
|
||||
@ -141,5 +141,5 @@ index 7ce28b1..0934cee 100644
|
||||
unsigned int sub_resource_idx, DWORD flags) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture *texture,
|
||||
--
|
||||
2.8.0
|
||||
2.9.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From df11e80df5719fba6dea98957f2d763282e03704 Mon Sep 17 00:00:00 2001
|
||||
From ab9aeec2012b5d821f22d71714a3ad5008209e0d Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Sat, 6 Jul 2013 16:14:16 +0200
|
||||
Subject: wined3d: Accelerate DISCARD buffer maps
|
||||
@ -40,18 +40,18 @@ index 4cf3cdd..35deef8 100644
|
||||
|
||||
base = buffer->map_ptr ? buffer->map_ptr : buffer->resource.map_heap_memory;
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index c7e47d8..366f641 100644
|
||||
index 20a3d66..cb4f7a2 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -70,6 +70,7 @@ enum wined3d_cs_op
|
||||
@@ -72,6 +72,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_TEXTURE_CHANGED,
|
||||
WINED3D_CS_OP_TEXTURE_MAP,
|
||||
WINED3D_CS_OP_TEXTURE_UNMAP,
|
||||
+ WINED3D_CS_OP_BUFFER_SWAP_MEM,
|
||||
WINED3D_CS_OP_QUERY_ISSUE,
|
||||
WINED3D_CS_OP_TEXTURE_PRELOAD,
|
||||
WINED3D_CS_OP_UPDATE_TEXTURE,
|
||||
@@ -397,6 +398,13 @@ struct wined3d_cs_texture_changed
|
||||
WINED3D_CS_OP_EVICT_RESOURCE,
|
||||
@@ -411,6 +412,13 @@ struct wined3d_cs_texture_changed
|
||||
void *swap_heap_memory;
|
||||
};
|
||||
|
||||
@ -65,7 +65,7 @@ index c7e47d8..366f641 100644
|
||||
struct wined3d_cs_skip
|
||||
{
|
||||
enum wined3d_cs_op opcode;
|
||||
@@ -2295,6 +2303,34 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
|
||||
@@ -2324,6 +2332,34 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
|
||||
cs->ops->finish(cs);
|
||||
}
|
||||
|
||||
@ -100,19 +100,19 @@ index c7e47d8..366f641 100644
|
||||
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
|
||||
@@ -2343,6 +2379,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -2374,6 +2410,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_TEXTURE_CHANGED */ wined3d_cs_exec_texture_changed,
|
||||
/* WINED3D_CS_OP_TEXTURE_MAP */ wined3d_cs_exec_texture_map,
|
||||
/* WINED3D_CS_OP_TEXTURE_UNMAP */ wined3d_cs_exec_texture_unmap,
|
||||
+ /* WINED3D_CS_OP_BUFFER_SWAP_MEM */ wined3d_cs_exec_buffer_swap_mem,
|
||||
/* WINED3D_CS_OP_QUERY_ISSUE */ wined3d_cs_exec_query_issue,
|
||||
/* WINED3D_CS_OP_TEXTURE_PRELOAD */ wined3d_cs_exec_texture_preload,
|
||||
/* WINED3D_CS_OP_UPDATE_TEXTURE */ wined3d_cs_exec_update_texture,
|
||||
/* WINED3D_CS_OP_EVICT_RESOURCE */ wined3d_cs_exec_evict_resource,
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index d463a81..1664282 100644
|
||||
index 31375ed..2b25a33 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -3179,6 +3179,8 @@ void wined3d_cs_emit_evict_resource(struct wined3d_cs *cs, struct wined3d_resour
|
||||
@@ -3182,6 +3182,8 @@ void wined3d_cs_emit_evict_resource(struct wined3d_cs *cs, struct wined3d_resour
|
||||
void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||
unsigned int sub_resource_idx, const struct wined3d_box *box, const void *data, unsigned int row_pitch,
|
||||
unsigned int depth_pitch) DECLSPEC_HIDDEN;
|
||||
@ -122,5 +122,5 @@ index d463a81..1664282 100644
|
||||
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
|
||||
* fixed function semantics as D3DCOLOR or FLOAT16 */
|
||||
--
|
||||
2.8.0
|
||||
2.9.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From cb5e6083d9ca441d24d7f96a20f40e35abb07c2e Mon Sep 17 00:00:00 2001
|
||||
From 7061e74d97edf88035aacacc3e6a549ed7792d96 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Sat, 6 Jul 2013 17:05:12 +0200
|
||||
Subject: wined3d: Access the buffer dirty areas through the CS
|
||||
@ -52,18 +52,18 @@ index 2f049fc..e23ec3b 100644
|
||||
if (!(buffer->flags & WINED3D_BUFFER_DOUBLEBUFFER))
|
||||
{
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 366f641..8869eff 100644
|
||||
index cb4f7a2..819a371 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -71,6 +71,7 @@ enum wined3d_cs_op
|
||||
@@ -73,6 +73,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_TEXTURE_MAP,
|
||||
WINED3D_CS_OP_TEXTURE_UNMAP,
|
||||
WINED3D_CS_OP_BUFFER_SWAP_MEM,
|
||||
+ WINED3D_CS_OP_BUFFER_INVALIDATE_RANGE,
|
||||
WINED3D_CS_OP_QUERY_ISSUE,
|
||||
WINED3D_CS_OP_TEXTURE_PRELOAD,
|
||||
WINED3D_CS_OP_UPDATE_TEXTURE,
|
||||
@@ -405,6 +406,13 @@ struct wined3d_cs_buffer_swap_mem
|
||||
WINED3D_CS_OP_EVICT_RESOURCE,
|
||||
@@ -419,6 +420,13 @@ struct wined3d_cs_buffer_swap_mem
|
||||
BYTE *mem;
|
||||
};
|
||||
|
||||
@ -77,7 +77,7 @@ index 366f641..8869eff 100644
|
||||
struct wined3d_cs_skip
|
||||
{
|
||||
enum wined3d_cs_op opcode;
|
||||
@@ -2331,6 +2339,28 @@ void wined3d_cs_emit_buffer_swap_mem(struct wined3d_cs *cs, struct wined3d_buffe
|
||||
@@ -2360,6 +2368,28 @@ void wined3d_cs_emit_buffer_swap_mem(struct wined3d_cs *cs, struct wined3d_buffe
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@ -106,19 +106,19 @@ index 366f641..8869eff 100644
|
||||
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
|
||||
@@ -2380,6 +2410,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -2411,6 +2441,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_TEXTURE_MAP */ wined3d_cs_exec_texture_map,
|
||||
/* WINED3D_CS_OP_TEXTURE_UNMAP */ wined3d_cs_exec_texture_unmap,
|
||||
/* WINED3D_CS_OP_BUFFER_SWAP_MEM */ wined3d_cs_exec_buffer_swap_mem,
|
||||
+ /* WINED3D_CS_OP_BUFFER_INVALIDATE_RANGE */ wined3d_cs_exec_buffer_invalidate_bo_range,
|
||||
/* WINED3D_CS_OP_QUERY_ISSUE */ wined3d_cs_exec_query_issue,
|
||||
/* WINED3D_CS_OP_TEXTURE_PRELOAD */ wined3d_cs_exec_texture_preload,
|
||||
/* WINED3D_CS_OP_UPDATE_TEXTURE */ wined3d_cs_exec_update_texture,
|
||||
/* WINED3D_CS_OP_EVICT_RESOURCE */ wined3d_cs_exec_evict_resource,
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 1664282..e4996d7 100644
|
||||
index 2b25a33..6b566fe 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -3181,6 +3181,8 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
|
||||
@@ -3184,6 +3184,8 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
|
||||
unsigned int depth_pitch) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_buffer_swap_mem(struct wined3d_cs *cs, struct wined3d_buffer *buffer,
|
||||
BYTE *mem) DECLSPEC_HIDDEN;
|
||||
@ -127,7 +127,7 @@ index 1664282..e4996d7 100644
|
||||
|
||||
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
|
||||
* fixed function semantics as D3DCOLOR or FLOAT16 */
|
||||
@@ -3235,6 +3237,7 @@ HRESULT wined3d_buffer_copy(struct wined3d_buffer *dst_buffer, unsigned int dst_
|
||||
@@ -3238,6 +3240,7 @@ HRESULT wined3d_buffer_copy(struct wined3d_buffer *dst_buffer, unsigned int dst_
|
||||
struct wined3d_buffer *src_buffer, unsigned int src_offset, unsigned int size) DECLSPEC_HIDDEN;
|
||||
HRESULT wined3d_buffer_upload_data(struct wined3d_buffer *buffer,
|
||||
const struct wined3d_box *box, const void *data) DECLSPEC_HIDDEN;
|
||||
@ -136,5 +136,5 @@ index 1664282..e4996d7 100644
|
||||
struct wined3d_rendertarget_view
|
||||
{
|
||||
--
|
||||
2.8.0
|
||||
2.9.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From ccd145df2e90b499b04451e0d10e727bf5a78120 Mon Sep 17 00:00:00 2001
|
||||
From 5b3571a652a975d117d0422e5ebe532b1ccda5be Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Sun, 7 Jul 2013 12:02:59 +0200
|
||||
Subject: wined3d: Send buffer preloads through the CS
|
||||
@ -43,18 +43,18 @@ index 11a3c66..d0c21b2 100644
|
||||
|
||||
struct wined3d_resource * CDECL wined3d_buffer_get_resource(struct wined3d_buffer *buffer)
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 8869eff..c9370d4 100644
|
||||
index 819a371..56eb444 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -72,6 +72,7 @@ enum wined3d_cs_op
|
||||
@@ -74,6 +74,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_TEXTURE_UNMAP,
|
||||
WINED3D_CS_OP_BUFFER_SWAP_MEM,
|
||||
WINED3D_CS_OP_BUFFER_INVALIDATE_RANGE,
|
||||
+ WINED3D_CS_OP_BUFFER_PRELOAD,
|
||||
WINED3D_CS_OP_QUERY_ISSUE,
|
||||
WINED3D_CS_OP_TEXTURE_PRELOAD,
|
||||
WINED3D_CS_OP_UPDATE_TEXTURE,
|
||||
@@ -453,6 +454,12 @@ struct wined3d_cs_update_sub_resource
|
||||
WINED3D_CS_OP_EVICT_RESOURCE,
|
||||
@@ -460,6 +461,12 @@ struct wined3d_cs_update_sub_resource
|
||||
const void *data;
|
||||
};
|
||||
|
||||
@ -67,7 +67,7 @@ index 8869eff..c9370d4 100644
|
||||
static void wined3d_cs_mt_submit(struct wined3d_cs *cs, size_t size)
|
||||
{
|
||||
LONG new_val = (cs->queue.head + size) & (WINED3D_CS_QUEUE_SIZE - 1);
|
||||
@@ -2361,6 +2368,29 @@ void wined3d_cs_emit_buffer_invalidate_bo_range(struct wined3d_cs *cs,
|
||||
@@ -2390,6 +2397,29 @@ void wined3d_cs_emit_buffer_invalidate_bo_range(struct wined3d_cs *cs,
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@ -97,19 +97,19 @@ index 8869eff..c9370d4 100644
|
||||
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
|
||||
@@ -2411,6 +2441,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -2442,6 +2472,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_TEXTURE_UNMAP */ wined3d_cs_exec_texture_unmap,
|
||||
/* WINED3D_CS_OP_BUFFER_SWAP_MEM */ wined3d_cs_exec_buffer_swap_mem,
|
||||
/* WINED3D_CS_OP_BUFFER_INVALIDATE_RANGE */ wined3d_cs_exec_buffer_invalidate_bo_range,
|
||||
+ /* WINED3D_CS_OP_BUFFER_PRELOAD */ wined3d_cs_exec_buffer_preload,
|
||||
/* WINED3D_CS_OP_QUERY_ISSUE */ wined3d_cs_exec_query_issue,
|
||||
/* WINED3D_CS_OP_TEXTURE_PRELOAD */ wined3d_cs_exec_texture_preload,
|
||||
/* WINED3D_CS_OP_UPDATE_TEXTURE */ wined3d_cs_exec_update_texture,
|
||||
/* WINED3D_CS_OP_EVICT_RESOURCE */ wined3d_cs_exec_evict_resource,
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index e4996d7..8928819 100644
|
||||
index 6b566fe..ccfc0f3 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -3183,6 +3183,7 @@ void wined3d_cs_emit_buffer_swap_mem(struct wined3d_cs *cs, struct wined3d_buffe
|
||||
@@ -3186,6 +3186,7 @@ void wined3d_cs_emit_buffer_swap_mem(struct wined3d_cs *cs, struct wined3d_buffe
|
||||
BYTE *mem) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_buffer_invalidate_bo_range(struct wined3d_cs *cs,
|
||||
struct wined3d_buffer *buffer, unsigned int offset, unsigned int size) DECLSPEC_HIDDEN;
|
||||
@ -118,5 +118,5 @@ index e4996d7..8928819 100644
|
||||
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
|
||||
* fixed function semantics as D3DCOLOR or FLOAT16 */
|
||||
--
|
||||
2.8.0
|
||||
2.9.0
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user