mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
Added patch to implement stub for QUERY_TYPE_PIPELINE_STATISTICS.
This commit is contained in:
parent
5e623ee4d9
commit
5cd91c5928
@ -8443,8 +8443,10 @@ fi
|
||||
# |
|
||||
if test "$enable_wined3d_QUERY_Stubs" -eq 1; then
|
||||
patch_apply wined3d-QUERY_Stubs/0001-wined3d-Add-stubs-for-QUERY_TYPE_SO_STATISTICS-and-Q.patch
|
||||
patch_apply wined3d-QUERY_Stubs/0002-d3d11-Add-dummy-support-for-D3D11_QUERY_PIPELINE_STA.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Michael Müller", "wined3d: Add stubs for QUERY_TYPE_SO_STATISTICS and QUERY_TYPE_SO_OVERFLOW.", 1 },';
|
||||
printf '%s\n' '+ { "Michael Müller", "d3d11: Add dummy support for D3D11_QUERY_PIPELINE_STATISTICS query.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -0,0 +1,144 @@
|
||||
From d02a092f2e480b6ca82273de0a50534c5cb7d42f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sun, 22 Jan 2017 01:51:51 +0100
|
||||
Subject: d3d11: Add dummy support for D3D11_QUERY_PIPELINE_STATISTICS query.
|
||||
|
||||
---
|
||||
dlls/d3d10core/tests/device.c | 2 +-
|
||||
dlls/d3d11/tests/d3d11.c | 2 +-
|
||||
dlls/wined3d/query.c | 45 +++++++++++++++++++++++++++++++++++++++++++
|
||||
include/wine/wined3d.h | 15 +++++++++++++++
|
||||
4 files changed, 62 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d10core/tests/device.c b/dlls/d3d10core/tests/device.c
|
||||
index 6c87a979ba6..be915a8ff86 100644
|
||||
--- a/dlls/d3d10core/tests/device.c
|
||||
+++ b/dlls/d3d10core/tests/device.c
|
||||
@@ -3604,7 +3604,7 @@ static void test_create_query(void)
|
||||
{D3D10_QUERY_OCCLUSION, FALSE, FALSE},
|
||||
{D3D10_QUERY_TIMESTAMP, FALSE, FALSE},
|
||||
{D3D10_QUERY_TIMESTAMP_DISJOINT, FALSE, FALSE},
|
||||
- {D3D10_QUERY_PIPELINE_STATISTICS, FALSE, TRUE},
|
||||
+ {D3D10_QUERY_PIPELINE_STATISTICS, FALSE, FALSE},
|
||||
{D3D10_QUERY_OCCLUSION_PREDICATE, TRUE, FALSE},
|
||||
{D3D10_QUERY_SO_STATISTICS, FALSE, FALSE},
|
||||
{D3D10_QUERY_SO_OVERFLOW_PREDICATE, TRUE, FALSE},
|
||||
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
|
||||
index 9d8d827b306..fbbede8dd79 100644
|
||||
--- a/dlls/d3d11/tests/d3d11.c
|
||||
+++ b/dlls/d3d11/tests/d3d11.c
|
||||
@@ -4564,7 +4564,7 @@ static void test_create_query(void)
|
||||
{D3D11_QUERY_OCCLUSION, D3D_FEATURE_LEVEL_10_0, FALSE, FALSE, FALSE},
|
||||
{D3D11_QUERY_TIMESTAMP, D3D_FEATURE_LEVEL_10_0, FALSE, FALSE, FALSE},
|
||||
{D3D11_QUERY_TIMESTAMP_DISJOINT, D3D_FEATURE_LEVEL_10_0, FALSE, FALSE, FALSE},
|
||||
- {D3D11_QUERY_PIPELINE_STATISTICS, D3D_FEATURE_LEVEL_10_0, FALSE, FALSE, TRUE},
|
||||
+ {D3D11_QUERY_PIPELINE_STATISTICS, D3D_FEATURE_LEVEL_10_0, FALSE, FALSE, FALSE},
|
||||
{D3D11_QUERY_OCCLUSION_PREDICATE, D3D_FEATURE_LEVEL_10_0, TRUE, TRUE, FALSE},
|
||||
{D3D11_QUERY_SO_STATISTICS, D3D_FEATURE_LEVEL_10_0, FALSE, FALSE, FALSE},
|
||||
{D3D11_QUERY_SO_OVERFLOW_PREDICATE, D3D_FEATURE_LEVEL_10_0, TRUE, TRUE, FALSE},
|
||||
diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
|
||||
index c5ca37d4878..23a07a9e09c 100644
|
||||
--- a/dlls/wined3d/query.c
|
||||
+++ b/dlls/wined3d/query.c
|
||||
@@ -304,6 +304,10 @@ static void wined3d_query_destroy_object(void *object)
|
||||
{
|
||||
HeapFree(GetProcessHeap(), 0, query);
|
||||
}
|
||||
+ else if (query->type == WINED3D_QUERY_TYPE_PIPELINE_STATISTICS)
|
||||
+ {
|
||||
+ HeapFree(GetProcessHeap(), 0, query);
|
||||
+ }
|
||||
else
|
||||
{
|
||||
ERR("Query %p has invalid type %#x.\n", query, query->type);
|
||||
@@ -646,6 +650,18 @@ static void wined3d_overflow_query_ops_issue(struct wined3d_query *query, DWORD
|
||||
FIXME("query %p, flags %#x.\n", query, flags);
|
||||
}
|
||||
|
||||
+static HRESULT wined3d_pipeline_query_ops_poll(struct wined3d_query *query, DWORD flags)
|
||||
+{
|
||||
+ TRACE("query %p, flags %#x.\n", query, flags);
|
||||
+
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
+static void wined3d_pipeline_query_ops_issue(struct wined3d_query *query, DWORD flags)
|
||||
+{
|
||||
+ FIXME("query %p, flags %#x.\n", query, flags);
|
||||
+}
|
||||
+
|
||||
static const struct wined3d_query_ops event_query_ops =
|
||||
{
|
||||
wined3d_event_query_ops_poll,
|
||||
@@ -838,6 +854,32 @@ static HRESULT wined3d_overflow_query_create(struct wined3d_device *device,
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
+static const struct wined3d_query_ops pipeline_query_ops =
|
||||
+{
|
||||
+ wined3d_pipeline_query_ops_poll,
|
||||
+ wined3d_pipeline_query_ops_issue,
|
||||
+};
|
||||
+
|
||||
+static HRESULT wined3d_pipeline_query_create(struct wined3d_device *device,
|
||||
+ enum wined3d_query_type type, void *parent, struct wined3d_query **query)
|
||||
+{
|
||||
+ static const struct wined3d_query_data_pipeline_statistics data;
|
||||
+ struct wined3d_query *object;
|
||||
+
|
||||
+ FIXME("device %p, type %#x, parent %p, query %p.\n", device, type, parent, query);
|
||||
+
|
||||
+ if (!(object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object))))
|
||||
+ return E_OUTOFMEMORY;
|
||||
+
|
||||
+ wined3d_query_init(object, device, type, &data,
|
||||
+ sizeof(data), &pipeline_query_ops, parent);
|
||||
+
|
||||
+ TRACE("Created query %p.\n", object);
|
||||
+ *query = object;
|
||||
+
|
||||
+ return WINED3D_OK;
|
||||
+}
|
||||
+
|
||||
HRESULT CDECL wined3d_query_create(struct wined3d_device *device,
|
||||
enum wined3d_query_type type, void *parent, struct wined3d_query **query)
|
||||
{
|
||||
@@ -864,6 +906,9 @@ HRESULT CDECL wined3d_query_create(struct wined3d_device *device,
|
||||
case WINED3D_QUERY_TYPE_SO_OVERFLOW:
|
||||
return wined3d_overflow_query_create(device, type, parent, query);
|
||||
|
||||
+ case WINED3D_QUERY_TYPE_PIPELINE_STATISTICS:
|
||||
+ return wined3d_pipeline_query_create(device, type, parent, query);
|
||||
+
|
||||
default:
|
||||
FIXME("Unhandled query type %#x.\n", type);
|
||||
return WINED3DERR_NOTAVAILABLE;
|
||||
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
|
||||
index 0357bfda6d8..2625cf5a879 100644
|
||||
--- a/include/wine/wined3d.h
|
||||
+++ b/include/wine/wined3d.h
|
||||
@@ -711,6 +711,21 @@ struct wined3d_query_data_so_statistics
|
||||
UINT64 needed;
|
||||
};
|
||||
|
||||
+struct wined3d_query_data_pipeline_statistics
|
||||
+{
|
||||
+ UINT64 ia_vertices;
|
||||
+ UINT64 ia_primitives;
|
||||
+ UINT64 vs_invocations;
|
||||
+ UINT64 gs_invocations;
|
||||
+ UINT64 gs_primitives;
|
||||
+ UINT64 c_invocations;
|
||||
+ UINT64 c_primitives;
|
||||
+ UINT64 ps_invocations;
|
||||
+ UINT64 hs_invocations;
|
||||
+ UINT64 ds_invocations;
|
||||
+ UINT64 cs_invocations;
|
||||
+};
|
||||
+
|
||||
#define WINED3DISSUE_BEGIN (1u << 1)
|
||||
#define WINED3DISSUE_END (1u << 0)
|
||||
#define WINED3DGETDATA_FLUSH (1u << 0)
|
||||
--
|
||||
2.11.0
|
||||
|
@ -1 +1,2 @@
|
||||
Fixes: [20776] Add stubs for QUERY_TYPE_SO_STATISTICS and QUERY_TYPE_SO_OVERFLOW
|
||||
Fixes: Add stub for QUERY_TYPE_PIPELINE_STATISTICS
|
||||
|
Loading…
Reference in New Issue
Block a user