Rebase against b77688102a84e1c7b7278340c46f53db3e1cda00.

This commit is contained in:
Sebastian Lackner
2017-05-12 00:36:30 +02:00
parent d6c145fbf5
commit 975205155e
6 changed files with 68 additions and 99 deletions

View File

@@ -1,4 +1,4 @@
From 94cd7b33b2e9a1a60cda6f5e6b474b29065f1d83 Mon Sep 17 00:00:00 2001
From fa278e34bc45e98c041fa3ae2a9c003efa0667bb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 16 Apr 2016 18:18:54 +0200
Subject: wined3d: Add stubs for QUERY_TYPE_SO_STATISTICS and
@@ -7,15 +7,15 @@ Subject: wined3d: Add stubs for QUERY_TYPE_SO_STATISTICS and
---
dlls/d3d10core/tests/device.c | 4 +-
dlls/d3d11/tests/d3d11.c | 4 +-
dlls/wined3d/query.c | 94 +++++++++++++++++++++++++++++++++++++++++++
dlls/wined3d/query.c | 96 +++++++++++++++++++++++++++++++++++++++++++
include/wine/wined3d.h | 6 +++
4 files changed, 104 insertions(+), 4 deletions(-)
4 files changed, 106 insertions(+), 4 deletions(-)
diff --git a/dlls/d3d10core/tests/device.c b/dlls/d3d10core/tests/device.c
index 566529016b..8276f98873 100644
index e4ab7a4dfb..c1b74718b5 100644
--- a/dlls/d3d10core/tests/device.c
+++ b/dlls/d3d10core/tests/device.c
@@ -3660,8 +3660,8 @@ static void test_create_query(void)
@@ -3869,8 +3869,8 @@ static void test_create_query(void)
{D3D10_QUERY_TIMESTAMP_DISJOINT, FALSE, FALSE},
{D3D10_QUERY_PIPELINE_STATISTICS, FALSE, TRUE},
{D3D10_QUERY_OCCLUSION_PREDICATE, TRUE, FALSE},
@@ -27,10 +27,10 @@ index 566529016b..8276f98873 100644
ULONG refcount, expected_refcount;
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
index bba52b5d7b..e532ee28c8 100644
index 6626ea2065..ee38b26e00 100644
--- a/dlls/d3d11/tests/d3d11.c
+++ b/dlls/d3d11/tests/d3d11.c
@@ -4647,8 +4647,8 @@ static void test_create_query(void)
@@ -4588,8 +4588,8 @@ static void test_create_query(void)
{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_OCCLUSION_PREDICATE, D3D_FEATURE_LEVEL_10_0, TRUE, TRUE, FALSE},
@@ -42,10 +42,10 @@ index bba52b5d7b..e532ee28c8 100644
{D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM0, D3D_FEATURE_LEVEL_11_0, TRUE, FALSE, TRUE},
{D3D11_QUERY_SO_STATISTICS_STREAM1, D3D_FEATURE_LEVEL_11_0, FALSE, FALSE, TRUE},
diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
index 79e61763a0..95d735c05e 100644
index 3cfbd8431a..2bca60e7d4 100644
--- a/dlls/wined3d/query.c
+++ b/dlls/wined3d/query.c
@@ -293,6 +293,14 @@ static void wined3d_query_destroy_object(void *object)
@@ -294,6 +294,14 @@ static void wined3d_query_destroy_object(void *object)
{
HeapFree(GetProcessHeap(), 0, query);
}
@@ -60,7 +60,7 @@ index 79e61763a0..95d735c05e 100644
else
{
ERR("Query %p has invalid type %#x.\n", query, query->type);
@@ -633,6 +641,34 @@ static BOOL wined3d_timestamp_disjoint_query_ops_issue(struct wined3d_query *que
@@ -637,6 +645,34 @@ static BOOL wined3d_timestamp_disjoint_query_ops_issue(struct wined3d_query *que
return FALSE;
}
@@ -95,7 +95,7 @@ index 79e61763a0..95d735c05e 100644
static const struct wined3d_query_ops event_query_ops =
{
wined3d_event_query_ops_poll,
@@ -773,6 +809,58 @@ static HRESULT wined3d_timestamp_disjoint_query_create(struct wined3d_device *de
@@ -785,6 +821,60 @@ static HRESULT wined3d_timestamp_disjoint_query_create(struct wined3d_device *de
return WINED3D_OK;
}
@@ -106,7 +106,8 @@ index 79e61763a0..95d735c05e 100644
+};
+
+static HRESULT wined3d_statistics_query_create(struct wined3d_device *device,
+ enum wined3d_query_type type, void *parent, struct wined3d_query **query)
+ enum wined3d_query_type type, void *parent, const struct wined3d_parent_ops *parent_ops,
+ struct wined3d_query **query)
+{
+ static const struct wined3d_query_data_so_statistics statistics = { 1, 1 };
+ struct wined3d_query *object;
@@ -117,7 +118,7 @@ index 79e61763a0..95d735c05e 100644
+ return E_OUTOFMEMORY;
+
+ wined3d_query_init(object, device, type, &statistics,
+ sizeof(statistics), &statistics_query_ops, parent);
+ sizeof(statistics), &statistics_query_ops, parent, parent_ops);
+
+ TRACE("Created query %p.\n", object);
+ *query = object;
@@ -132,7 +133,8 @@ index 79e61763a0..95d735c05e 100644
+};
+
+static HRESULT wined3d_overflow_query_create(struct wined3d_device *device,
+ enum wined3d_query_type type, void *parent, struct wined3d_query **query)
+ enum wined3d_query_type type, void *parent, const struct wined3d_parent_ops *parent_ops,
+ struct wined3d_query **query)
+{
+ static const BOOL overflow = FALSE;
+ struct wined3d_query *object;
@@ -143,7 +145,7 @@ index 79e61763a0..95d735c05e 100644
+ return E_OUTOFMEMORY;
+
+ wined3d_query_init(object, device, type, &overflow,
+ sizeof(overflow), &overflow_query_ops, parent);
+ sizeof(overflow), &overflow_query_ops, parent, parent_ops);
+
+ TRACE("Created query %p.\n", object);
+ *query = object;
@@ -151,24 +153,24 @@ index 79e61763a0..95d735c05e 100644
+ return WINED3D_OK;
+}
+
HRESULT CDECL wined3d_query_create(struct wined3d_device *device,
enum wined3d_query_type type, void *parent, struct wined3d_query **query)
HRESULT CDECL wined3d_query_create(struct wined3d_device *device, enum wined3d_query_type type,
void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_query **query)
{
@@ -793,6 +881,12 @@ HRESULT CDECL wined3d_query_create(struct wined3d_device *device,
@@ -806,6 +896,12 @@ HRESULT CDECL wined3d_query_create(struct wined3d_device *device, enum wined3d_q
case WINED3D_QUERY_TYPE_TIMESTAMP_FREQ:
return wined3d_timestamp_disjoint_query_create(device, type, parent, query);
return wined3d_timestamp_disjoint_query_create(device, type, parent, parent_ops, query);
+ case WINED3D_QUERY_TYPE_SO_STATISTICS:
+ return wined3d_statistics_query_create(device, type, parent, query);
+ return wined3d_statistics_query_create(device, type, parent, parent_ops, query);
+
+ case WINED3D_QUERY_TYPE_SO_OVERFLOW:
+ return wined3d_overflow_query_create(device, type, parent, query);
+ return wined3d_overflow_query_create(device, type, parent, parent_ops, 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 1bf5a6c97b..30925d2ca3 100644
index 4c0f47dc33..993797d877 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -709,6 +709,12 @@ struct wined3d_query_data_timestamp_disjoint
@@ -185,5 +187,5 @@ index 1bf5a6c97b..30925d2ca3 100644
#define WINED3DISSUE_END (1u << 0)
#define WINED3DGETDATA_FLUSH (1u << 0)
--
2.11.0
2.12.2

View File

@@ -1,4 +1,4 @@
From 834cd708e0bc3ea23ea2a8b0c3563f9add49fcdd Mon Sep 17 00:00:00 2001
From 74ddf016c63387ed5bf4e94ee96ac82803747f4c 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.
@@ -6,15 +6,15 @@ 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 | 47 +++++++++++++++++++++++++++++++++++++++++++
dlls/wined3d/query.c | 48 +++++++++++++++++++++++++++++++++++++++++++
include/wine/wined3d.h | 15 ++++++++++++++
4 files changed, 64 insertions(+), 2 deletions(-)
4 files changed, 65 insertions(+), 2 deletions(-)
diff --git a/dlls/d3d10core/tests/device.c b/dlls/d3d10core/tests/device.c
index 8276f98873..12d690fb6d 100644
index c1b74718b5..957d7b5422 100644
--- a/dlls/d3d10core/tests/device.c
+++ b/dlls/d3d10core/tests/device.c
@@ -3658,7 +3658,7 @@ static void test_create_query(void)
@@ -3867,7 +3867,7 @@ static void test_create_query(void)
{D3D10_QUERY_OCCLUSION, FALSE, FALSE},
{D3D10_QUERY_TIMESTAMP, FALSE, FALSE},
{D3D10_QUERY_TIMESTAMP_DISJOINT, FALSE, FALSE},
@@ -24,10 +24,10 @@ index 8276f98873..12d690fb6d 100644
{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 e532ee28c8..97b1f2ce1b 100644
index ee38b26e00..23bd1eba00 100644
--- a/dlls/d3d11/tests/d3d11.c
+++ b/dlls/d3d11/tests/d3d11.c
@@ -4645,7 +4645,7 @@ static void test_create_query(void)
@@ -4586,7 +4586,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},
@@ -37,10 +37,10 @@ index e532ee28c8..97b1f2ce1b 100644
{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 95d735c05e..f1e0d680b9 100644
index 2bca60e7d4..3f9191b486 100644
--- a/dlls/wined3d/query.c
+++ b/dlls/wined3d/query.c
@@ -301,6 +301,10 @@ static void wined3d_query_destroy_object(void *object)
@@ -302,6 +302,10 @@ static void wined3d_query_destroy_object(void *object)
{
HeapFree(GetProcessHeap(), 0, query);
}
@@ -51,7 +51,7 @@ index 95d735c05e..f1e0d680b9 100644
else
{
ERR("Query %p has invalid type %#x.\n", query, query->type);
@@ -669,6 +673,20 @@ static BOOL wined3d_overflow_query_ops_issue(struct wined3d_query *query, DWORD
@@ -673,6 +677,20 @@ static BOOL wined3d_overflow_query_ops_issue(struct wined3d_query *query, DWORD
return FALSE;
}
@@ -72,7 +72,7 @@ index 95d735c05e..f1e0d680b9 100644
static const struct wined3d_query_ops event_query_ops =
{
wined3d_event_query_ops_poll,
@@ -861,6 +879,32 @@ static HRESULT wined3d_overflow_query_create(struct wined3d_device *device,
@@ -875,6 +893,33 @@ static HRESULT wined3d_overflow_query_create(struct wined3d_device *device,
return WINED3D_OK;
}
@@ -83,7 +83,8 @@ index 95d735c05e..f1e0d680b9 100644
+};
+
+static HRESULT wined3d_pipeline_query_create(struct wined3d_device *device,
+ enum wined3d_query_type type, void *parent, struct wined3d_query **query)
+ enum wined3d_query_type type, void *parent, const struct wined3d_parent_ops *parent_ops,
+ struct wined3d_query **query)
+{
+ static const struct wined3d_query_data_pipeline_statistics data;
+ struct wined3d_query *object;
@@ -94,7 +95,7 @@ index 95d735c05e..f1e0d680b9 100644
+ return E_OUTOFMEMORY;
+
+ wined3d_query_init(object, device, type, &data,
+ sizeof(data), &pipeline_query_ops, parent);
+ sizeof(data), &pipeline_query_ops, parent, parent_ops);
+
+ TRACE("Created query %p.\n", object);
+ *query = object;
@@ -102,21 +103,21 @@ index 95d735c05e..f1e0d680b9 100644
+ return WINED3D_OK;
+}
+
HRESULT CDECL wined3d_query_create(struct wined3d_device *device,
enum wined3d_query_type type, void *parent, struct wined3d_query **query)
HRESULT CDECL wined3d_query_create(struct wined3d_device *device, enum wined3d_query_type type,
void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_query **query)
{
@@ -887,6 +931,9 @@ HRESULT CDECL wined3d_query_create(struct wined3d_device *device,
@@ -902,6 +947,9 @@ HRESULT CDECL wined3d_query_create(struct wined3d_device *device, enum wined3d_q
case WINED3D_QUERY_TYPE_SO_OVERFLOW:
return wined3d_overflow_query_create(device, type, parent, query);
return wined3d_overflow_query_create(device, type, parent, parent_ops, query);
+ case WINED3D_QUERY_TYPE_PIPELINE_STATISTICS:
+ return wined3d_pipeline_query_create(device, type, parent, query);
+ return wined3d_pipeline_query_create(device, type, parent, parent_ops, 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 30925d2ca3..52db093676 100644
index 993797d877..b314ed9427 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -715,6 +715,21 @@ struct wined3d_query_data_so_statistics
@@ -142,5 +143,5 @@ index 30925d2ca3..52db093676 100644
#define WINED3DISSUE_END (1u << 0)
#define WINED3DGETDATA_FLUSH (1u << 0)
--
2.11.0
2.12.2