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
Added patch to implement stub for QUERY_TYPE_PIPELINE_STATISTICS.
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
From 2551a777dc1ef94ae39b1ce075d1a347198886f4 Mon Sep 17 00:00:00 2001
|
||||
From 1b670fb5de110f6e498aa9f86112be78752569b2 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Wed, 24 Jul 2013 17:27:35 +0200
|
||||
Subject: wined3d: Don't poll queries that failed to start
|
||||
|
||||
---
|
||||
dlls/wined3d/cs.c | 5 +++--
|
||||
dlls/wined3d/query.c | 25 +++++++++++++++++++------
|
||||
dlls/wined3d/query.c | 28 +++++++++++++++++++++-------
|
||||
dlls/wined3d/wined3d_private.h | 2 +-
|
||||
3 files changed, 23 insertions(+), 9 deletions(-)
|
||||
3 files changed, 25 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 68a5c3a6fcf..35b0ce2e7b9 100644
|
||||
@@ -28,10 +28,10 @@ index 68a5c3a6fcf..35b0ce2e7b9 100644
|
||||
list_add_tail(&cs->query_poll_list, &query->poll_list_entry);
|
||||
|
||||
diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
|
||||
index e1ca7e7e01a..5fa7f4cd83d 100644
|
||||
index b86a336ec48..8f8fe113fbe 100644
|
||||
--- a/dlls/wined3d/query.c
|
||||
+++ b/dlls/wined3d/query.c
|
||||
@@ -479,7 +479,7 @@ enum wined3d_query_type CDECL wined3d_query_get_type(const struct wined3d_query
|
||||
@@ -483,7 +483,7 @@ enum wined3d_query_type CDECL wined3d_query_get_type(const struct wined3d_query
|
||||
return query->type;
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ index e1ca7e7e01a..5fa7f4cd83d 100644
|
||||
{
|
||||
TRACE("query %p, flags %#x.\n", query, flags);
|
||||
|
||||
@@ -488,20 +488,23 @@ static void wined3d_event_query_ops_issue(struct wined3d_query *query, DWORD fla
|
||||
@@ -492,20 +492,23 @@ static void wined3d_event_query_ops_issue(struct wined3d_query *query, DWORD fla
|
||||
struct wined3d_event_query *event_query = wined3d_event_query_from_query(query);
|
||||
|
||||
wined3d_event_query_issue(event_query, query->device);
|
||||
@@ -65,7 +65,7 @@ index e1ca7e7e01a..5fa7f4cd83d 100644
|
||||
|
||||
TRACE("query %p, flags %#x.\n", query, flags);
|
||||
|
||||
@@ -563,7 +566,10 @@ static void wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DWORD
|
||||
@@ -567,7 +570,10 @@ static void wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DWORD
|
||||
}
|
||||
}
|
||||
oq->started = FALSE;
|
||||
@@ -76,7 +76,7 @@ index e1ca7e7e01a..5fa7f4cd83d 100644
|
||||
}
|
||||
|
||||
static BOOL wined3d_timestamp_query_ops_poll(struct wined3d_query *query, DWORD flags)
|
||||
@@ -604,7 +610,7 @@ static BOOL wined3d_timestamp_query_ops_poll(struct wined3d_query *query, DWORD
|
||||
@@ -608,7 +614,7 @@ static BOOL wined3d_timestamp_query_ops_poll(struct wined3d_query *query, DWORD
|
||||
return available;
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ index e1ca7e7e01a..5fa7f4cd83d 100644
|
||||
{
|
||||
struct wined3d_timestamp_query *tq = wined3d_timestamp_query_from_query(query);
|
||||
const struct wined3d_gl_info *gl_info;
|
||||
@@ -627,6 +633,10 @@ static void wined3d_timestamp_query_ops_issue(struct wined3d_query *query, DWORD
|
||||
@@ -631,6 +637,10 @@ static void wined3d_timestamp_query_ops_issue(struct wined3d_query *query, DWORD
|
||||
checkGLcall("glQueryCounter()");
|
||||
context_release(context);
|
||||
}
|
||||
@@ -96,7 +96,7 @@ index e1ca7e7e01a..5fa7f4cd83d 100644
|
||||
}
|
||||
|
||||
static BOOL wined3d_timestamp_disjoint_query_ops_poll(struct wined3d_query *query, DWORD flags)
|
||||
@@ -636,9 +646,10 @@ static BOOL wined3d_timestamp_disjoint_query_ops_poll(struct wined3d_query *quer
|
||||
@@ -640,9 +650,10 @@ static BOOL wined3d_timestamp_disjoint_query_ops_poll(struct wined3d_query *quer
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ index e1ca7e7e01a..5fa7f4cd83d 100644
|
||||
}
|
||||
|
||||
static BOOL wined3d_statistics_query_ops_poll(struct wined3d_query *query, DWORD flags)
|
||||
@@ -648,9 +659,10 @@ static BOOL wined3d_statistics_query_ops_poll(struct wined3d_query *query, DWORD
|
||||
@@ -652,9 +663,10 @@ static BOOL wined3d_statistics_query_ops_poll(struct wined3d_query *query, DWORD
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ index e1ca7e7e01a..5fa7f4cd83d 100644
|
||||
}
|
||||
|
||||
static HRESULT wined3d_overflow_query_ops_poll(struct wined3d_query *query, DWORD flags)
|
||||
@@ -660,9 +672,10 @@ static HRESULT wined3d_overflow_query_ops_poll(struct wined3d_query *query, DWOR
|
||||
@@ -664,9 +676,10 @@ static HRESULT wined3d_overflow_query_ops_poll(struct wined3d_query *query, DWOR
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -131,9 +131,21 @@ index e1ca7e7e01a..5fa7f4cd83d 100644
|
||||
+ return FALSE;
|
||||
}
|
||||
|
||||
static HRESULT wined3d_pipeline_query_ops_poll(struct wined3d_query *query, DWORD flags)
|
||||
@@ -676,9 +689,10 @@ static HRESULT wined3d_pipeline_query_ops_poll(struct wined3d_query *query, DWOR
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
-static void wined3d_pipeline_query_ops_issue(struct wined3d_query *query, DWORD flags)
|
||||
+static BOOL wined3d_pipeline_query_ops_issue(struct wined3d_query *query, DWORD flags)
|
||||
{
|
||||
FIXME("query %p, flags %#x.\n", query, flags);
|
||||
+ return FALSE;
|
||||
}
|
||||
|
||||
static const struct wined3d_query_ops event_query_ops =
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 9e8b8ad14c5..aac56fe1848 100644
|
||||
index 4cebe279d94..ef474b4f883 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -1440,7 +1440,7 @@ enum wined3d_query_state
|
||||
|
||||
@@ -5707,7 +5707,7 @@ diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
|
||||
/* Queries are specific to the GL context that created them. Not
|
||||
* deleting the query will obviously leak it, but that's still better
|
||||
* than potentially deleting a different query with the same id in this
|
||||
@@ -338,9 +346,25 @@ HRESULT CDECL wined3d_query_get_data(struct wined3d_query *query,
|
||||
@@ -342,9 +350,25 @@ HRESULT CDECL wined3d_query_get_data(struct wined3d_query *query,
|
||||
}
|
||||
|
||||
if (query->state == QUERY_CREATED)
|
||||
@@ -5733,7 +5733,7 @@ diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
|
||||
|
||||
if (data)
|
||||
memcpy(data, query->data, min(data_size, query->data_size));
|
||||
@@ -359,6 +383,11 @@ HRESULT CDECL wined3d_query_issue(struct wined3d_query *query, DWORD flags)
|
||||
@@ -363,6 +387,11 @@ HRESULT CDECL wined3d_query_issue(struct wined3d_query *query, DWORD flags)
|
||||
{
|
||||
TRACE("query %p, flags %#x.\n", query, flags);
|
||||
|
||||
@@ -5745,7 +5745,7 @@ diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
|
||||
wined3d_cs_emit_query_issue(query->device->cs, query, flags);
|
||||
|
||||
if (flags & WINED3DISSUE_BEGIN)
|
||||
@@ -462,7 +491,11 @@ enum wined3d_query_type CDECL wined3d_query_get_type(const struct wined3d_query
|
||||
@@ -466,7 +495,11 @@ enum wined3d_query_type CDECL wined3d_query_get_type(const struct wined3d_query
|
||||
return query->type;
|
||||
}
|
||||
|
||||
@@ -5757,7 +5757,7 @@ diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
|
||||
{
|
||||
TRACE("query %p, flags %#x.\n", query, flags);
|
||||
|
||||
@@ -471,20 +504,33 @@ static void wined3d_event_query_ops_issue(struct wined3d_query *query, DWORD fla
|
||||
@@ -475,20 +508,33 @@ static void wined3d_event_query_ops_issue(struct wined3d_query *query, DWORD fla
|
||||
struct wined3d_event_query *event_query = wined3d_event_query_from_query(query);
|
||||
|
||||
wined3d_event_query_issue(event_query, query->device);
|
||||
@@ -5791,7 +5791,7 @@ diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
|
||||
|
||||
TRACE("query %p, flags %#x.\n", query, flags);
|
||||
|
||||
@@ -492,7 +538,11 @@ static void wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DWORD
|
||||
@@ -496,7 +542,11 @@ static void wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DWORD
|
||||
* restart. */
|
||||
if (flags & WINED3DISSUE_BEGIN)
|
||||
{
|
||||
@@ -5803,7 +5803,7 @@ diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
|
||||
{
|
||||
if (oq->context->tid != GetCurrentThreadId())
|
||||
{
|
||||
@@ -522,13 +572,20 @@ static void wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DWORD
|
||||
@@ -526,13 +576,20 @@ static void wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DWORD
|
||||
checkGLcall("glBeginQuery()");
|
||||
|
||||
context_release(context);
|
||||
@@ -5824,7 +5824,7 @@ diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
|
||||
{
|
||||
if (oq->context->tid != GetCurrentThreadId())
|
||||
{
|
||||
@@ -542,9 +599,19 @@ static void wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DWORD
|
||||
@@ -546,9 +603,19 @@ static void wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DWORD
|
||||
checkGLcall("glEndQuery()");
|
||||
|
||||
context_release(context);
|
||||
@@ -5844,7 +5844,7 @@ diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
|
||||
}
|
||||
|
||||
static BOOL wined3d_timestamp_query_ops_poll(struct wined3d_query *query, DWORD flags)
|
||||
@@ -585,7 +652,11 @@ static BOOL wined3d_timestamp_query_ops_poll(struct wined3d_query *query, DWORD
|
||||
@@ -589,7 +656,11 @@ static BOOL wined3d_timestamp_query_ops_poll(struct wined3d_query *query, DWORD
|
||||
return available;
|
||||
}
|
||||
|
||||
@@ -5856,7 +5856,7 @@ diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
|
||||
{
|
||||
struct wined3d_timestamp_query *tq = wined3d_timestamp_query_from_query(query);
|
||||
const struct wined3d_gl_info *gl_info;
|
||||
@@ -608,6 +679,12 @@ static void wined3d_timestamp_query_ops_issue(struct wined3d_query *query, DWORD
|
||||
@@ -612,6 +683,12 @@ static void wined3d_timestamp_query_ops_issue(struct wined3d_query *query, DWORD
|
||||
checkGLcall("glQueryCounter()");
|
||||
context_release(context);
|
||||
}
|
||||
@@ -5869,7 +5869,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, DWORD flags)
|
||||
@@ -617,9 +694,16 @@ static BOOL wined3d_timestamp_disjoint_query_ops_poll(struct wined3d_query *quer
|
||||
@@ -621,9 +698,16 @@ static BOOL wined3d_timestamp_disjoint_query_ops_poll(struct wined3d_query *quer
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -5886,7 +5886,7 @@ diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
|
||||
}
|
||||
|
||||
static BOOL wined3d_statistics_query_ops_poll(struct wined3d_query *query, DWORD flags)
|
||||
@@ -629,9 +713,16 @@ static BOOL wined3d_statistics_query_ops_poll(struct wined3d_query *query, DWORD
|
||||
@@ -633,9 +717,16 @@ static BOOL wined3d_statistics_query_ops_poll(struct wined3d_query *query, DWORD
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -5903,7 +5903,7 @@ diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
|
||||
}
|
||||
|
||||
static HRESULT wined3d_overflow_query_ops_poll(struct wined3d_query *query, DWORD flags)
|
||||
@@ -641,9 +732,16 @@ static HRESULT wined3d_overflow_query_ops_poll(struct wined3d_query *query, DWOR
|
||||
@@ -645,9 +736,16 @@ static HRESULT wined3d_overflow_query_ops_poll(struct wined3d_query *query, DWOR
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -5919,6 +5919,23 @@ diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
|
||||
+#endif /* STAGING_CSMT */
|
||||
}
|
||||
|
||||
static HRESULT wined3d_pipeline_query_ops_poll(struct wined3d_query *query, DWORD flags)
|
||||
@@ -657,9 +755,16 @@ static HRESULT wined3d_pipeline_query_ops_poll(struct wined3d_query *query, DWOR
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
+#if !defined(STAGING_CSMT)
|
||||
static void wined3d_pipeline_query_ops_issue(struct wined3d_query *query, DWORD flags)
|
||||
{
|
||||
FIXME("query %p, flags %#x.\n", query, flags);
|
||||
+#else /* STAGING_CSMT */
|
||||
+static BOOL wined3d_pipeline_query_ops_issue(struct wined3d_query *query, DWORD flags)
|
||||
+{
|
||||
+ FIXME("query %p, flags %#x.\n", query, flags);
|
||||
+ return FALSE;
|
||||
+#endif /* STAGING_CSMT */
|
||||
}
|
||||
|
||||
static const struct wined3d_query_ops event_query_ops =
|
||||
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
|
||||
--- a/dlls/wined3d/resource.c
|
||||
@@ -9523,7 +9540,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
|
||||
--- a/include/wine/wined3d.h
|
||||
+++ b/include/wine/wined3d.h
|
||||
@@ -871,6 +871,7 @@ enum wined3d_format_support
|
||||
@@ -886,6 +886,7 @@ enum wined3d_format_support
|
||||
|
||||
#define WINED3DDP_MAXTEXCOORD 8
|
||||
|
||||
@@ -9531,7 +9548,7 @@ diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
|
||||
#define WINED3D_BIND_VERTEX_BUFFER 0x00000001
|
||||
#define WINED3D_BIND_INDEX_BUFFER 0x00000002
|
||||
#define WINED3D_BIND_CONSTANT_BUFFER 0x00000004
|
||||
@@ -880,6 +881,7 @@ enum wined3d_format_support
|
||||
@@ -895,6 +896,7 @@ enum wined3d_format_support
|
||||
#define WINED3D_BIND_DEPTH_STENCIL 0x00000040
|
||||
#define WINED3D_BIND_UNORDERED_ACCESS 0x00000080
|
||||
|
||||
|
||||
Reference in New Issue
Block a user