You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Rebase against 8b1737c0fdf1d3d905bea281d9241f1f48f333e9.
This commit is contained in:
@@ -1,39 +1,16 @@
|
||||
From 8ec257b616f5e216f9c41eb5a08c8e1e10e57495 Mon Sep 17 00:00:00 2001
|
||||
From 31bc8f2369c91f82e5773ce8be5de3701030387a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Thu, 4 Jul 2013 21:10:16 +0200
|
||||
Subject: wined3d: Send render target view clears through the command stream
|
||||
|
||||
---
|
||||
dlls/d3d9/tests/visual.c | 4 ++--
|
||||
dlls/wined3d/cs.c | 49 ++++++++++++++++++++++++++++++++++++++++++
|
||||
dlls/wined3d/device.c | 6 ++----
|
||||
dlls/wined3d/cs.c | 46 ++++++++++++++++++++++++++++++++++++++++++
|
||||
dlls/wined3d/device.c | 2 +-
|
||||
dlls/wined3d/wined3d_private.h | 3 +++
|
||||
4 files changed, 56 insertions(+), 6 deletions(-)
|
||||
3 files changed, 50 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
|
||||
index 7070895aa2..c14ac9e938 100644
|
||||
--- a/dlls/d3d9/tests/visual.c
|
||||
+++ b/dlls/d3d9/tests/visual.c
|
||||
@@ -1337,7 +1337,7 @@ static void color_fill_test(void)
|
||||
* result on Wine.
|
||||
* {D3DFMT_YUY2, "D3DFMT_YUY2", BLOCKS, 0},
|
||||
* {D3DFMT_UYVY, "D3DFMT_UYVY", BLOCKS, 0}, */
|
||||
- {D3DFMT_DXT1, "D3DFMT_DXT1", BLOCKS | TODO_FILL_RETURN, 0},
|
||||
+ {D3DFMT_DXT1, "D3DFMT_DXT1", BLOCKS, 0},
|
||||
/* Vendor-specific formats like ATI2N are a non-issue here since they're not
|
||||
* supported as offscreen plain surfaces and do not support D3DUSAGE_RENDERTARGET
|
||||
* when created as texture. */
|
||||
@@ -1458,7 +1458,7 @@ static void color_fill_test(void)
|
||||
{
|
||||
hr = IDirect3DDevice9_ColorFill(device, surface, &rect2, 0xdeadbeef);
|
||||
if (formats[i].flags & BLOCKS)
|
||||
- todo_wine ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x, fmt=%s.\n", hr, formats[i].name);
|
||||
+ ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x, fmt=%s.\n", hr, formats[i].name);
|
||||
else
|
||||
ok(SUCCEEDED(hr), "Failed to color fill, hr %#x, fmt=%s.\n", hr, formats[i].name);
|
||||
}
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 80a9322224..c30dfbc898 100644
|
||||
index 80a9322224..04dac9b4ed 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -68,6 +68,7 @@ enum wined3d_cs_op
|
||||
@@ -63,7 +40,7 @@ index 80a9322224..c30dfbc898 100644
|
||||
static void wined3d_cs_exec_sync(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
}
|
||||
@@ -1952,6 +1965,41 @@ void wined3d_cs_emit_push_constants(struct wined3d_cs *cs, enum wined3d_push_con
|
||||
@@ -1952,6 +1965,38 @@ void wined3d_cs_emit_push_constants(struct wined3d_cs *cs, enum wined3d_push_con
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@@ -72,10 +49,7 @@ index 80a9322224..c30dfbc898 100644
|
||||
+ const struct wined3d_cs_clear_rtv *op = data;
|
||||
+ struct wined3d_device *device = cs->device;
|
||||
+
|
||||
+ if (op->flags & WINED3DCLEAR_TARGET)
|
||||
+ op->blitter->color_fill(device, op->view, &op->rect, &op->color);
|
||||
+ else
|
||||
+ op->blitter->depth_fill(device, op->view, &op->rect, op->flags, op->depth, op->stencil);
|
||||
+ op->blitter->blitter_clear(device, op->view, &op->rect, op->flags, &op->color, op->depth, op->stencil);
|
||||
+
|
||||
+ wined3d_resource_release(op->view->resource);
|
||||
+}
|
||||
@@ -105,7 +79,7 @@ index 80a9322224..c30dfbc898 100644
|
||||
static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_SYNC */ wined3d_cs_exec_sync,
|
||||
@@ -1996,6 +2044,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -1996,6 +2041,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_BLT_SUB_RESOURCE */ wined3d_cs_exec_blt_sub_resource,
|
||||
/* WINED3D_CS_OP_UPDATE_SUB_RESOURCE */ wined3d_cs_exec_update_sub_resource,
|
||||
/* WINED3D_CS_OP_PUSH_CONSTANTS */ wined3d_cs_exec_push_constants,
|
||||
@@ -114,27 +88,23 @@ index 80a9322224..c30dfbc898 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 9dc893bfeb..33c1451a99 100644
|
||||
index 1fa212fd33..e019982d29 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -4324,10 +4324,8 @@ HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *devi
|
||||
@@ -4324,7 +4324,7 @@ HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *devi
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
- if (blit_op == WINED3D_BLIT_OP_COLOR_FILL)
|
||||
- return blitter->color_fill(device, view, rect, color);
|
||||
- else
|
||||
- return blitter->depth_fill(device, view, rect, flags, depth, stencil);
|
||||
- blitter->blitter_clear(device, view, rect, flags, color, depth, stencil);
|
||||
+ wined3d_cs_emit_clear_rtv(device->cs, view, rect, flags, color, depth, stencil, blitter);
|
||||
+ return WINED3D_OK;
|
||||
}
|
||||
|
||||
struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(const struct wined3d_device *device,
|
||||
return WINED3D_OK;
|
||||
}
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 26df981c77..43cca136d1 100644
|
||||
index c0327d6ce2..87f111e1ab 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -3237,6 +3237,9 @@ void wined3d_cs_emit_blt_sub_resource(struct wined3d_cs *cs, struct wined3d_reso
|
||||
@@ -3235,6 +3235,9 @@ void wined3d_cs_emit_blt_sub_resource(struct wined3d_cs *cs, struct wined3d_reso
|
||||
const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *rects,
|
||||
DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil) DECLSPEC_HIDDEN;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 45ae4084e646d64789015cf7d78b1ca80c1a01b9 Mon Sep 17 00:00:00 2001
|
||||
From dbcafaa6d9d1c5e1ab39ea4e8afa970edce76e58 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
|
||||
@@ -26,7 +26,7 @@ index 1d0aedd7ce..d0297d38e3 100644
|
||||
current_context = NULL;
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index a2fecf1cd4..b9c206ef78 100644
|
||||
index 41d639c329..bb8eefaa19 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -18,6 +18,7 @@
|
||||
@@ -816,8 +816,8 @@ index a2fecf1cd4..b9c206ef78 100644
|
||||
{
|
||||
const struct wined3d_cs_clear_rtv *op = data;
|
||||
struct wined3d_device *device = cs->device;
|
||||
@@ -2031,6 +2123,8 @@ static void wined3d_cs_exec_clear_rtv(struct wined3d_cs *cs, const void *data)
|
||||
op->blitter->depth_fill(device, op->view, &op->rect, op->flags, op->depth, op->stencil);
|
||||
@@ -2028,6 +2120,8 @@ static void wined3d_cs_exec_clear_rtv(struct wined3d_cs *cs, const void *data)
|
||||
op->blitter->blitter_clear(device, op->view, &op->rect, op->flags, &op->color, op->depth, op->stencil);
|
||||
|
||||
wined3d_resource_release(op->view->resource);
|
||||
+
|
||||
@@ -825,7 +825,7 @@ index a2fecf1cd4..b9c206ef78 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarget_view *view,
|
||||
@@ -2055,7 +2149,7 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
|
||||
@@ -2052,7 +2146,7 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@@ -834,7 +834,7 @@ index a2fecf1cd4..b9c206ef78 100644
|
||||
{
|
||||
const struct wined3d_cs_update_texture *op = data;
|
||||
struct wined3d_context *context;
|
||||
@@ -2066,6 +2160,8 @@ static void wined3d_cs_exec_update_texture(struct wined3d_cs *cs, const void *da
|
||||
@@ -2063,6 +2157,8 @@ static void wined3d_cs_exec_update_texture(struct wined3d_cs *cs, const void *da
|
||||
|
||||
wined3d_resource_release(&op->src->resource);
|
||||
wined3d_resource_release(&op->dst->resource);
|
||||
@@ -843,7 +843,7 @@ index a2fecf1cd4..b9c206ef78 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_texture *src,
|
||||
@@ -2084,11 +2180,13 @@ void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_textur
|
||||
@@ -2081,11 +2177,13 @@ void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_textur
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@@ -858,7 +858,7 @@ index a2fecf1cd4..b9c206ef78 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_update_swap_interval(struct wined3d_cs *cs, struct wined3d_swapchain *swapchain)
|
||||
@@ -2102,7 +2200,7 @@ void wined3d_cs_emit_update_swap_interval(struct wined3d_cs *cs, struct wined3d_
|
||||
@@ -2099,7 +2197,7 @@ void wined3d_cs_emit_update_swap_interval(struct wined3d_cs *cs, struct wined3d_
|
||||
cs->ops->submit_and_wait(cs);
|
||||
}
|
||||
|
||||
@@ -867,7 +867,7 @@ index a2fecf1cd4..b9c206ef78 100644
|
||||
{
|
||||
const struct wined3d_cs_texture_add_dirty_region *op = data;
|
||||
struct wined3d_texture *texture = op->texture;
|
||||
@@ -2120,6 +2218,8 @@ static void wined3d_cs_exec_texture_add_dirty_region(struct wined3d_cs *cs, cons
|
||||
@@ -2117,6 +2215,8 @@ static void wined3d_cs_exec_texture_add_dirty_region(struct wined3d_cs *cs, cons
|
||||
context_release(context);
|
||||
|
||||
wined3d_resource_release(&texture->resource);
|
||||
@@ -876,7 +876,7 @@ index a2fecf1cd4..b9c206ef78 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_texture_add_dirty_region(struct wined3d_cs *cs,
|
||||
@@ -2141,7 +2241,7 @@ void wined3d_cs_emit_texture_add_dirty_region(struct wined3d_cs *cs,
|
||||
@@ -2138,7 +2238,7 @@ void wined3d_cs_emit_texture_add_dirty_region(struct wined3d_cs *cs,
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@@ -885,7 +885,7 @@ index a2fecf1cd4..b9c206ef78 100644
|
||||
{
|
||||
/* WINED3D_CS_OP_SYNC */ wined3d_cs_exec_sync,
|
||||
/* WINED3D_CS_OP_GLFINISH */ wined3d_cs_exec_glfinish,
|
||||
@@ -2243,6 +2343,201 @@ static const struct wined3d_cs_ops wined3d_cs_st_ops =
|
||||
@@ -2240,6 +2340,201 @@ static const struct wined3d_cs_ops wined3d_cs_st_ops =
|
||||
wined3d_cs_st_submit,
|
||||
};
|
||||
|
||||
@@ -1087,7 +1087,7 @@ index a2fecf1cd4..b9c206ef78 100644
|
||||
struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
|
||||
@@ -2272,12 +2567,41 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
@@ -2269,12 +2564,41 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -1130,7 +1130,7 @@ index a2fecf1cd4..b9c206ef78 100644
|
||||
HeapFree(GetProcessHeap(), 0, cs->data);
|
||||
HeapFree(GetProcessHeap(), 0, cs);
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 603bb27c6c..324219870b 100644
|
||||
index cb80c8521f..c6fb75ac12 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -1304,7 +1304,7 @@ UINT CDECL wined3d_device_get_available_texture_mem(const struct wined3d_device
|
||||
@@ -1173,7 +1173,7 @@ index 1ce5937f17..4ef747ca89 100644
|
||||
if (hkey) RegCloseKey( hkey );
|
||||
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index d2484ba2c0..7ce9ab2ad3 100644
|
||||
index 4de44297ea..be616e9701 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -390,6 +390,7 @@ struct wined3d_settings
|
||||
@@ -1184,7 +1184,7 @@ index d2484ba2c0..7ce9ab2ad3 100644
|
||||
};
|
||||
|
||||
extern struct wined3d_settings wined3d_settings DECLSPEC_HIDDEN;
|
||||
@@ -2806,11 +2807,6 @@ static inline void wined3d_resource_release(struct wined3d_resource *resource)
|
||||
@@ -2804,11 +2805,6 @@ static inline void wined3d_resource_release(struct wined3d_resource *resource)
|
||||
InterlockedDecrement(&resource->access_count);
|
||||
}
|
||||
|
||||
@@ -1196,7 +1196,7 @@ index d2484ba2c0..7ce9ab2ad3 100644
|
||||
void resource_cleanup(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *device,
|
||||
enum wined3d_resource_type type, const struct wined3d_format *format,
|
||||
@@ -3222,6 +3218,21 @@ enum wined3d_push_constants
|
||||
@@ -3220,6 +3216,21 @@ enum wined3d_push_constants
|
||||
WINED3D_PUSH_CONSTANTS_PS_B,
|
||||
};
|
||||
|
||||
@@ -1218,7 +1218,7 @@ index d2484ba2c0..7ce9ab2ad3 100644
|
||||
struct wined3d_cs_ops
|
||||
{
|
||||
void *(*require_space)(struct wined3d_cs *cs, size_t size);
|
||||
@@ -3239,9 +3250,21 @@ struct wined3d_cs
|
||||
@@ -3237,9 +3248,21 @@ struct wined3d_cs
|
||||
size_t data_size, start, end;
|
||||
void *data;
|
||||
|
||||
|
||||
@@ -8,33 +8,6 @@ Based on patches by:
|
||||
Stefan Dösinger <stefan@codeweavers.com>
|
||||
Stefan Dösinger <stefandoesinger@gmx.at>
|
||||
|
||||
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
|
||||
--- a/dlls/d3d9/tests/visual.c
|
||||
+++ b/dlls/d3d9/tests/visual.c
|
||||
@@ -1337,7 +1337,11 @@ static void color_fill_test(void)
|
||||
* result on Wine.
|
||||
* {D3DFMT_YUY2, "D3DFMT_YUY2", BLOCKS, 0},
|
||||
* {D3DFMT_UYVY, "D3DFMT_UYVY", BLOCKS, 0}, */
|
||||
+#if !defined(STAGING_CSMT)
|
||||
{D3DFMT_DXT1, "D3DFMT_DXT1", BLOCKS | TODO_FILL_RETURN, 0},
|
||||
+#else /* STAGING_CSMT */
|
||||
+ {D3DFMT_DXT1, "D3DFMT_DXT1", BLOCKS, 0},
|
||||
+#endif /* STAGING_CSMT */
|
||||
/* Vendor-specific formats like ATI2N are a non-issue here since they're not
|
||||
* supported as offscreen plain surfaces and do not support D3DUSAGE_RENDERTARGET
|
||||
* when created as texture. */
|
||||
@@ -1458,7 +1462,11 @@ static void color_fill_test(void)
|
||||
{
|
||||
hr = IDirect3DDevice9_ColorFill(device, surface, &rect2, 0xdeadbeef);
|
||||
if (formats[i].flags & BLOCKS)
|
||||
+#if !defined(STAGING_CSMT)
|
||||
todo_wine ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x, fmt=%s.\n", hr, formats[i].name);
|
||||
+#else /* STAGING_CSMT */
|
||||
+ ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x, fmt=%s.\n", hr, formats[i].name);
|
||||
+#endif /* STAGING_CSMT */
|
||||
else
|
||||
ok(SUCCEEDED(hr), "Failed to color fill, hr %#x, fmt=%s.\n", hr, formats[i].name);
|
||||
}
|
||||
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
--- a/dlls/wined3d/buffer.c
|
||||
+++ b/dlls/wined3d/buffer.c
|
||||
@@ -1485,12 +1458,12 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
const struct wined3d_cs_query_issue *op = data;
|
||||
struct wined3d_query *query = op->query;
|
||||
+#if !defined(STAGING_CSMT)
|
||||
+
|
||||
+ query->query_ops->query_issue(query, op->flags);
|
||||
+#else /* STAGING_CSMT */
|
||||
+ struct wined3d_context *context;
|
||||
|
||||
query->query_ops->query_issue(query, op->flags);
|
||||
+#else /* STAGING_CSMT */
|
||||
+ struct wined3d_context *context;
|
||||
+
|
||||
+ query->query_ops->query_issue(query, op->flags);
|
||||
+
|
||||
+ InterlockedDecrement(&query->pending);
|
||||
+
|
||||
@@ -1810,7 +1783,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
op->resource = resource;
|
||||
op->sub_resource_idx = sub_resource_idx;
|
||||
op->box = *box;
|
||||
@@ -1821,11 +2618,210 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
|
||||
@@ -1821,11 +2618,207 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
|
||||
|
||||
wined3d_resource_acquire(resource);
|
||||
|
||||
@@ -1884,10 +1857,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
+ const struct wined3d_cs_clear_rtv *op = data;
|
||||
+ struct wined3d_device *device = cs->device;
|
||||
+
|
||||
+ if (op->flags & WINED3DCLEAR_TARGET)
|
||||
+ op->blitter->color_fill(device, op->view, &op->rect, &op->color);
|
||||
+ else
|
||||
+ op->blitter->depth_fill(device, op->view, &op->rect, op->flags, op->depth, op->stencil);
|
||||
+ op->blitter->blitter_clear(device, op->view, &op->rect, op->flags, &op->color, op->depth, op->stencil);
|
||||
+
|
||||
+ wined3d_resource_release(op->view->resource);
|
||||
+
|
||||
@@ -2021,7 +1991,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
/* WINED3D_CS_OP_PRESENT */ wined3d_cs_exec_present,
|
||||
/* WINED3D_CS_OP_CLEAR */ wined3d_cs_exec_clear,
|
||||
/* WINED3D_CS_OP_DISPATCH */ wined3d_cs_exec_dispatch,
|
||||
@@ -1859,15 +2855,29 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -1859,15 +2852,29 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_RESET_STATE */ wined3d_cs_exec_reset_state,
|
||||
/* WINED3D_CS_OP_CALLBACK */ wined3d_cs_exec_callback,
|
||||
/* WINED3D_CS_OP_QUERY_ISSUE */ wined3d_cs_exec_query_issue,
|
||||
@@ -2051,7 +2021,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
if (size > (cs->data_size - cs->end))
|
||||
{
|
||||
@@ -1911,6 +2921,7 @@ static void wined3d_cs_st_submit(struct wined3d_cs *cs)
|
||||
@@ -1911,6 +2918,7 @@ static void wined3d_cs_st_submit(struct wined3d_cs *cs)
|
||||
HeapFree(GetProcessHeap(), 0, data);
|
||||
}
|
||||
|
||||
@@ -2059,7 +2029,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
static void wined3d_cs_st_push_constants(struct wined3d_cs *cs, enum wined3d_push_constants p,
|
||||
unsigned int start_idx, unsigned int count, const void *constants)
|
||||
{
|
||||
@@ -1951,15 +2962,271 @@ static void wined3d_cs_st_push_constants(struct wined3d_cs *cs, enum wined3d_pus
|
||||
@@ -1951,15 +2959,271 @@ static void wined3d_cs_st_push_constants(struct wined3d_cs *cs, enum wined3d_pus
|
||||
for (i = 0, context_count = device->context_count; i < context_count; ++i)
|
||||
{
|
||||
device->contexts[i]->constant_update_mask |= push_constant_info[p].mask;
|
||||
@@ -2090,14 +2060,14 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
+ {
|
||||
+ LeaveCriticalSection(&list->lock);
|
||||
+ return NULL;
|
||||
}
|
||||
+ }
|
||||
+ list_remove(head);
|
||||
+ LeaveCriticalSection(&list->lock);
|
||||
+ InterlockedDecrement(&list->count);
|
||||
+
|
||||
+ return LIST_ENTRY(head, struct wined3d_cs_block, entry);
|
||||
}
|
||||
|
||||
+}
|
||||
+
|
||||
+static void wined3d_cs_wait_event(struct wined3d_cs *cs)
|
||||
+{
|
||||
+ InterlockedExchange(&cs->waiting_for_event, TRUE);
|
||||
@@ -2119,9 +2089,9 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
+ {
|
||||
+ WaitForSingleObject(cs->event, INFINITE);
|
||||
+#endif /* STAGING_CSMT */
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
}
|
||||
}
|
||||
|
||||
+#if !defined(STAGING_CSMT)
|
||||
static const struct wined3d_cs_ops wined3d_cs_st_ops =
|
||||
{
|
||||
@@ -2331,7 +2301,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
|
||||
struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
{
|
||||
@@ -1990,12 +3257,57 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
@@ -1990,12 +3254,57 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -2785,23 +2755,19 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
}
|
||||
|
||||
if (!src_box)
|
||||
@@ -4322,10 +4518,15 @@ HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *devi
|
||||
@@ -4322,7 +4518,11 @@ HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *devi
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
+#if !defined(STAGING_CSMT)
|
||||
if (blit_op == WINED3D_BLIT_OP_COLOR_FILL)
|
||||
return blitter->color_fill(device, view, rect, color);
|
||||
else
|
||||
return blitter->depth_fill(device, view, rect, flags, depth, stencil);
|
||||
blitter->blitter_clear(device, view, rect, flags, color, depth, stencil);
|
||||
+#else /* STAGING_CSMT */
|
||||
+ wined3d_cs_emit_clear_rtv(device->cs, view, rect, flags, color, depth, stencil, blitter);
|
||||
+ return WINED3D_OK;
|
||||
+#endif /* STAGING_CSMT */
|
||||
}
|
||||
|
||||
struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(const struct wined3d_device *device,
|
||||
@@ -4897,7 +5098,11 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
return WINED3D_OK;
|
||||
}
|
||||
@@ -4896,7 +5096,11 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
{
|
||||
if (reset_state)
|
||||
hr = wined3d_device_create_primary_opengl_context(device);
|
||||
@@ -2813,7 +2779,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
}
|
||||
|
||||
/* All done. There is no need to reload resources or shaders, this will happen automatically on the
|
||||
@@ -5212,3 +5417,58 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
|
||||
@@ -5211,3 +5415,58 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
|
||||
else
|
||||
return CallWindowProcA(proc, window, message, wparam, lparam);
|
||||
}
|
||||
@@ -3502,7 +3468,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
};
|
||||
|
||||
struct wined3d_timestamp_query
|
||||
@@ -2604,6 +2614,16 @@ struct wined3d_state
|
||||
@@ -2602,6 +2612,16 @@ struct wined3d_state
|
||||
struct wined3d_rasterizer_state *rasterizer_state;
|
||||
};
|
||||
|
||||
@@ -3519,7 +3485,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
#define WINED3D_UNMAPPED_STAGE ~0u
|
||||
|
||||
/* Multithreaded flag. Removed from the public header to signal that
|
||||
@@ -2716,6 +2736,14 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
|
||||
@@ -2714,6 +2734,14 @@ 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;
|
||||
@@ -3534,7 +3500,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
|
||||
static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD state)
|
||||
{
|
||||
@@ -2791,11 +2819,13 @@ static inline void wined3d_resource_release(struct wined3d_resource *resource)
|
||||
@@ -2789,11 +2817,13 @@ static inline void wined3d_resource_release(struct wined3d_resource *resource)
|
||||
InterlockedDecrement(&resource->access_count);
|
||||
}
|
||||
|
||||
@@ -3548,7 +3514,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
void resource_cleanup(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *device,
|
||||
enum wined3d_resource_type type, const struct wined3d_format *format,
|
||||
@@ -2906,7 +2936,11 @@ struct wined3d_texture
|
||||
@@ -2904,7 +2934,11 @@ struct wined3d_texture
|
||||
|
||||
unsigned int map_count;
|
||||
DWORD locations;
|
||||
@@ -3560,7 +3526,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
} sub_resources[1];
|
||||
};
|
||||
|
||||
@@ -3207,6 +3241,7 @@ enum wined3d_push_constants
|
||||
@@ -3205,6 +3239,7 @@ enum wined3d_push_constants
|
||||
WINED3D_PUSH_CONSTANTS_PS_B,
|
||||
};
|
||||
|
||||
@@ -3568,7 +3534,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
struct wined3d_cs_ops
|
||||
{
|
||||
void *(*require_space)(struct wined3d_cs *cs, size_t size);
|
||||
@@ -3214,6 +3249,33 @@ struct wined3d_cs_ops
|
||||
@@ -3212,6 +3247,33 @@ struct wined3d_cs_ops
|
||||
void (*push_constants)(struct wined3d_cs *cs, enum wined3d_push_constants p,
|
||||
unsigned int start_idx, unsigned int count, const void *constants);
|
||||
};
|
||||
@@ -3602,7 +3568,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
|
||||
struct wined3d_cs
|
||||
{
|
||||
@@ -3224,8 +3286,31 @@ struct wined3d_cs
|
||||
@@ -3222,8 +3284,31 @@ struct wined3d_cs
|
||||
|
||||
size_t data_size, start, end;
|
||||
void *data;
|
||||
@@ -3634,7 +3600,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_destroy(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_destroy_object(struct wined3d_cs *cs,
|
||||
@@ -3236,15 +3321,30 @@ void wined3d_cs_emit_blt_sub_resource(struct wined3d_cs *cs, struct wined3d_reso
|
||||
@@ -3234,15 +3319,30 @@ void wined3d_cs_emit_blt_sub_resource(struct wined3d_cs *cs, struct wined3d_reso
|
||||
const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *rects,
|
||||
DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil) DECLSPEC_HIDDEN;
|
||||
@@ -3665,7 +3631,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
void wined3d_cs_emit_reset_state(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx,
|
||||
const struct wined3d_vec4 *plane) DECLSPEC_HIDDEN;
|
||||
@@ -3292,10 +3392,20 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
|
||||
@@ -3290,10 +3390,20 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
|
||||
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;
|
||||
@@ -3686,7 +3652,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
void wined3d_cs_init_object(struct wined3d_cs *cs,
|
||||
void (*callback)(void *object), void *object) DECLSPEC_HIDDEN;
|
||||
HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource, unsigned int sub_resource_idx,
|
||||
@@ -3303,12 +3413,14 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||
@@ -3301,12 +3411,14 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||
HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||
unsigned int sub_resource_idx) DECLSPEC_HIDDEN;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user