mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
Rebase against b77688102a84e1c7b7278340c46f53db3e1cda00.
This commit is contained in:
parent
d6c145fbf5
commit
975205155e
@ -52,7 +52,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "0647abc5071913506e681bfc5239f9a6078dca54"
|
||||
echo "b77688102a84e1c7b7278340c46f53db3e1cda00"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
|
@ -1,26 +1,19 @@
|
||||
From b1a406bab0b46ba9b97081b1a7689d33d6147435 Mon Sep 17 00:00:00 2001
|
||||
From 9c3480193d90c7553b03b3d61cc9db4c08aeffbc Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sun, 19 Feb 2017 00:57:12 +0100
|
||||
Subject: wined3d: Add additional synchronization CS ops.
|
||||
|
||||
---
|
||||
dlls/wined3d/cs.c | 9 +++++----
|
||||
dlls/wined3d/cs.c | 1 +
|
||||
dlls/wined3d/view.c | 6 ++++++
|
||||
dlls/wined3d/wined3d_main.c | 2 +-
|
||||
3 files changed, 12 insertions(+), 5 deletions(-)
|
||||
3 files changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 7331f31dd3..5c444b29bc 100644
|
||||
index fd6968634b..a2d4885167 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -2554,17 +2554,18 @@ fail:
|
||||
|
||||
void wined3d_cs_destroy(struct wined3d_cs *cs)
|
||||
{
|
||||
- state_cleanup(&cs->state);
|
||||
- HeapFree(GetProcessHeap(), 0, cs->fb.render_targets);
|
||||
- HeapFree(GetProcessHeap(), 0, cs->data);
|
||||
-
|
||||
@@ -2557,6 +2557,7 @@ void wined3d_cs_destroy(struct wined3d_cs *cs)
|
||||
if (cs->thread)
|
||||
{
|
||||
wined3d_cs_emit_stop(cs);
|
||||
@ -28,14 +21,6 @@ index 7331f31dd3..5c444b29bc 100644
|
||||
CloseHandle(cs->thread);
|
||||
if (!CloseHandle(cs->event))
|
||||
ERR("Closing event failed.\n");
|
||||
}
|
||||
|
||||
+ state_cleanup(&cs->state);
|
||||
+ HeapFree(GetProcessHeap(), 0, cs->fb.render_targets);
|
||||
+ HeapFree(GetProcessHeap(), 0, cs->data);
|
||||
+
|
||||
HeapFree(GetProcessHeap(), 0, cs);
|
||||
}
|
||||
diff --git a/dlls/wined3d/view.c b/dlls/wined3d/view.c
|
||||
index 0a458803a7..0184b21cdb 100644
|
||||
--- a/dlls/wined3d/view.c
|
||||
|
@ -812,16 +812,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
TRACE("Stopped.\n");
|
||||
FreeLibraryAndExitThread(cs->wined3d_module, 0);
|
||||
}
|
||||
@@ -2554,17 +2859,28 @@ fail:
|
||||
|
||||
void wined3d_cs_destroy(struct wined3d_cs *cs)
|
||||
{
|
||||
+#if !defined(STAGING_CSMT)
|
||||
state_cleanup(&cs->state);
|
||||
HeapFree(GetProcessHeap(), 0, cs->fb.render_targets);
|
||||
HeapFree(GetProcessHeap(), 0, cs->data);
|
||||
|
||||
+#endif /* STAGING_CSMT */
|
||||
@@ -2557,6 +2862,9 @@ void wined3d_cs_destroy(struct wined3d_cs *cs)
|
||||
if (cs->thread)
|
||||
{
|
||||
wined3d_cs_emit_stop(cs);
|
||||
@ -831,16 +822,6 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
CloseHandle(cs->thread);
|
||||
if (!CloseHandle(cs->event))
|
||||
ERR("Closing event failed.\n");
|
||||
}
|
||||
|
||||
+#if defined(STAGING_CSMT)
|
||||
+ state_cleanup(&cs->state);
|
||||
+ HeapFree(GetProcessHeap(), 0, cs->fb.render_targets);
|
||||
+ HeapFree(GetProcessHeap(), 0, cs->data);
|
||||
+
|
||||
+#endif /* STAGING_CSMT */
|
||||
HeapFree(GetProcessHeap(), 0, cs);
|
||||
}
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@ -854,7 +835,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
wined3d_device_delete_opengl_contexts(device);
|
||||
|
||||
if (device->fb.depth_stencil)
|
||||
@@ -4229,6 +4232,7 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
|
||||
@@ -4230,6 +4233,7 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@ -862,7 +843,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
if (dst_texture->sub_resources[dst_sub_resource_idx].map_count)
|
||||
{
|
||||
WARN("Destination sub-resource %u is mapped.\n", dst_sub_resource_idx);
|
||||
@@ -4239,6 +4243,19 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
|
||||
@@ -4240,6 +4244,19 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
|
||||
{
|
||||
WARN("Source sub-resource %u is mapped.\n", src_sub_resource_idx);
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
@ -882,7 +863,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
}
|
||||
|
||||
if (!src_box)
|
||||
@@ -5272,3 +5289,58 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
|
||||
@@ -5273,3 +5290,58 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
|
||||
else
|
||||
return CallWindowProcA(proc, window, message, wparam, lparam);
|
||||
}
|
||||
@ -1291,7 +1272,7 @@ diff --git a/dlls/wined3d/wined3d_main.c b/dlls/wined3d/wined3d_main.c
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2649,6 +2649,16 @@ struct wined3d_state
|
||||
@@ -2650,6 +2650,16 @@ struct wined3d_state
|
||||
struct wined3d_rasterizer_state *rasterizer_state;
|
||||
};
|
||||
|
||||
@ -1308,7 +1289,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
#define WINED3D_UNMAPPED_STAGE ~0u
|
||||
|
||||
/* Multithreaded flag. Removed from the public header to signal that
|
||||
@@ -2760,6 +2770,12 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
|
||||
@@ -2761,6 +2771,12 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
|
||||
void device_resource_add(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
void device_resource_released(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
void device_invalidate_state(const struct wined3d_device *device, DWORD state) DECLSPEC_HIDDEN;
|
||||
@ -1321,7 +1302,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
|
||||
static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD state)
|
||||
{
|
||||
@@ -2946,7 +2962,11 @@ struct wined3d_texture
|
||||
@@ -2947,7 +2963,11 @@ struct wined3d_texture
|
||||
|
||||
unsigned int map_count;
|
||||
DWORD locations;
|
||||
@ -1333,7 +1314,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
} sub_resources[1];
|
||||
};
|
||||
|
||||
@@ -3254,7 +3274,12 @@ struct wined3d_cs_queue
|
||||
@@ -3255,7 +3275,12 @@ struct wined3d_cs_queue
|
||||
|
||||
struct wined3d_cs_ops
|
||||
{
|
||||
@ -1346,7 +1327,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
void (*submit)(struct wined3d_cs *cs);
|
||||
void (*finish)(struct wined3d_cs *cs);
|
||||
void (*push_constants)(struct wined3d_cs *cs, enum wined3d_push_constants p,
|
||||
@@ -3271,7 +3296,13 @@ struct wined3d_cs
|
||||
@@ -3272,7 +3297,13 @@ struct wined3d_cs
|
||||
HANDLE thread;
|
||||
DWORD thread_id;
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 7b9c1fda3cbebc0d87518458bd41c59a045bb02e Mon Sep 17 00:00:00 2001
|
||||
From 719070152c6e0a17b7ab6c916298c8d5b221d68e Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Tue, 25 Apr 2017 06:01:04 +0000
|
||||
Subject: wined3d: Avoid crash if context_reacquire is called with NULL
|
||||
@ -18,10 +18,10 @@ Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
2 files changed, 58 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
|
||||
index 30450d88f6d..a2d79478e50 100644
|
||||
index bdb13b9db5..33e0268c98 100644
|
||||
--- a/dlls/d3d11/tests/d3d11.c
|
||||
+++ b/dlls/d3d11/tests/d3d11.c
|
||||
@@ -18402,6 +18402,62 @@ done:
|
||||
@@ -17947,6 +17947,62 @@ static void test_fractional_viewports(void)
|
||||
release_test_context(&test_context);
|
||||
}
|
||||
|
||||
@ -84,17 +84,17 @@ index 30450d88f6d..a2d79478e50 100644
|
||||
START_TEST(d3d11)
|
||||
{
|
||||
test_create_device();
|
||||
@@ -18493,4 +18549,5 @@ START_TEST(d3d11)
|
||||
test_fl10_stream_output_desc();
|
||||
@@ -18037,4 +18093,5 @@ START_TEST(d3d11)
|
||||
test_stream_output_resume();
|
||||
test_gather();
|
||||
test_fractional_viewports();
|
||||
+ test_destroyed_context_query_poll();
|
||||
}
|
||||
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
index b6e8096fffb..27bff98be45 100644
|
||||
index 5a899e56d1..76f0fdcc2b 100644
|
||||
--- a/dlls/wined3d/context.c
|
||||
+++ b/dlls/wined3d/context.c
|
||||
@@ -3987,7 +3987,7 @@ struct wined3d_context *context_reacquire(const struct wined3d_device *device,
|
||||
@@ -3968,7 +3968,7 @@ struct wined3d_context *context_reacquire(const struct wined3d_device *device,
|
||||
{
|
||||
struct wined3d_context *current_context;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user