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
Removed various patches (accepted upstream).
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
From 17105a18c3e8a754e5158ff99e8ce367aed113ac Mon Sep 17 00:00:00 2001
|
||||
From 3c2152778b13105e423a33889692c3b12f58653b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Sat, 6 Jul 2013 19:18:48 +0200
|
||||
Subject: wined3d: Poll queries automatically in the CS
|
||||
|
||||
---
|
||||
dlls/wined3d/cs.c | 76 ++++++--------
|
||||
dlls/wined3d/query.c | 225 ++++++++++++++++++++++++++---------------
|
||||
dlls/wined3d/query.c | 221 ++++++++++++++++++++++++++---------------
|
||||
dlls/wined3d/wined3d_private.h | 7 +-
|
||||
3 files changed, 180 insertions(+), 128 deletions(-)
|
||||
3 files changed, 178 insertions(+), 126 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index d182150..cb969a0 100644
|
||||
index d97ef5b..8256707 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -68,7 +68,6 @@ enum wined3d_cs_op
|
||||
@@ -69,7 +69,6 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_RESOURCE_MAP,
|
||||
WINED3D_CS_OP_RESOURCE_UNMAP,
|
||||
WINED3D_CS_OP_QUERY_ISSUE,
|
||||
@@ -21,7 +21,7 @@ index d182150..cb969a0 100644
|
||||
WINED3D_CS_OP_STOP,
|
||||
};
|
||||
|
||||
@@ -373,16 +372,6 @@ struct wined3d_cs_query_issue
|
||||
@@ -383,16 +382,6 @@ struct wined3d_cs_query_issue
|
||||
DWORD flags;
|
||||
};
|
||||
|
||||
@@ -38,7 +38,7 @@ index d182150..cb969a0 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);
|
||||
@@ -1712,8 +1701,9 @@ static UINT wined3d_cs_exec_query_issue(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1822,8 +1811,9 @@ static UINT wined3d_cs_exec_query_issue(struct wined3d_cs *cs, const void *data)
|
||||
|
||||
query->query_ops->query_issue(query, op->flags);
|
||||
|
||||
@@ -50,7 +50,7 @@ index d182150..cb969a0 100644
|
||||
|
||||
return sizeof(*op);
|
||||
}
|
||||
@@ -1730,37 +1720,6 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
|
||||
@@ -1840,37 +1830,6 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ index d182150..cb969a0 100644
|
||||
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
|
||||
@@ -1807,7 +1766,6 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -1918,7 +1877,6 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_RESOURCE_MAP */ wined3d_cs_exec_resource_map,
|
||||
/* WINED3D_CS_OP_RESOURCE_UNMAP */ wined3d_cs_exec_resource_unmap,
|
||||
/* WINED3D_CS_OP_QUERY_ISSUE */ wined3d_cs_exec_query_issue,
|
||||
@@ -96,7 +96,7 @@ index d182150..cb969a0 100644
|
||||
};
|
||||
|
||||
static void *wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size)
|
||||
@@ -1922,17 +1880,45 @@ void wined3d_cs_switch_onscreen_ds(struct wined3d_cs *cs,
|
||||
@@ -2033,17 +1991,45 @@ void wined3d_cs_switch_onscreen_ds(struct wined3d_cs *cs,
|
||||
wined3d_surface_incref(cs->onscreen_depth_stencil);
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ index d182150..cb969a0 100644
|
||||
{
|
||||
continue;
|
||||
diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
|
||||
index 098197b..dffad6f 100644
|
||||
index 9bdb35e..9f1f5ad 100644
|
||||
--- a/dlls/wined3d/query.c
|
||||
+++ b/dlls/wined3d/query.c
|
||||
@@ -241,6 +241,15 @@ ULONG CDECL wined3d_query_decref(struct wined3d_query *query)
|
||||
@@ -406,10 +406,10 @@ index 098197b..dffad6f 100644
|
||||
GLuint available;
|
||||
GLuint64 timestamp;
|
||||
- HRESULT res;
|
||||
-
|
||||
- TRACE("query %p, data %p, size %#x, flags %#x.\n", query, data, size, flags);
|
||||
+ BOOL ret;
|
||||
|
||||
- TRACE("query %p, data %p, size %#x, flags %#x.\n", query, data, size, flags);
|
||||
-
|
||||
- if (!tq->context)
|
||||
- query->state = QUERY_CREATED;
|
||||
-
|
||||
@@ -468,24 +468,14 @@ index 098197b..dffad6f 100644
|
||||
}
|
||||
|
||||
static void wined3d_timestamp_query_ops_issue(struct wined3d_query *query, DWORD flags)
|
||||
@@ -657,15 +709,14 @@ static HRESULT wined3d_timestamp_disjoint_query_ops_get_data(struct wined3d_quer
|
||||
@@ -657,7 +709,6 @@ static HRESULT wined3d_timestamp_disjoint_query_ops_get_data(struct wined3d_quer
|
||||
void *data, DWORD size, DWORD flags)
|
||||
{
|
||||
TRACE("query %p, data %p, size %#x, flags %#x.\n", query, data, size, flags);
|
||||
-
|
||||
if (query->type == WINED3D_QUERY_TYPE_TIMESTAMP_DISJOINT)
|
||||
{
|
||||
static const struct wined3d_query_data_timestamp_disjoint disjoint_data = {FALSE, 1000 * 1000 * 1000};
|
||||
|
||||
if (query->state == QUERY_BUILDING)
|
||||
{
|
||||
- TRACE("Query is building, returning S_FALSE.\n");
|
||||
- return S_FALSE;
|
||||
+ TRACE("Query is building, returning S_FALSE.\n");
|
||||
+ return S_FALSE;
|
||||
}
|
||||
|
||||
fill_query_data(data, size, &disjoint_data, sizeof(disjoint_data));
|
||||
static const struct wined3d_query_data_timestamp_disjoint disjoint_data = {1000 * 1000 * 1000, FALSE};
|
||||
@@ -679,6 +730,11 @@ static HRESULT wined3d_timestamp_disjoint_query_ops_get_data(struct wined3d_quer
|
||||
return S_OK;
|
||||
}
|
||||
@@ -536,10 +526,10 @@ index 098197b..dffad6f 100644
|
||||
return WINED3D_OK;
|
||||
}
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index cabc227..936ed73 100644
|
||||
index 56d9b0c..4c4ee51 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -1079,6 +1079,7 @@ struct wined3d_occlusion_query
|
||||
@@ -1090,6 +1090,7 @@ struct wined3d_occlusion_query
|
||||
struct list entry;
|
||||
GLuint id;
|
||||
struct wined3d_context *context;
|
||||
@@ -547,7 +537,7 @@ index cabc227..936ed73 100644
|
||||
};
|
||||
|
||||
union wined3d_gl_query_object
|
||||
@@ -1114,6 +1115,7 @@ struct wined3d_timestamp_query
|
||||
@@ -1125,6 +1126,7 @@ struct wined3d_timestamp_query
|
||||
struct list entry;
|
||||
GLuint id;
|
||||
struct wined3d_context *context;
|
||||
@@ -555,7 +545,7 @@ index cabc227..936ed73 100644
|
||||
};
|
||||
|
||||
void context_alloc_timestamp_query(struct wined3d_context *context, struct wined3d_timestamp_query *query) DECLSPEC_HIDDEN;
|
||||
@@ -2586,6 +2588,7 @@ struct wined3d_cs
|
||||
@@ -2610,6 +2612,7 @@ struct wined3d_cs
|
||||
struct wined3d_cs_queue queue;
|
||||
|
||||
LONG pending_presents;
|
||||
@@ -563,7 +553,7 @@ index cabc227..936ed73 100644
|
||||
};
|
||||
|
||||
struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device) DECLSPEC_HIDDEN;
|
||||
@@ -2679,6 +2682,7 @@ enum query_state {
|
||||
@@ -2705,6 +2708,7 @@ enum query_state {
|
||||
struct wined3d_query_ops
|
||||
{
|
||||
HRESULT (*query_get_data)(struct wined3d_query *query, void *data, DWORD data_size, DWORD flags);
|
||||
@@ -571,7 +561,7 @@ index cabc227..936ed73 100644
|
||||
void (*query_issue)(struct wined3d_query *query, DWORD flags);
|
||||
};
|
||||
|
||||
@@ -2694,7 +2698,8 @@ struct wined3d_query
|
||||
@@ -2720,7 +2724,8 @@ struct wined3d_query
|
||||
DWORD data_size;
|
||||
void *extendedData;
|
||||
|
||||
@@ -582,5 +572,5 @@ index cabc227..936ed73 100644
|
||||
|
||||
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
|
||||
--
|
||||
2.2.2
|
||||
2.3.7
|
||||
|
||||
|
||||
@@ -2773,10 +2773,10 @@ diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
@@ -711,6 +948,26 @@
|
||||
{
|
||||
TRACE("Query is building, returning S_FALSE.\n");
|
||||
return S_FALSE;
|
||||
@@ -703,6 +940,18 @@
|
||||
void *data, DWORD size, DWORD flags)
|
||||
{
|
||||
TRACE("query %p, data %p, size %#x, flags %#x.\n", query, data, size, flags);
|
||||
+#else /* STAGING_CSMT */
|
||||
+ query->state = QUERY_SIGNALLED;
|
||||
+
|
||||
@@ -2788,19 +2788,11 @@ diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
|
||||
+{
|
||||
+ TRACE("query %p, data %p, size %#x, flags %#x.\n", query, data, size, flags);
|
||||
+
|
||||
+ if (query->type == WINED3D_QUERY_TYPE_TIMESTAMP_DISJOINT)
|
||||
+ {
|
||||
+ static const struct wined3d_query_data_timestamp_disjoint disjoint_data = {FALSE, 1000 * 1000 * 1000};
|
||||
+
|
||||
+ if (query->state == QUERY_BUILDING)
|
||||
+ {
|
||||
+ TRACE("Query is building, returning S_FALSE.\n");
|
||||
+ return S_FALSE;
|
||||
+#endif /* STAGING_CSMT */
|
||||
}
|
||||
|
||||
fill_query_data(data, size, &disjoint_data, sizeof(disjoint_data));
|
||||
@@ -724,6 +981,7 @@
|
||||
if (query->type == WINED3D_QUERY_TYPE_TIMESTAMP_DISJOINT)
|
||||
{
|
||||
static const struct wined3d_query_data_timestamp_disjoint disjoint_data = {1000 * 1000 * 1000, FALSE};
|
||||
@@ -724,6 +973,7 @@
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -2808,7 +2800,7 @@ diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
|
||||
static BOOL wined3d_timestamp_disjoint_query_ops_poll(struct wined3d_query *query)
|
||||
{
|
||||
return TRUE;
|
||||
@@ -760,6 +1018,41 @@
|
||||
@@ -760,6 +1010,41 @@
|
||||
{
|
||||
wined3d_timestamp_disjoint_query_ops_get_data,
|
||||
wined3d_timestamp_disjoint_query_ops_poll,
|
||||
@@ -2850,7 +2842,7 @@ diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
|
||||
wined3d_timestamp_disjoint_query_ops_issue,
|
||||
};
|
||||
|
||||
@@ -781,6 +1074,7 @@
|
||||
@@ -781,6 +1066,7 @@
|
||||
}
|
||||
query->query_ops = &occlusion_query_ops;
|
||||
query->data_size = sizeof(DWORD);
|
||||
@@ -2858,7 +2850,7 @@ diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
|
||||
query->extendedData = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
|
||||
sizeof(struct wined3d_occlusion_query));
|
||||
if (!query->extendedData)
|
||||
@@ -788,6 +1082,15 @@
|
||||
@@ -788,6 +1074,15 @@
|
||||
ERR("Failed to allocate occlusion query extended data.\n");
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
@@ -2874,7 +2866,7 @@ diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
|
||||
break;
|
||||
|
||||
case WINED3D_QUERY_TYPE_EVENT:
|
||||
@@ -860,7 +1163,9 @@
|
||||
@@ -860,7 +1155,9 @@
|
||||
query->state = QUERY_CREATED;
|
||||
query->device = device;
|
||||
query->ref = 1;
|
||||
|
||||
Reference in New Issue
Block a user