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 ba2e025b94fa3705d439803a545129c32e8818af.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From 148ec0e10734a650f5c8988d5c173eb7e98e9449 Mon Sep 17 00:00:00 2001
|
||||
From 40dce808e5579bd12a4a31eb93c0499000ae5f00 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 | 99 +++++++++++++++++++++++++++++++++++++++++++
|
||||
dlls/wined3d/query.c | 90 +++++++++++++++++++++++++++++++++++++++++++
|
||||
include/wine/wined3d.h | 6 +++
|
||||
4 files changed, 109 insertions(+), 4 deletions(-)
|
||||
4 files changed, 100 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d10core/tests/device.c b/dlls/d3d10core/tests/device.c
|
||||
index 9b3a943..fb1ec06 100644
|
||||
index f3c4ac8..d3ddef7 100644
|
||||
--- a/dlls/d3d10core/tests/device.c
|
||||
+++ b/dlls/d3d10core/tests/device.c
|
||||
@@ -3491,8 +3491,8 @@ static void test_create_query(void)
|
||||
@@ -3539,8 +3539,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 9b3a943..fb1ec06 100644
|
||||
|
||||
ULONG refcount, expected_refcount;
|
||||
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
|
||||
index df45eb5..4c65997 100644
|
||||
index 276f58f..648dc05 100644
|
||||
--- a/dlls/d3d11/tests/d3d11.c
|
||||
+++ b/dlls/d3d11/tests/d3d11.c
|
||||
@@ -4486,8 +4486,8 @@ static void test_create_query(void)
|
||||
@@ -4525,8 +4525,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 df45eb5..4c65997 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 591d6c5..2d1da66 100644
|
||||
index 55e63e9..aca5d85 100644
|
||||
--- a/dlls/wined3d/query.c
|
||||
+++ b/dlls/wined3d/query.c
|
||||
@@ -293,6 +293,14 @@ static void wined3d_query_destroy_object(void *object)
|
||||
@@ -295,6 +295,14 @@ static void wined3d_query_destroy_object(void *object)
|
||||
{
|
||||
HeapFree(GetProcessHeap(), 0, query);
|
||||
}
|
||||
@@ -60,62 +60,51 @@ index 591d6c5..2d1da66 100644
|
||||
else
|
||||
{
|
||||
ERR("Query %p has invalid type %#x.\n", query, query->type);
|
||||
@@ -686,6 +694,42 @@ static HRESULT wined3d_timestamp_disjoint_query_ops_issue(struct wined3d_query *
|
||||
return WINED3D_OK;
|
||||
@@ -601,6 +609,30 @@ static void wined3d_timestamp_disjoint_query_ops_issue(struct wined3d_query *que
|
||||
TRACE("query %p, flags %#x.\n", query, flags);
|
||||
}
|
||||
|
||||
+static HRESULT wined3d_statistics_query_ops_get_data(struct wined3d_query *query,
|
||||
+ void *data, DWORD size, DWORD flags)
|
||||
+static BOOL wined3d_statistics_query_ops_poll(struct wined3d_query *query)
|
||||
+{
|
||||
+ static const struct wined3d_query_data_so_statistics statistics = { 1, 1 };
|
||||
+ TRACE("query %p.\n", query);
|
||||
+
|
||||
+ FIXME("query %p, data %p, size %#x, flags %#x.\n", query, data, size, flags);
|
||||
+
|
||||
+ if (!data || !size) return S_OK;
|
||||
+ fill_query_data(data, size, &statistics, sizeof(statistics));
|
||||
+ return S_OK;
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
+static HRESULT wined3d_statistics_query_ops_issue(struct wined3d_query *query, DWORD flags)
|
||||
+static void wined3d_statistics_query_ops_issue(struct wined3d_query *query, DWORD flags)
|
||||
+{
|
||||
+ FIXME("query %p, flags %#x.\n", query, flags);
|
||||
+ return WINED3D_OK;
|
||||
+}
|
||||
+
|
||||
+static HRESULT wined3d_overflow_query_ops_get_data(struct wined3d_query *query,
|
||||
+ void *data, DWORD size, DWORD flags)
|
||||
+static HRESULT wined3d_overflow_query_ops_poll(struct wined3d_query *query)
|
||||
+{
|
||||
+ static const BOOL overflow = FALSE;
|
||||
+ TRACE("query %p.\n", query);
|
||||
+
|
||||
+ FIXME("query %p, data %p, size %#x, flags %#x.\n", query, data, size, flags);
|
||||
+
|
||||
+ if (!data || !size) return S_OK;
|
||||
+ fill_query_data(data, size, &overflow, sizeof(overflow));
|
||||
+ return S_OK;
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
+static HRESULT wined3d_overflow_query_ops_issue(struct wined3d_query *query, DWORD flags)
|
||||
+static void wined3d_overflow_query_ops_issue(struct wined3d_query *query, DWORD flags)
|
||||
+{
|
||||
+ FIXME("query %p, flags %#x.\n", query, flags);
|
||||
+ return WINED3D_OK;
|
||||
+}
|
||||
+
|
||||
static const struct wined3d_query_ops event_query_ops =
|
||||
{
|
||||
wined3d_event_query_ops_get_data,
|
||||
@@ -814,6 +858,55 @@ static HRESULT wined3d_timestamp_disjoint_query_create(struct wined3d_device *de
|
||||
wined3d_event_query_ops_poll,
|
||||
@@ -741,6 +773,58 @@ static HRESULT wined3d_timestamp_disjoint_query_create(struct wined3d_device *de
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
+static const struct wined3d_query_ops statistics_query_ops =
|
||||
+{
|
||||
+ wined3d_statistics_query_ops_get_data,
|
||||
+ wined3d_statistics_query_ops_poll,
|
||||
+ wined3d_statistics_query_ops_issue,
|
||||
+};
|
||||
+
|
||||
+static HRESULT wined3d_statistics_query_create(struct wined3d_device *device,
|
||||
+ enum wined3d_query_type type, void *parent, struct wined3d_query **query)
|
||||
+{
|
||||
+ static const struct wined3d_query_data_so_statistics statistics = { 1, 1 };
|
||||
+ struct wined3d_query *object;
|
||||
+
|
||||
+ FIXME("device %p, type %#x, parent %p, query %p.\n", device, type, parent, query);
|
||||
@@ -123,8 +112,8 @@ index 591d6c5..2d1da66 100644
|
||||
+ if (!(object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object))))
|
||||
+ return E_OUTOFMEMORY;
|
||||
+
|
||||
+ wined3d_query_init(object, device, type,
|
||||
+ sizeof(struct wined3d_query_data_so_statistics), &statistics_query_ops, parent);
|
||||
+ wined3d_query_init(object, device, type, &statistics,
|
||||
+ sizeof(statistics), &statistics_query_ops, parent);
|
||||
+
|
||||
+ TRACE("Created query %p.\n", object);
|
||||
+ *query = object;
|
||||
@@ -134,13 +123,14 @@ index 591d6c5..2d1da66 100644
|
||||
+
|
||||
+static const struct wined3d_query_ops overflow_query_ops =
|
||||
+{
|
||||
+ wined3d_overflow_query_ops_get_data,
|
||||
+ wined3d_overflow_query_ops_poll,
|
||||
+ wined3d_overflow_query_ops_issue,
|
||||
+};
|
||||
+
|
||||
+static HRESULT wined3d_overflow_query_create(struct wined3d_device *device,
|
||||
+ enum wined3d_query_type type, void *parent, struct wined3d_query **query)
|
||||
+{
|
||||
+ static const BOOL overflow = FALSE;
|
||||
+ struct wined3d_query *object;
|
||||
+
|
||||
+ FIXME("device %p, type %#x, parent %p, query %p.\n", device, type, parent, query);
|
||||
@@ -148,7 +138,8 @@ index 591d6c5..2d1da66 100644
|
||||
+ if (!(object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object))))
|
||||
+ return E_OUTOFMEMORY;
|
||||
+
|
||||
+ wined3d_query_init(object, device, type, sizeof(BOOL), &overflow_query_ops, parent);
|
||||
+ wined3d_query_init(object, device, type, &overflow,
|
||||
+ sizeof(overflow), &overflow_query_ops, parent);
|
||||
+
|
||||
+ TRACE("Created query %p.\n", object);
|
||||
+ *query = object;
|
||||
@@ -159,7 +150,7 @@ index 591d6c5..2d1da66 100644
|
||||
HRESULT CDECL wined3d_query_create(struct wined3d_device *device,
|
||||
enum wined3d_query_type type, void *parent, struct wined3d_query **query)
|
||||
{
|
||||
@@ -834,6 +927,12 @@ HRESULT CDECL wined3d_query_create(struct wined3d_device *device,
|
||||
@@ -761,6 +845,12 @@ HRESULT CDECL wined3d_query_create(struct wined3d_device *device,
|
||||
case WINED3D_QUERY_TYPE_TIMESTAMP_FREQ:
|
||||
return wined3d_timestamp_disjoint_query_create(device, type, parent, query);
|
||||
|
||||
@@ -173,10 +164,10 @@ index 591d6c5..2d1da66 100644
|
||||
FIXME("Unhandled query type %#x.\n", type);
|
||||
return WINED3DERR_NOTAVAILABLE;
|
||||
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
|
||||
index 36de1de..468ce98 100644
|
||||
index cd2dd3b..10b1ec2 100644
|
||||
--- a/include/wine/wined3d.h
|
||||
+++ b/include/wine/wined3d.h
|
||||
@@ -700,6 +700,12 @@ struct wined3d_query_data_timestamp_disjoint
|
||||
@@ -702,6 +702,12 @@ struct wined3d_query_data_timestamp_disjoint
|
||||
BOOL disjoint;
|
||||
};
|
||||
|
||||
@@ -190,5 +181,5 @@ index 36de1de..468ce98 100644
|
||||
#define WINED3DISSUE_END (1u << 0)
|
||||
#define WINED3DGETDATA_FLUSH (1u << 0)
|
||||
--
|
||||
2.8.0
|
||||
2.9.0
|
||||
|
||||
|
Reference in New Issue
Block a user