mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
wined3d-CSMT_Main: Added patches to fix wrong return value and to send wined3d_texture_add_dirty_region through the command stream.
This commit is contained in:
parent
89e2d01a1d
commit
61c40e8075
@ -7428,6 +7428,8 @@ if test "$enable_wined3d_CSMT_Main" -eq 1; then
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Create initial DCs through the CS.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Assign a read buffer when discarding a new texture.", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "wined3d: Do not query available GPU memory on main thread when CSMT is enabled.", 1 },';
|
||||
echo '+ { "Nils Kuhnhenn", "wined3d: Fix incorrect return value in wined3d_cs_exec_set_light.", 1 },';
|
||||
echo '+ { "Nils Kuhnhenn", "wined3d: Fix context_acquire not being called from the command thread in wined3d_texture_add_dirty_region.", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "wined3d: Enable CSMT by default, print a winediag message informing about this patchset.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
@ -0,0 +1,28 @@
|
||||
From 83363d459920153f0f603199211a4af01dc1c930 Mon Sep 17 00:00:00 2001
|
||||
From: Nils Kuhnhenn <nils@volafile.io>
|
||||
Date: Fri, 5 Aug 2016 20:28:20 +0200
|
||||
Subject: wined3d: Fix incorrect return value in wined3d_cs_exec_set_light.
|
||||
|
||||
---
|
||||
dlls/wined3d/cs.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 3c8a439..7052c19 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -1974,7 +1974,10 @@ static UINT wined3d_cs_exec_set_light(struct wined3d_cs *cs, const void *data)
|
||||
TRACE("Adding new light\n");
|
||||
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
|
||||
if (!object)
|
||||
- return E_OUTOFMEMORY;
|
||||
+ {
|
||||
+ ERR("Out of memory!\n");
|
||||
+ return sizeof(*op);
|
||||
+ }
|
||||
|
||||
list_add_head(&cs->state.light_map[hash_idx], &object->entry);
|
||||
object->glIndex = -1;
|
||||
--
|
||||
2.9.0
|
||||
|
@ -0,0 +1,143 @@
|
||||
From 50fa1cd464e2ad5a85d3a4400e32b4f9f7ff4e36 Mon Sep 17 00:00:00 2001
|
||||
From: Nils Kuhnhenn <nils@volafile.io>
|
||||
Date: Fri, 5 Aug 2016 20:28:46 +0200
|
||||
Subject: wined3d: Fix context_acquire not being called from the command thread
|
||||
in wined3d_texture_add_dirty_region.
|
||||
|
||||
---
|
||||
dlls/wined3d/cs.c | 50 ++++++++++++++++++++++++++++++++++++++++++
|
||||
dlls/wined3d/texture.c | 15 +------------
|
||||
dlls/wined3d/wined3d_private.h | 2 ++
|
||||
3 files changed, 53 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 7052c19..9f850a5 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -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_TEXTURE_ADD_DIRTY_REGION,
|
||||
WINED3D_CS_OP_BUFFER_SWAP_MEM,
|
||||
WINED3D_CS_OP_BUFFER_INVALIDATE_RANGE,
|
||||
WINED3D_CS_OP_BUFFER_PRELOAD,
|
||||
@@ -413,6 +414,13 @@ struct wined3d_cs_texture_unmap
|
||||
unsigned int sub_resource_idx;
|
||||
};
|
||||
|
||||
+struct wined3d_cs_texture_add_dirty_region
|
||||
+{
|
||||
+ enum wined3d_cs_op opcode;
|
||||
+ struct wined3d_texture *texture;
|
||||
+ unsigned int sub_resource_idx;
|
||||
+};
|
||||
+
|
||||
struct wined3d_cs_texture_changed
|
||||
{
|
||||
enum wined3d_cs_op opcode;
|
||||
@@ -2253,6 +2261,47 @@ void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture
|
||||
cs->ops->submit_prio(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
+static UINT wined3d_cs_exec_texture_add_dirty_region(struct wined3d_cs *cs, const void *data)
|
||||
+{
|
||||
+ const struct wined3d_cs_texture_add_dirty_region *op = data;
|
||||
+ struct wined3d_texture *texture = op->texture;
|
||||
+ struct wined3d_context *context;
|
||||
+
|
||||
+ context = context_acquire(cs->device, NULL);
|
||||
+ if (!wined3d_texture_load_location(texture, op->sub_resource_idx, context, texture->resource.map_binding))
|
||||
+ {
|
||||
+ ERR("Failed to load location %s.\n", wined3d_debug_location(texture->resource.map_binding));
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ wined3d_texture_invalidate_location(texture, op->sub_resource_idx, ~texture->resource.map_binding);
|
||||
+ }
|
||||
+ context_release(context);
|
||||
+
|
||||
+ wined3d_resource_release(&texture->resource);
|
||||
+
|
||||
+ return sizeof(*op);
|
||||
+}
|
||||
+
|
||||
+void wined3d_cs_emit_texture_add_dirty_region(struct wined3d_cs *cs,
|
||||
+ struct wined3d_texture *texture, unsigned int sub_resource_idx,
|
||||
+ const struct wined3d_box *dirty_region)
|
||||
+{
|
||||
+ struct wined3d_cs_texture_add_dirty_region *op;
|
||||
+
|
||||
+ if (dirty_region)
|
||||
+ WARN("Ignoring dirty_region %s.\n", debug_box(dirty_region));
|
||||
+
|
||||
+ op = cs->ops->require_space(cs, sizeof(*op));
|
||||
+ op->opcode = WINED3D_CS_OP_TEXTURE_ADD_DIRTY_REGION;
|
||||
+ op->texture = texture;
|
||||
+ op->sub_resource_idx = sub_resource_idx;
|
||||
+
|
||||
+ wined3d_resource_acquire(&texture->resource);
|
||||
+
|
||||
+ cs->ops->submit(cs, sizeof(*op));
|
||||
+}
|
||||
+
|
||||
static UINT wined3d_cs_exec_texture_preload(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
const struct wined3d_cs_texture_preload *op = data;
|
||||
@@ -2730,6 +2779,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_TEXTURE_ADD_DIRTY_REGION */ wined3d_cs_exec_texture_add_dirty_region,
|
||||
/* 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,
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index de0cf58..585cf8e 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -1551,7 +1551,6 @@ struct wined3d_texture_sub_resource *wined3d_texture_get_sub_resource(struct win
|
||||
HRESULT CDECL wined3d_texture_add_dirty_region(struct wined3d_texture *texture,
|
||||
UINT layer, const struct wined3d_box *dirty_region)
|
||||
{
|
||||
- struct wined3d_context *context;
|
||||
unsigned int sub_resource_idx;
|
||||
|
||||
TRACE("texture %p, layer %u, dirty_region %s.\n", texture, layer, debug_box(dirty_region));
|
||||
@@ -1563,19 +1562,7 @@ HRESULT CDECL wined3d_texture_add_dirty_region(struct wined3d_texture *texture,
|
||||
}
|
||||
sub_resource_idx = layer * texture->level_count;
|
||||
|
||||
- if (dirty_region)
|
||||
- WARN("Ignoring dirty_region %s.\n", debug_box(dirty_region));
|
||||
-
|
||||
- context = context_acquire(texture->resource.device, NULL);
|
||||
- if (!wined3d_texture_load_location(texture, sub_resource_idx, context, texture->resource.map_binding))
|
||||
- {
|
||||
- ERR("Failed to load location %s.\n", wined3d_debug_location(texture->resource.map_binding));
|
||||
- context_release(context);
|
||||
- return E_OUTOFMEMORY;
|
||||
- }
|
||||
- wined3d_texture_invalidate_location(texture, sub_resource_idx, ~texture->resource.map_binding);
|
||||
- context_release(context);
|
||||
-
|
||||
+ wined3d_cs_emit_texture_add_dirty_region(texture->resource.device->cs, texture, sub_resource_idx, dirty_region);
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index d8eaeb7..bd8557c 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -3192,6 +3192,8 @@ 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_texture_add_dirty_region(struct wined3d_cs *cs, struct wined3d_texture *texture,
|
||||
+ unsigned int sub_resource_idx, const struct wined3d_box *dirty_region) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_texture_preload(struct wined3d_cs *cs, struct wined3d_texture *texture) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_texture *src,
|
||||
struct wined3d_texture *dst) DECLSPEC_HIDDEN;
|
||||
--
|
||||
2.9.0
|
||||
|
@ -4,6 +4,7 @@ Subject: Autogenerated #ifdef patch for wined3d-CSMT_Main.
|
||||
Based on patches by:
|
||||
Henri Verbeet <hverbeet@codeweavers.com>
|
||||
Matteo Bruni <mbruni@codeweavers.com>
|
||||
Nils Kuhnhenn <nils@volafile.io>
|
||||
Sebastian Lackner <sebastian@fds-team.de>
|
||||
Stefan Dösinger <stefan@codeweavers.com>
|
||||
Stefan Dösinger <stefandoesinger@gmx.at>
|
||||
@ -666,7 +667,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
WINED3D_CS_OP_PRESENT,
|
||||
WINED3D_CS_OP_CLEAR,
|
||||
WINED3D_CS_OP_DRAW,
|
||||
@@ -55,6 +63,51 @@ enum wined3d_cs_op
|
||||
@@ -55,6 +63,52 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_RESET_STATE,
|
||||
WINED3D_CS_OP_DESTROY_OBJECT,
|
||||
WINED3D_CS_OP_QUERY_ISSUE,
|
||||
@ -687,6 +688,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
+ WINED3D_CS_OP_TEXTURE_CHANGED,
|
||||
+ WINED3D_CS_OP_TEXTURE_MAP,
|
||||
+ WINED3D_CS_OP_TEXTURE_UNMAP,
|
||||
+ WINED3D_CS_OP_TEXTURE_ADD_DIRTY_REGION,
|
||||
+ WINED3D_CS_OP_BUFFER_SWAP_MEM,
|
||||
+ WINED3D_CS_OP_BUFFER_INVALIDATE_RANGE,
|
||||
+ WINED3D_CS_OP_BUFFER_PRELOAD,
|
||||
@ -718,7 +720,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
};
|
||||
|
||||
struct wined3d_cs_present
|
||||
@@ -275,7 +328,277 @@ struct wined3d_cs_query_issue
|
||||
@@ -275,7 +329,284 @@ struct wined3d_cs_query_issue
|
||||
DWORD flags;
|
||||
};
|
||||
|
||||
@ -819,6 +821,13 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
+ unsigned int sub_resource_idx;
|
||||
+};
|
||||
+
|
||||
+struct wined3d_cs_texture_add_dirty_region
|
||||
+{
|
||||
+ enum wined3d_cs_op opcode;
|
||||
+ struct wined3d_texture *texture;
|
||||
+ unsigned int sub_resource_idx;
|
||||
+};
|
||||
+
|
||||
+struct wined3d_cs_texture_changed
|
||||
+{
|
||||
+ enum wined3d_cs_op opcode;
|
||||
@ -996,7 +1005,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
const struct wined3d_cs_present *op = data;
|
||||
struct wined3d_swapchain *swapchain;
|
||||
@@ -284,13 +607,24 @@ static void wined3d_cs_exec_present(struct wined3d_cs *cs, const void *data)
|
||||
@@ -284,13 +615,24 @@ static void wined3d_cs_exec_present(struct wined3d_cs *cs, const void *data)
|
||||
swapchain = op->swapchain;
|
||||
wined3d_swapchain_set_window(swapchain, op->dst_window_override);
|
||||
|
||||
@ -1021,7 +1030,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *swapchain,
|
||||
@@ -298,6 +632,9 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
|
||||
@@ -298,6 +640,9 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
|
||||
{
|
||||
struct wined3d_cs_present *op;
|
||||
unsigned int i;
|
||||
@ -1031,7 +1040,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
|
||||
op = cs->ops->require_space(cs, sizeof(*op));
|
||||
op->opcode = WINED3D_CS_OP_PRESENT;
|
||||
@@ -313,34 +650,75 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
|
||||
@@ -313,34 +658,75 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
|
||||
wined3d_resource_acquire(&swapchain->back_buffers[i]->resource);
|
||||
}
|
||||
|
||||
@ -1107,7 +1116,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *rects,
|
||||
@@ -349,8 +727,13 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
@@ -349,8 +735,13 @@ 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;
|
||||
@ -1121,7 +1130,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
op->opcode = WINED3D_CS_OP_CLEAR;
|
||||
op->flags = flags;
|
||||
op->color = *color;
|
||||
@@ -363,11 +746,17 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
@@ -363,11 +754,17 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
{
|
||||
for (i = 0; i < cs->device->adapter->gl_info.limits.buffers; ++i)
|
||||
{
|
||||
@ -1139,7 +1148,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
wined3d_resource_acquire(state->fb->depth_stencil->resource);
|
||||
|
||||
cs->ops->submit(cs);
|
||||
@@ -376,12 +765,65 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
@@ -376,12 +773,65 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
static void wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
struct wined3d_state *state = &cs->device->state;
|
||||
@ -1205,7 +1214,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
if (!cs->device->adapter->gl_info.supported[ARB_DRAW_ELEMENTS_BASE_VERTEX]
|
||||
&& state->load_base_vertex_index != op->base_vertex_idx)
|
||||
{
|
||||
@@ -406,11 +848,19 @@ static void wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
|
||||
@@ -406,11 +856,19 @@ static void wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
|
||||
}
|
||||
for (i = 0; i < cs->device->adapter->gl_info.limits.buffers; ++i)
|
||||
{
|
||||
@ -1225,7 +1234,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
for (i = 0; i < WINED3D_SHADER_TYPE_COUNT; ++i)
|
||||
{
|
||||
if (!(shader = state->shader[i]))
|
||||
@@ -432,6 +882,10 @@ static void wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
|
||||
@@ -432,6 +890,10 @@ static void wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
|
||||
wined3d_resource_release(view->resource);
|
||||
}
|
||||
}
|
||||
@ -1236,15 +1245,15 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned int start_idx,
|
||||
@@ -454,11 +908,25 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned i
|
||||
@@ -454,11 +916,25 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned i
|
||||
op->indexed = indexed;
|
||||
|
||||
if (indexed)
|
||||
+#if !defined(STAGING_CSMT)
|
||||
+ wined3d_resource_acquire(&state->index_buffer->resource);
|
||||
wined3d_resource_acquire(&state->index_buffer->resource);
|
||||
+#else /* STAGING_CSMT */
|
||||
+ {
|
||||
wined3d_resource_acquire(&state->index_buffer->resource);
|
||||
+ wined3d_resource_acquire(&state->index_buffer->resource);
|
||||
+ state->index_buffer->ignore_discard = FALSE;
|
||||
+ }
|
||||
+#endif /* STAGING_CSMT */
|
||||
@ -1262,7 +1271,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
for (i = 0; i < ARRAY_SIZE(state->textures); ++i)
|
||||
{
|
||||
@@ -467,11 +935,19 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned i
|
||||
@@ -467,11 +943,19 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned i
|
||||
}
|
||||
for (i = 0; i < cs->device->adapter->gl_info.limits.buffers; ++i)
|
||||
{
|
||||
@ -1282,7 +1291,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
for (i = 0; i < WINED3D_SHADER_TYPE_COUNT; ++i)
|
||||
{
|
||||
if (!(shader = state->shader[i]))
|
||||
@@ -494,15 +970,26 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned i
|
||||
@@ -494,15 +978,26 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned i
|
||||
}
|
||||
}
|
||||
|
||||
@ -1309,7 +1318,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query *predicate, BOOL value)
|
||||
@@ -514,15 +1001,26 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query
|
||||
@@ -514,15 +1009,26 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query
|
||||
op->predicate = predicate;
|
||||
op->value = value;
|
||||
|
||||
@ -1336,7 +1345,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_viewport *viewport)
|
||||
@@ -533,15 +1031,26 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
|
||||
@@ -533,15 +1039,26 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
|
||||
op->opcode = WINED3D_CS_OP_SET_VIEWPORT;
|
||||
op->viewport = *viewport;
|
||||
|
||||
@ -1363,7 +1372,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
|
||||
@@ -552,15 +1061,29 @@ void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
|
||||
@@ -552,15 +1069,29 @@ 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;
|
||||
|
||||
@ -1393,7 +1402,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int view_idx,
|
||||
@@ -573,16 +1096,27 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
|
||||
@@ -573,16 +1104,27 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
|
||||
op->view_idx = view_idx;
|
||||
op->view = view;
|
||||
|
||||
@ -1421,7 +1430,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
struct wined3d_surface *prev_surface = wined3d_rendertarget_view_get_surface(prev);
|
||||
|
||||
@@ -590,15 +1124,26 @@ static void wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
|
||||
@@ -590,15 +1132,26 @@ static void wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
|
||||
|| prev_surface->container->flags & WINED3D_TEXTURE_DISCARD))
|
||||
{
|
||||
surface_modify_ds_location(prev_surface, WINED3D_LOCATION_DISCARDED, prev->width, prev->height);
|
||||
@ -1448,7 +1457,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
|
||||
if (!prev != !op->view)
|
||||
{
|
||||
@@ -615,6 +1160,10 @@ static void wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
|
||||
@@ -615,6 +1168,10 @@ static void wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
|
||||
}
|
||||
|
||||
device_invalidate_state(device, STATE_FRAMEBUFFER);
|
||||
@ -1459,7 +1468,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3d_rendertarget_view *view)
|
||||
@@ -625,15 +1174,26 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3
|
||||
@@ -625,15 +1182,26 @@ 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;
|
||||
|
||||
@ -1486,7 +1495,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3d_vertex_declaration *declaration)
|
||||
@@ -644,10 +1204,17 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
|
||||
@@ -644,10 +1212,17 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
|
||||
op->opcode = WINED3D_CS_OP_SET_VERTEX_DECLARATION;
|
||||
op->declaration = declaration;
|
||||
|
||||
@ -1504,7 +1513,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
const struct wined3d_cs_set_stream_source *op = data;
|
||||
struct wined3d_stream_state *stream;
|
||||
@@ -665,6 +1232,10 @@ static void wined3d_cs_exec_set_stream_source(struct wined3d_cs *cs, const void
|
||||
@@ -665,6 +1240,10 @@ 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);
|
||||
@ -1515,7 +1524,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -679,10 +1250,17 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -679,10 +1258,17 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
|
||||
op->offset = offset;
|
||||
op->stride = stride;
|
||||
|
||||
@ -1533,7 +1542,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
const struct wined3d_cs_set_stream_source_freq *op = data;
|
||||
struct wined3d_stream_state *stream;
|
||||
@@ -692,6 +1270,10 @@ static void wined3d_cs_exec_set_stream_source_freq(struct wined3d_cs *cs, const
|
||||
@@ -692,6 +1278,10 @@ 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);
|
||||
@ -1544,7 +1553,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_idx, UINT frequency, UINT flags)
|
||||
@@ -704,10 +1286,17 @@ void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_i
|
||||
@@ -704,10 +1294,17 @@ void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_i
|
||||
op->frequency = frequency;
|
||||
op->flags = flags;
|
||||
|
||||
@ -1562,7 +1571,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
const struct wined3d_cs_set_stream_output *op = data;
|
||||
struct wined3d_stream_output *stream;
|
||||
@@ -722,6 +1311,10 @@ static void wined3d_cs_exec_set_stream_output(struct wined3d_cs *cs, const void
|
||||
@@ -722,6 +1319,10 @@ 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);
|
||||
@ -1573,7 +1582,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -735,10 +1328,17 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -735,10 +1336,17 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
|
||||
op->buffer = buffer;
|
||||
op->offset = offset;
|
||||
|
||||
@ -1591,7 +1600,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
const struct wined3d_cs_set_index_buffer *op = data;
|
||||
struct wined3d_buffer *prev;
|
||||
@@ -754,6 +1354,10 @@ static void wined3d_cs_exec_set_index_buffer(struct wined3d_cs *cs, const void *
|
||||
@@ -754,6 +1362,10 @@ 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);
|
||||
@ -1602,7 +1611,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buffer *buffer,
|
||||
@@ -767,10 +1371,17 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
|
||||
@@ -767,11 +1379,18 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
|
||||
op->format_id = format_id;
|
||||
op->offset = offset;
|
||||
|
||||
@ -1611,16 +1620,18 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
static void wined3d_cs_exec_set_constant_buffer(struct wined3d_cs *cs, const void *data)
|
||||
-{
|
||||
+#else /* STAGING_CSMT */
|
||||
+ cs->ops->submit(cs, sizeof(*op));
|
||||
+}
|
||||
+
|
||||
+static UINT wined3d_cs_exec_set_constant_buffer(struct wined3d_cs *cs, const void *data)
|
||||
+#endif /* STAGING_CSMT */
|
||||
{
|
||||
+{
|
||||
const struct wined3d_cs_set_constant_buffer *op = data;
|
||||
struct wined3d_buffer *prev;
|
||||
@@ -784,6 +1395,9 @@ static void wined3d_cs_exec_set_constant_buffer(struct wined3d_cs *cs, const voi
|
||||
|
||||
@@ -784,6 +1403,9 @@ 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));
|
||||
@ -1630,7 +1641,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_shader_type type,
|
||||
@@ -797,10 +1411,17 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
|
||||
@@ -797,10 +1419,17 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
|
||||
op->cb_idx = cb_idx;
|
||||
op->buffer = buffer;
|
||||
|
||||
@ -1648,7 +1659,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info = &cs->device->adapter->gl_info;
|
||||
const struct wined3d_d3d_info *d3d_info = &cs->device->adapter->d3d_info;
|
||||
@@ -877,6 +1498,10 @@ static void wined3d_cs_exec_set_texture(struct wined3d_cs *cs, const void *data)
|
||||
@@ -877,6 +1506,10 @@ 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);
|
||||
@ -1659,7 +1670,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined3d_texture *texture)
|
||||
@@ -887,16 +1512,27 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
|
||||
@@ -887,16 +1520,27 @@ 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;
|
||||
@ -1669,14 +1680,13 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
static void wined3d_cs_exec_set_shader_resource_view(struct wined3d_cs *cs, const void *data)
|
||||
-{
|
||||
+#else /* STAGING_CSMT */
|
||||
+ cs->ops->submit(cs, sizeof(*op));
|
||||
+}
|
||||
+
|
||||
+static UINT wined3d_cs_exec_set_shader_resource_view(struct wined3d_cs *cs, const void *data)
|
||||
+#endif /* STAGING_CSMT */
|
||||
+{
|
||||
{
|
||||
const struct wined3d_cs_set_shader_resource_view *op = data;
|
||||
|
||||
cs->state.shader_resource_view[op->type][op->view_idx] = op->view;
|
||||
@ -1688,7 +1698,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3d_shader_type type,
|
||||
@@ -910,15 +1546,26 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
|
||||
@@ -910,15 +1554,26 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
|
||||
op->view_idx = view_idx;
|
||||
op->view = view;
|
||||
|
||||
@ -1715,7 +1725,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type type,
|
||||
@@ -932,16 +1579,27 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
@@ -932,16 +1587,27 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
op->sampler_idx = sampler_idx;
|
||||
op->sampler = sampler;
|
||||
|
||||
@ -1743,7 +1753,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type type, struct wined3d_shader *shader)
|
||||
@@ -953,15 +1611,26 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
@@ -953,15 +1619,26 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
op->type = type;
|
||||
op->shader = shader;
|
||||
|
||||
@ -1770,7 +1780,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
|
||||
@@ -973,15 +1642,86 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
|
||||
@@ -973,15 +1650,86 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
|
||||
op->opcode = WINED3D_CS_OP_SET_RASTERIZER_STATE;
|
||||
op->state = rasterizer_state;
|
||||
|
||||
@ -1857,7 +1867,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render_state state, DWORD value)
|
||||
@@ -993,6 +1733,7 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
|
||||
@@ -993,6 +1741,7 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
|
||||
op->state = state;
|
||||
op->value = value;
|
||||
|
||||
@ -1865,7 +1875,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@@ -1002,6 +1743,135 @@ static void wined3d_cs_exec_set_texture_state(struct wined3d_cs *cs, const void
|
||||
@@ -1002,6 +1751,135 @@ static void wined3d_cs_exec_set_texture_state(struct wined3d_cs *cs, const void
|
||||
|
||||
cs->state.texture_states[op->stage][op->state] = op->value;
|
||||
device_invalidate_state(cs->device, STATE_TEXTURESTAGE(op->stage, op->state));
|
||||
@ -2001,7 +2011,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
|
||||
@@ -1015,15 +1885,26 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
|
||||
@@ -1015,15 +1893,26 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
|
||||
op->state = state;
|
||||
op->value = value;
|
||||
|
||||
@ -2028,7 +2038,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
|
||||
@@ -1037,16 +1918,27 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
|
||||
@@ -1037,16 +1926,27 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
|
||||
op->state = state;
|
||||
op->value = value;
|
||||
|
||||
@ -2056,7 +2066,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform_state state,
|
||||
@@ -1059,15 +1951,26 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
|
||||
@@ -1059,15 +1959,26 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
|
||||
op->state = state;
|
||||
op->matrix = *matrix;
|
||||
|
||||
@ -2083,7 +2093,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const struct wined3d_vec4 *plane)
|
||||
@@ -1079,10 +1982,17 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
|
||||
@@ -1079,10 +1990,17 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
|
||||
op->plane_idx = plane_idx;
|
||||
op->plane = *plane;
|
||||
|
||||
@ -2101,7 +2111,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
const struct wined3d_cs_set_color_key *op = data;
|
||||
struct wined3d_texture *texture = op->texture;
|
||||
@@ -1143,6 +2053,10 @@ static void wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *dat
|
||||
@@ -1143,6 +2061,10 @@ static void wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *dat
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -2112,7 +2122,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture *texture,
|
||||
@@ -1162,15 +2076,26 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
|
||||
@@ -1162,15 +2084,26 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
|
||||
else
|
||||
op->set = 0;
|
||||
|
||||
@ -2139,7 +2149,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_material *material)
|
||||
@@ -1181,17 +2106,35 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
|
||||
@@ -1181,17 +2114,35 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
|
||||
op->opcode = WINED3D_CS_OP_SET_MATERIAL;
|
||||
op->material = *material;
|
||||
|
||||
@ -2175,7 +2185,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
@@ -1201,14 +2144,25 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
@@ -1201,14 +2152,25 @@ 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;
|
||||
|
||||
@ -2201,7 +2211,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs, void (*callback)(void *object), void *object)
|
||||
@@ -1220,15 +2174,57 @@ void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs, void (*callback)(void
|
||||
@@ -1220,15 +2182,57 @@ void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs, void (*callback)(void
|
||||
op->callback = callback;
|
||||
op->object = object;
|
||||
|
||||
@ -2259,7 +2269,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *query, DWORD flags)
|
||||
@@ -1240,6 +2236,7 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
|
||||
@@ -1240,6 +2244,7 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
|
||||
op->query = query;
|
||||
op->flags = flags;
|
||||
|
||||
@ -2267,7 +2277,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@@ -1387,5 +2384,1214 @@ void wined3d_cs_destroy(struct wined3d_cs *cs)
|
||||
@@ -1387,5 +2392,1259 @@ void wined3d_cs_destroy(struct wined3d_cs *cs)
|
||||
state_cleanup(&cs->state);
|
||||
HeapFree(GetProcessHeap(), 0, cs->fb.render_targets);
|
||||
HeapFree(GetProcessHeap(), 0, cs->data);
|
||||
@ -2371,7 +2381,10 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
+ TRACE("Adding new light\n");
|
||||
+ object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
|
||||
+ if (!object)
|
||||
+ return E_OUTOFMEMORY;
|
||||
+ {
|
||||
+ ERR("Out of memory!\n");
|
||||
+ return sizeof(*op);
|
||||
+ }
|
||||
+
|
||||
+ list_add_head(&cs->state.light_map[hash_idx], &object->entry);
|
||||
+ object->glIndex = -1;
|
||||
@ -2647,6 +2660,47 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
+ cs->ops->submit_prio(cs, sizeof(*op));
|
||||
+}
|
||||
+
|
||||
+static UINT wined3d_cs_exec_texture_add_dirty_region(struct wined3d_cs *cs, const void *data)
|
||||
+{
|
||||
+ const struct wined3d_cs_texture_add_dirty_region *op = data;
|
||||
+ struct wined3d_texture *texture = op->texture;
|
||||
+ struct wined3d_context *context;
|
||||
+
|
||||
+ context = context_acquire(cs->device, NULL);
|
||||
+ if (!wined3d_texture_load_location(texture, op->sub_resource_idx, context, texture->resource.map_binding))
|
||||
+ {
|
||||
+ ERR("Failed to load location %s.\n", wined3d_debug_location(texture->resource.map_binding));
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ wined3d_texture_invalidate_location(texture, op->sub_resource_idx, ~texture->resource.map_binding);
|
||||
+ }
|
||||
+ context_release(context);
|
||||
+
|
||||
+ wined3d_resource_release(&texture->resource);
|
||||
+
|
||||
+ return sizeof(*op);
|
||||
+}
|
||||
+
|
||||
+void wined3d_cs_emit_texture_add_dirty_region(struct wined3d_cs *cs,
|
||||
+ struct wined3d_texture *texture, unsigned int sub_resource_idx,
|
||||
+ const struct wined3d_box *dirty_region)
|
||||
+{
|
||||
+ struct wined3d_cs_texture_add_dirty_region *op;
|
||||
+
|
||||
+ if (dirty_region)
|
||||
+ WARN("Ignoring dirty_region %s.\n", debug_box(dirty_region));
|
||||
+
|
||||
+ op = cs->ops->require_space(cs, sizeof(*op));
|
||||
+ op->opcode = WINED3D_CS_OP_TEXTURE_ADD_DIRTY_REGION;
|
||||
+ op->texture = texture;
|
||||
+ op->sub_resource_idx = sub_resource_idx;
|
||||
+
|
||||
+ wined3d_resource_acquire(&texture->resource);
|
||||
+
|
||||
+ cs->ops->submit(cs, sizeof(*op));
|
||||
+}
|
||||
+
|
||||
+static UINT wined3d_cs_exec_texture_preload(struct wined3d_cs *cs, const void *data)
|
||||
+{
|
||||
+ const struct wined3d_cs_texture_preload *op = data;
|
||||
@ -3124,6 +3178,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
+ /* 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_TEXTURE_ADD_DIRTY_REGION */ wined3d_cs_exec_texture_add_dirty_region,
|
||||
+ /* 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,
|
||||
@ -7381,7 +7436,35 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
return TRUE;
|
||||
|
||||
case WINED3D_LOCATION_TEXTURE_RGB:
|
||||
@@ -1441,6 +1717,9 @@ void wined3d_texture_upload_data(struct wined3d_texture *texture, unsigned int s
|
||||
@@ -1405,7 +1681,9 @@ struct wined3d_texture_sub_resource *wined3d_texture_get_sub_resource(struct win
|
||||
HRESULT CDECL wined3d_texture_add_dirty_region(struct wined3d_texture *texture,
|
||||
UINT layer, const struct wined3d_box *dirty_region)
|
||||
{
|
||||
+#if !defined(STAGING_CSMT)
|
||||
struct wined3d_context *context;
|
||||
+#endif /* STAGING_CSMT */
|
||||
unsigned int sub_resource_idx;
|
||||
|
||||
TRACE("texture %p, layer %u, dirty_region %s.\n", texture, layer, debug_box(dirty_region));
|
||||
@@ -1417,6 +1695,7 @@ HRESULT CDECL wined3d_texture_add_dirty_region(struct wined3d_texture *texture,
|
||||
}
|
||||
sub_resource_idx = layer * texture->level_count;
|
||||
|
||||
+#if !defined(STAGING_CSMT)
|
||||
if (dirty_region)
|
||||
WARN("Ignoring dirty_region %s.\n", debug_box(dirty_region));
|
||||
|
||||
@@ -1430,6 +1709,9 @@ HRESULT CDECL wined3d_texture_add_dirty_region(struct wined3d_texture *texture,
|
||||
wined3d_texture_invalidate_location(texture, sub_resource_idx, ~texture->resource.map_binding);
|
||||
context_release(context);
|
||||
|
||||
+#else /* STAGING_CSMT */
|
||||
+ wined3d_cs_emit_texture_add_dirty_region(texture->resource.device->cs, texture, sub_resource_idx, dirty_region);
|
||||
+#endif /* STAGING_CSMT */
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
@@ -1441,6 +1723,9 @@ void wined3d_texture_upload_data(struct wined3d_texture *texture, unsigned int s
|
||||
context, data, row_pitch, slice_pitch);
|
||||
}
|
||||
|
||||
@ -7391,7 +7474,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
static void texture2d_upload_data(struct wined3d_texture *texture, unsigned int sub_resource_idx,
|
||||
const struct wined3d_context *context, const struct wined3d_const_bo_address *data,
|
||||
unsigned int row_pitch, unsigned int slice_pitch)
|
||||
@@ -1460,7 +1739,12 @@ static void texture2d_upload_data(struct wined3d_texture *texture, unsigned int
|
||||
@@ -1460,7 +1745,12 @@ static void texture2d_upload_data(struct wined3d_texture *texture, unsigned int
|
||||
static BOOL texture2d_load_location(struct wined3d_texture *texture, unsigned int sub_resource_idx,
|
||||
struct wined3d_context *context, DWORD location)
|
||||
{
|
||||
@ -7404,7 +7487,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
}
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
@@ -1613,8 +1897,13 @@ static void wined3d_texture_unload(struct wined3d_resource *resource)
|
||||
@@ -1613,8 +1903,13 @@ static void wined3d_texture_unload(struct wined3d_resource *resource)
|
||||
wined3d_texture_invalidate_location(texture, i, ~WINED3D_LOCATION_DISCARDED);
|
||||
}
|
||||
|
||||
@ -7418,7 +7501,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
|
||||
if (resource->type == WINED3D_RTYPE_TEXTURE_2D)
|
||||
{
|
||||
@@ -1639,6 +1928,89 @@ static void wined3d_texture_unload(struct wined3d_resource *resource)
|
||||
@@ -1639,6 +1934,89 @@ static void wined3d_texture_unload(struct wined3d_resource *resource)
|
||||
wined3d_texture_unload_gl_texture(texture);
|
||||
}
|
||||
|
||||
@ -7508,7 +7591,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resource, unsigned int sub_resource_idx,
|
||||
struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags)
|
||||
{
|
||||
@@ -1646,6 +2018,7 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
|
||||
@@ -1646,6 +2024,7 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
|
||||
struct wined3d_texture_sub_resource *sub_resource;
|
||||
struct wined3d_device *device = resource->device;
|
||||
unsigned int fmt_flags = resource->format_flags;
|
||||
@ -7516,7 +7599,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
const struct wined3d_gl_info *gl_info = NULL;
|
||||
struct wined3d_context *context = NULL;
|
||||
struct wined3d_texture *texture;
|
||||
@@ -1653,6 +2026,11 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
|
||||
@@ -1653,6 +2032,11 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
|
||||
unsigned int texture_level;
|
||||
BYTE *base_memory;
|
||||
BOOL ret;
|
||||
@ -7528,7 +7611,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
|
||||
TRACE("resource %p, sub_resource_idx %u, map_desc %p, box %s, flags %#x.\n",
|
||||
resource, sub_resource_idx, map_desc, debug_box(box), flags);
|
||||
@@ -1699,14 +2077,20 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
|
||||
@@ -1699,14 +2083,20 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
|
||||
|
||||
flags = wined3d_resource_sanitize_map_flags(resource, flags);
|
||||
|
||||
@ -7549,7 +7632,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
TRACE("WINED3D_MAP_DISCARD flag passed, marking %s as up to date.\n",
|
||||
wined3d_debug_location(texture->resource.map_binding));
|
||||
if ((ret = wined3d_texture_prepare_location(texture, sub_resource_idx,
|
||||
@@ -1737,6 +2121,24 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
|
||||
@@ -1737,6 +2127,24 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
|
||||
|
||||
if (context)
|
||||
context_release(context);
|
||||
@ -7574,7 +7657,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
|
||||
if (fmt_flags & WINED3DFMT_FLAG_BROKEN_PITCH)
|
||||
{
|
||||
@@ -1772,6 +2174,7 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
|
||||
@@ -1772,6 +2180,7 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
|
||||
}
|
||||
}
|
||||
|
||||
@ -7582,7 +7665,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
if (texture->swapchain && texture->swapchain->front_buffer == texture)
|
||||
{
|
||||
RECT *r = &texture->swapchain->front_buffer_update;
|
||||
@@ -1783,6 +2186,7 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
|
||||
@@ -1783,6 +2192,7 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
|
||||
TRACE("Mapped front buffer %s.\n", wine_dbgstr_rect(r));
|
||||
}
|
||||
|
||||
@ -7590,7 +7673,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
++resource->map_count;
|
||||
++sub_resource->map_count;
|
||||
|
||||
@@ -1792,14 +2196,71 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
|
||||
@@ -1792,14 +2202,71 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
@ -7662,7 +7745,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
|
||||
TRACE("resource %p, sub_resource_idx %u.\n", resource, sub_resource_idx);
|
||||
|
||||
@@ -1815,6 +2276,7 @@ static HRESULT texture_resource_sub_resource_unmap(struct wined3d_resource *reso
|
||||
@@ -1815,6 +2282,7 @@ static HRESULT texture_resource_sub_resource_unmap(struct wined3d_resource *reso
|
||||
return WINEDDERR_NOTLOCKED;
|
||||
}
|
||||
|
||||
@ -7670,7 +7753,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
if (device->d3d_initialized)
|
||||
{
|
||||
context = context_acquire(device, NULL);
|
||||
@@ -1835,6 +2297,15 @@ static HRESULT texture_resource_sub_resource_unmap(struct wined3d_resource *reso
|
||||
@@ -1835,6 +2303,15 @@ static HRESULT texture_resource_sub_resource_unmap(struct wined3d_resource *reso
|
||||
else if (resource->format_flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL))
|
||||
{
|
||||
FIXME("Depth / stencil buffer locking is not implemented.\n");
|
||||
@ -7686,7 +7769,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
}
|
||||
|
||||
--sub_resource->map_count;
|
||||
@@ -2066,11 +2537,23 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
|
||||
@@ -2066,11 +2543,23 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
|
||||
|
||||
TRACE("Created surface level %u, layer %u @ %p.\n", i, j, surface);
|
||||
|
||||
@ -7710,7 +7793,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2207,7 +2690,9 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in
|
||||
@@ -2207,7 +2696,9 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in
|
||||
struct wined3d_context *context, DWORD location)
|
||||
{
|
||||
struct wined3d_texture_sub_resource *sub_resource = &texture->sub_resources[sub_resource_idx];
|
||||
@ -7720,7 +7803,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
unsigned int row_pitch, slice_pitch;
|
||||
|
||||
TRACE("texture %p, sub_resource_idx %u, context %p, location %s.\n",
|
||||
@@ -2215,6 +2700,7 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in
|
||||
@@ -2215,6 +2706,7 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in
|
||||
|
||||
TRACE("Current resource location %s.\n", wined3d_debug_location(sub_resource->locations));
|
||||
|
||||
@ -7728,7 +7811,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
if ((sub_resource->locations & location) == location)
|
||||
{
|
||||
TRACE("Location(s) already up to date.\n");
|
||||
@@ -2228,9 +2714,11 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in
|
||||
@@ -2228,9 +2720,11 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -7740,7 +7823,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
if (sub_resource->locations & WINED3D_LOCATION_DISCARDED)
|
||||
{
|
||||
TRACE("Volume previously discarded, nothing to do.\n");
|
||||
@@ -2239,6 +2727,7 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in
|
||||
@@ -2239,6 +2733,7 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in
|
||||
goto done;
|
||||
}
|
||||
|
||||
@ -7748,7 +7831,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
switch (location)
|
||||
{
|
||||
case WINED3D_LOCATION_TEXTURE_RGB:
|
||||
@@ -2254,7 +2743,11 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in
|
||||
@@ -2254,7 +2749,11 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in
|
||||
}
|
||||
else if (sub_resource->locations & WINED3D_LOCATION_BUFFER)
|
||||
{
|
||||
@ -7760,7 +7843,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
wined3d_texture_bind_and_dirtify(texture, context,
|
||||
location == WINED3D_LOCATION_TEXTURE_SRGB);
|
||||
wined3d_texture_get_pitch(texture, sub_resource_idx, &row_pitch, &slice_pitch);
|
||||
@@ -2300,7 +2793,11 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in
|
||||
@@ -2300,7 +2799,11 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in
|
||||
case WINED3D_LOCATION_BUFFER:
|
||||
if (sub_resource->locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB))
|
||||
{
|
||||
@ -7772,7 +7855,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
|
||||
if (sub_resource->locations & WINED3D_LOCATION_TEXTURE_RGB)
|
||||
wined3d_texture_bind_and_dirtify(texture, context, FALSE);
|
||||
@@ -2323,7 +2820,9 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in
|
||||
@@ -2323,7 +2826,9 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -7782,7 +7865,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
wined3d_texture_validate_location(texture, sub_resource_idx, location);
|
||||
|
||||
return TRUE;
|
||||
@@ -2498,6 +2997,9 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct
|
||||
@@ -2498,6 +3003,9 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct
|
||||
if (wined3d_texture_use_pbo(texture, gl_info))
|
||||
{
|
||||
wined3d_resource_free_sysmem(&texture->resource);
|
||||
@ -7792,7 +7875,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
texture->resource.map_binding = WINED3D_LOCATION_BUFFER;
|
||||
}
|
||||
|
||||
@@ -2854,13 +3356,47 @@ HRESULT CDECL wined3d_texture_create(struct wined3d_device *device, const struct
|
||||
@@ -2854,13 +3362,47 @@ HRESULT CDECL wined3d_texture_create(struct wined3d_device *device, const struct
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
@ -7840,7 +7923,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
|
||||
TRACE("texture %p, sub_resource_idx %u, dc %p.\n", texture, sub_resource_idx, dc);
|
||||
|
||||
@@ -2878,6 +3414,7 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i
|
||||
@@ -2878,6 +3420,7 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i
|
||||
if (texture->resource.map_count && !(texture->flags & WINED3D_TEXTURE_GET_DC_LENIENT))
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
|
||||
@ -7848,7 +7931,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
if (device->d3d_initialized)
|
||||
context = context_acquire(device, NULL);
|
||||
|
||||
@@ -2900,6 +3437,32 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i
|
||||
@@ -2900,6 +3443,32 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i
|
||||
TRACE("Returning dc %p.\n", *dc);
|
||||
|
||||
return hr;
|
||||
@ -7881,7 +7964,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
}
|
||||
|
||||
HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsigned int sub_resource_idx, HDC dc)
|
||||
@@ -2930,6 +3493,7 @@ HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsign
|
||||
@@ -2930,6 +3499,7 @@ HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsign
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@ -7889,7 +7972,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
if (!(texture->resource.usage & WINED3DUSAGE_OWNDC) && !(device->wined3d->flags & WINED3D_NO3D))
|
||||
wined3d_surface_destroy_dc(surface);
|
||||
|
||||
@@ -2938,6 +3502,9 @@ HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsign
|
||||
@@ -2938,6 +3508,9 @@ HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsign
|
||||
wined3d_texture_update_map_binding(texture);
|
||||
if (!(texture->flags & WINED3D_TEXTURE_GET_DC_LENIENT))
|
||||
texture->flags &= ~WINED3D_TEXTURE_DC_IN_USE;
|
||||
@ -8373,7 +8456,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
|
||||
void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *rects,
|
||||
DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil) DECLSPEC_HIDDEN;
|
||||
@@ -3090,12 +3279,66 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
|
||||
@@ -3090,12 +3279,68 @@ 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;
|
||||
@ -8412,6 +8495,8 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
+ 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_texture_add_dirty_region(struct wined3d_cs *cs, struct wined3d_texture *texture,
|
||||
+ unsigned int sub_resource_idx, const struct wined3d_box *dirty_region) DECLSPEC_HIDDEN;
|
||||
+void wined3d_cs_emit_texture_preload(struct wined3d_cs *cs, struct wined3d_texture *texture) DECLSPEC_HIDDEN;
|
||||
+void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_texture *src,
|
||||
+ struct wined3d_texture *dst) DECLSPEC_HIDDEN;
|
||||
@ -8440,7 +8525,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
|
||||
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
|
||||
* fixed function semantics as D3DCOLOR or FLOAT16 */
|
||||
@@ -3122,6 +3365,9 @@ struct wined3d_buffer
|
||||
@@ -3122,6 +3367,9 @@ struct wined3d_buffer
|
||||
GLenum buffer_object_usage;
|
||||
GLenum buffer_type_hint;
|
||||
DWORD flags;
|
||||
@ -8450,7 +8535,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
void *map_ptr;
|
||||
|
||||
struct wined3d_map_range *maps;
|
||||
@@ -3146,11 +3392,19 @@ void buffer_get_memory(struct wined3d_buffer *buffer, struct wined3d_context *co
|
||||
@@ -3146,11 +3394,19 @@ void buffer_get_memory(struct wined3d_buffer *buffer, struct wined3d_context *co
|
||||
BYTE *buffer_get_sysmem(struct wined3d_buffer *buffer, struct wined3d_context *context) DECLSPEC_HIDDEN;
|
||||
void buffer_internal_preload(struct wined3d_buffer *buffer, struct wined3d_context *context,
|
||||
const struct wined3d_state *state) DECLSPEC_HIDDEN;
|
||||
@ -8470,7 +8555,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
|
||||
struct wined3d_rendertarget_view
|
||||
{
|
||||
@@ -3212,7 +3466,12 @@ struct wined3d_unordered_access_view
|
||||
@@ -3212,7 +3468,12 @@ struct wined3d_unordered_access_view
|
||||
struct wined3d_swapchain_ops
|
||||
{
|
||||
void (*swapchain_present)(struct wined3d_swapchain *swapchain,
|
||||
@ -8483,7 +8568,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
void (*swapchain_frontbuffer_updated)(struct wined3d_swapchain *swapchain);
|
||||
};
|
||||
|
||||
@@ -3249,6 +3508,10 @@ struct wined3d_swapchain
|
||||
@@ -3249,6 +3510,10 @@ struct wined3d_swapchain
|
||||
|
||||
void wined3d_swapchain_activate(struct wined3d_swapchain *swapchain, BOOL activate) DECLSPEC_HIDDEN;
|
||||
struct wined3d_context *swapchain_get_context(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
|
||||
|
Loading…
x
Reference in New Issue
Block a user