You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-04-13 14:42:51 -07:00
Rebase against ba2e025b94fa3705d439803a545129c32e8818af.
This commit is contained in:
@@ -51,7 +51,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "2337c50ed769f2078257283f82aa7e696b452324"
|
||||
echo "ba2e025b94fa3705d439803a545129c32e8818af"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
@@ -7311,16 +7311,13 @@ if test "$enable_wined3d_CSMT_Main" -eq 1; then
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Replace the linked lists with a ringbuffer.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Don'\''t preload buffers on unmap.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Don'\''t call glFinish before swapping.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Wined3d_*_query_issue never fails.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Add query support to the command stream.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Check our CS state to find out if a query is done.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Poll queries automatically in the CS.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Introduce a separate queue for priority commands.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Destroy queries through the CS.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Separate main and worker thread query state.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Don'\''t poll queries that failed to start.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Remove restated queries from the poll list.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Don'\''t reset the query state if it doesn'\''t have a ctx.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Put this into the query poll patch.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Send texture preloads through the CS.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Don'\''t access device state in clears.", 1 },';
|
||||
|
@@ -1,131 +0,0 @@
|
||||
From 52053fbf98485763b27e2fd9e4dacd62187e5643 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Sat, 6 Jul 2013 18:15:00 +0200
|
||||
Subject: wined3d: wined3d_*_query_issue never fails
|
||||
|
||||
---
|
||||
dlls/wined3d/query.c | 25 +++++++++----------------
|
||||
dlls/wined3d/wined3d_private.h | 2 +-
|
||||
2 files changed, 10 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
|
||||
index ef93d3b..09c8657 100644
|
||||
--- a/dlls/wined3d/query.c
|
||||
+++ b/dlls/wined3d/query.c
|
||||
@@ -327,7 +327,8 @@ HRESULT CDECL wined3d_query_issue(struct wined3d_query *query, DWORD flags)
|
||||
{
|
||||
TRACE("query %p, flags %#x.\n", query, flags);
|
||||
|
||||
- return query->query_ops->query_issue(query, flags);
|
||||
+ query->query_ops->query_issue(query, flags);
|
||||
+ return WINED3D_OK;
|
||||
}
|
||||
|
||||
static void fill_query_data(void *out, unsigned int out_size, const void *result, unsigned int result_size)
|
||||
@@ -456,7 +457,7 @@ enum wined3d_query_type CDECL wined3d_query_get_type(const struct wined3d_query
|
||||
return query->type;
|
||||
}
|
||||
|
||||
-static HRESULT wined3d_event_query_ops_issue(struct wined3d_query *query, DWORD flags)
|
||||
+static void wined3d_event_query_ops_issue(struct wined3d_query *query, DWORD flags)
|
||||
{
|
||||
TRACE("query %p, flags %#x.\n", query, flags);
|
||||
|
||||
@@ -476,11 +477,9 @@ static HRESULT wined3d_event_query_ops_issue(struct wined3d_query *query, DWORD
|
||||
query->state = QUERY_BUILDING;
|
||||
else
|
||||
query->state = QUERY_SIGNALLED;
|
||||
-
|
||||
- return WINED3D_OK;
|
||||
}
|
||||
|
||||
-static HRESULT wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DWORD flags)
|
||||
+static void wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DWORD flags)
|
||||
{
|
||||
struct wined3d_occlusion_query *oq = wined3d_occlusion_query_from_query(query);
|
||||
struct wined3d_device *device = query->device;
|
||||
@@ -552,7 +551,7 @@ static HRESULT wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DW
|
||||
else
|
||||
query->state = QUERY_SIGNALLED;
|
||||
|
||||
- return WINED3D_OK; /* can be WINED3DERR_INVALIDCALL. */
|
||||
+ return;
|
||||
}
|
||||
|
||||
static HRESULT wined3d_timestamp_query_ops_get_data(struct wined3d_query *query,
|
||||
@@ -615,7 +614,7 @@ static HRESULT wined3d_timestamp_query_ops_get_data(struct wined3d_query *query,
|
||||
return res;
|
||||
}
|
||||
|
||||
-static HRESULT wined3d_timestamp_query_ops_issue(struct wined3d_query *query, DWORD flags)
|
||||
+static void wined3d_timestamp_query_ops_issue(struct wined3d_query *query, DWORD flags)
|
||||
{
|
||||
struct wined3d_timestamp_query *tq = wined3d_timestamp_query_from_query(query);
|
||||
struct wined3d_device *device = query->device;
|
||||
@@ -640,8 +639,6 @@ static HRESULT wined3d_timestamp_query_ops_issue(struct wined3d_query *query, DW
|
||||
|
||||
query->state = QUERY_SIGNALLED;
|
||||
}
|
||||
-
|
||||
- return WINED3D_OK;
|
||||
}
|
||||
|
||||
static HRESULT wined3d_timestamp_disjoint_query_ops_get_data(struct wined3d_query *query,
|
||||
@@ -670,7 +667,7 @@ static HRESULT wined3d_timestamp_disjoint_query_ops_get_data(struct wined3d_quer
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
-static HRESULT wined3d_timestamp_disjoint_query_ops_issue(struct wined3d_query *query, DWORD flags)
|
||||
+static void wined3d_timestamp_disjoint_query_ops_issue(struct wined3d_query *query, DWORD flags)
|
||||
{
|
||||
TRACE("query %p, flags %#x.\n", query, flags);
|
||||
|
||||
@@ -678,8 +675,6 @@ static HRESULT wined3d_timestamp_disjoint_query_ops_issue(struct wined3d_query *
|
||||
query->state = QUERY_BUILDING;
|
||||
if (flags & WINED3DISSUE_END)
|
||||
query->state = QUERY_SIGNALLED;
|
||||
-
|
||||
- return WINED3D_OK;
|
||||
}
|
||||
|
||||
static HRESULT wined3d_statistics_query_ops_get_data(struct wined3d_query *query,
|
||||
@@ -694,10 +689,9 @@ static HRESULT wined3d_statistics_query_ops_get_data(struct wined3d_query *query
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
-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,
|
||||
@@ -712,10 +706,9 @@ static HRESULT wined3d_overflow_query_ops_get_data(struct wined3d_query *query,
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
-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 =
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 7f565bb..976e3b7 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -1382,7 +1382,7 @@ enum wined3d_query_state
|
||||
struct wined3d_query_ops
|
||||
{
|
||||
HRESULT (*query_get_data)(struct wined3d_query *query, void *data, DWORD data_size, DWORD flags);
|
||||
- HRESULT (*query_issue)(struct wined3d_query *query, DWORD flags);
|
||||
+ void (*query_issue)(struct wined3d_query *query, DWORD flags);
|
||||
};
|
||||
|
||||
struct wined3d_query
|
||||
--
|
||||
2.8.0
|
||||
|
@@ -1,28 +1,28 @@
|
||||
From 882f8cb04eb9f245eb790668cfb05259a89baf1a Mon Sep 17 00:00:00 2001
|
||||
From 277335bfb1e48eead7bbe911657e9258f15fb794 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Sat, 6 Jul 2013 18:26:11 +0200
|
||||
Subject: wined3d: Add query support to the command stream
|
||||
|
||||
---
|
||||
dlls/wined3d/cs.c | 73 ++++++++++++++++++++++++++++++++++++++++++
|
||||
dlls/wined3d/query.c | 8 +++--
|
||||
dlls/wined3d/cs.c | 66 ++++++++++++++++++++++++++++++++++++++++++
|
||||
dlls/wined3d/query.c | 17 +++++++----
|
||||
dlls/wined3d/wined3d_private.h | 4 +++
|
||||
3 files changed, 83 insertions(+), 2 deletions(-)
|
||||
3 files changed, 82 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 57e77be..4aaf259 100644
|
||||
index fb5ae07..90bb9f2 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -69,6 +69,8 @@ enum wined3d_cs_op
|
||||
@@ -70,6 +70,8 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_CLEAR_RTV,
|
||||
WINED3D_CS_OP_TEXTURE_MAP,
|
||||
WINED3D_CS_OP_TEXTURE_UNMAP,
|
||||
+ WINED3D_CS_OP_QUERY_ISSUE,
|
||||
+ WINED3D_CS_OP_QUERY_GET_DATA,
|
||||
+ WINED3D_CS_OP_QUERY_POLL,
|
||||
WINED3D_CS_OP_STOP,
|
||||
};
|
||||
|
||||
@@ -388,6 +390,23 @@ struct wined3d_cs_skip
|
||||
@@ -395,6 +397,20 @@ struct wined3d_cs_skip
|
||||
DWORD size;
|
||||
};
|
||||
|
||||
@@ -33,20 +33,17 @@ index 57e77be..4aaf259 100644
|
||||
+ DWORD flags;
|
||||
+};
|
||||
+
|
||||
+struct wined3d_cs_query_get_data
|
||||
+struct wined3d_cs_query_poll
|
||||
+{
|
||||
+ enum wined3d_cs_op opcode;
|
||||
+ struct wined3d_query *query;
|
||||
+ void *data;
|
||||
+ UINT data_size;
|
||||
+ DWORD flags;
|
||||
+ HRESULT *ret;
|
||||
+ BOOL *ret;
|
||||
+};
|
||||
+
|
||||
static void wined3d_cs_submit(struct wined3d_cs *cs, size_t size)
|
||||
{
|
||||
LONG new_val = (cs->queue.head + size) & (WINED3D_CS_QUEUE_SIZE - 1);
|
||||
@@ -1963,6 +1982,58 @@ void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture
|
||||
@@ -1992,6 +2008,54 @@ void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@@ -71,27 +68,23 @@ index 57e77be..4aaf259 100644
|
||||
+ cs->ops->submit(cs, sizeof(*op));
|
||||
+}
|
||||
+
|
||||
+static UINT wined3d_cs_exec_query_get_data(struct wined3d_cs *cs, const void *data)
|
||||
+static UINT wined3d_cs_exec_query_poll(struct wined3d_cs *cs, const void *data)
|
||||
+{
|
||||
+ const struct wined3d_cs_query_get_data *op = data;
|
||||
+ const struct wined3d_cs_query_poll *op = data;
|
||||
+ struct wined3d_query *query = op->query;
|
||||
+
|
||||
+ *op->ret = query->query_ops->query_get_data(query, op->data, op->data_size, op->flags);
|
||||
+ *op->ret = query->query_ops->query_poll(query);
|
||||
+
|
||||
+ return sizeof(*op);
|
||||
+}
|
||||
+
|
||||
+void wined3d_cs_emit_query_get_data(struct wined3d_cs *cs, struct wined3d_query *query, void *data,
|
||||
+ UINT data_size, DWORD flags, HRESULT *ret)
|
||||
+void wined3d_cs_emit_query_poll(struct wined3d_cs *cs, struct wined3d_query *query, BOOL *ret)
|
||||
+{
|
||||
+ struct wined3d_cs_query_get_data *op;
|
||||
+ struct wined3d_cs_query_poll *op;
|
||||
+
|
||||
+ op = cs->ops->require_space(cs, sizeof(*op));
|
||||
+ op->opcode = WINED3D_CS_OP_QUERY_GET_DATA;
|
||||
+ op->opcode = WINED3D_CS_OP_QUERY_POLL;
|
||||
+ op->query = query;
|
||||
+ op->data = data;
|
||||
+ op->data_size = data_size;
|
||||
+ op->flags = flags;
|
||||
+ op->ret = ret;
|
||||
+
|
||||
+ cs->ops->submit(cs, sizeof(*op));
|
||||
@@ -105,59 +98,99 @@ index 57e77be..4aaf259 100644
|
||||
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
|
||||
@@ -2010,6 +2081,8 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -2040,6 +2104,8 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_CLEAR_RTV */ wined3d_cs_exec_clear_rtv,
|
||||
/* WINED3D_CS_OP_TEXTURE_MAP */ wined3d_cs_exec_texture_map,
|
||||
/* WINED3D_CS_OP_TEXTURE_UNMAP */ wined3d_cs_exec_texture_unmap,
|
||||
+ /* WINED3D_CS_OP_QUERY_ISSUE */ wined3d_cs_exec_query_issue,
|
||||
+ /* WINED3D_CS_OP_QUERY_GET_DATA */ wined3d_cs_exec_query_get_data,
|
||||
+ /* WINED3D_CS_OP_QUERY_POLL */ wined3d_cs_exec_query_poll,
|
||||
};
|
||||
|
||||
static void *wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size)
|
||||
diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
|
||||
index cd7a73c..f656bd1 100644
|
||||
index 3bcf6f0..048a0cf 100644
|
||||
--- a/dlls/wined3d/query.c
|
||||
+++ b/dlls/wined3d/query.c
|
||||
@@ -297,10 +297,14 @@ ULONG CDECL wined3d_query_decref(struct wined3d_query *query)
|
||||
HRESULT CDECL wined3d_query_get_data(struct wined3d_query *query,
|
||||
void *data, UINT data_size, DWORD flags)
|
||||
{
|
||||
+ HRESULT hr;
|
||||
TRACE("query %p, data %p, data_size %u, flags %#x.\n",
|
||||
query, data, data_size, flags);
|
||||
@@ -338,8 +338,13 @@ HRESULT CDECL wined3d_query_get_data(struct wined3d_query *query,
|
||||
|
||||
- return query->query_ops->query_get_data(query, data, data_size, flags);
|
||||
+ wined3d_cs_emit_query_get_data(query->device->cs, query, data, data_size,
|
||||
+ flags, &hr);
|
||||
+
|
||||
+ return hr;
|
||||
}
|
||||
if (query->state == QUERY_CREATED)
|
||||
WARN("Query wasn't started yet.\n");
|
||||
- else if (!query->query_ops->query_poll(query))
|
||||
- return S_FALSE;
|
||||
+ else
|
||||
+ {
|
||||
+ BOOL ret;
|
||||
+ wined3d_cs_emit_query_poll(query->device->cs, query, &ret);
|
||||
+ if (!ret)
|
||||
+ return S_FALSE;
|
||||
+ }
|
||||
|
||||
UINT CDECL wined3d_query_get_data_size(const struct wined3d_query *query)
|
||||
@@ -314,7 +318,7 @@ HRESULT CDECL wined3d_query_issue(struct wined3d_query *query, DWORD flags)
|
||||
if (data)
|
||||
memcpy(data, query->data, min(data_size, query->data_size));
|
||||
@@ -358,7 +363,7 @@ HRESULT CDECL wined3d_query_issue(struct wined3d_query *query, DWORD flags)
|
||||
{
|
||||
TRACE("query %p, flags %#x.\n", query, flags);
|
||||
|
||||
- query->query_ops->query_issue(query, flags);
|
||||
+ wined3d_cs_emit_query_issue(query->device->cs, query, flags);
|
||||
return WINED3D_OK;
|
||||
|
||||
if (flags & WINED3DISSUE_BEGIN)
|
||||
query->state = QUERY_BUILDING;
|
||||
@@ -479,7 +484,7 @@ static void wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DWORD
|
||||
* restart. */
|
||||
if (flags & WINED3DISSUE_BEGIN)
|
||||
{
|
||||
- if (query->state == QUERY_BUILDING)
|
||||
+ if (oq->started)
|
||||
{
|
||||
if (oq->context->tid != GetCurrentThreadId())
|
||||
{
|
||||
@@ -509,13 +514,14 @@ static void wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DWORD
|
||||
checkGLcall("glBeginQuery()");
|
||||
|
||||
context_release(context);
|
||||
+ oq->started = TRUE;
|
||||
}
|
||||
if (flags & WINED3DISSUE_END)
|
||||
{
|
||||
/* MSDN says END on a non-building occlusion query returns an error,
|
||||
* but our tests show that it returns OK. But OpenGL doesn't like it,
|
||||
* so avoid generating an error. */
|
||||
- if (query->state == QUERY_BUILDING)
|
||||
+ if (oq->started)
|
||||
{
|
||||
if (oq->context->tid != GetCurrentThreadId())
|
||||
{
|
||||
@@ -531,6 +537,7 @@ static void wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DWORD
|
||||
context_release(context);
|
||||
}
|
||||
}
|
||||
+ oq->started = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 525cb01..d554882 100644
|
||||
index 5b44182..9c4ed1e 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -3136,6 +3136,10 @@ void *wined3d_cs_emit_texture_map(struct wined3d_cs *cs, struct wined3d_texture
|
||||
@@ -1437,6 +1437,7 @@ struct wined3d_occlusion_query
|
||||
GLuint id;
|
||||
struct wined3d_context *context;
|
||||
DWORD samples;
|
||||
+ BOOL started;
|
||||
};
|
||||
|
||||
struct wined3d_timestamp_query
|
||||
@@ -3151,6 +3152,9 @@ void *wined3d_cs_emit_texture_map(struct wined3d_cs *cs, struct wined3d_texture
|
||||
unsigned int sub_resource_idx, DWORD flags) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture *texture,
|
||||
unsigned int sub_resource_idx) DECLSPEC_HIDDEN;
|
||||
+void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *query,
|
||||
+ DWORD flags) DECLSPEC_HIDDEN;
|
||||
+void wined3d_cs_emit_query_get_data(struct wined3d_cs *cs, struct wined3d_query *query, void *data,
|
||||
+ UINT data_size, DWORD flags, HRESULT *ret) DECLSPEC_HIDDEN;
|
||||
+void wined3d_cs_emit_query_poll(struct wined3d_cs *cs, struct wined3d_query *query, BOOL *ret) DECLSPEC_HIDDEN;
|
||||
|
||||
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
|
||||
* fixed function semantics as D3DCOLOR or FLOAT16 */
|
||||
--
|
||||
2.8.0
|
||||
2.9.0
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From f4a2f28e195b9b5125e5360f4e7167fa2aaca230 Mon Sep 17 00:00:00 2001
|
||||
From 84e3897a8d1dc4f1925979a2d876609735a0ef4d Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Sat, 6 Jul 2013 18:31:41 +0200
|
||||
Subject: wined3d: Check our CS state to find out if a query is done
|
||||
@@ -10,10 +10,10 @@ Subject: wined3d: Check our CS state to find out if a query is done
|
||||
3 files changed, 15 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 4aaf259..94232db 100644
|
||||
index 90bb9f2..f51656c 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -1985,8 +1985,12 @@ void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture
|
||||
@@ -2011,8 +2011,12 @@ void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture
|
||||
static UINT wined3d_cs_exec_query_issue(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
const struct wined3d_cs_query_issue *op = data;
|
||||
@@ -28,12 +28,12 @@ index 4aaf259..94232db 100644
|
||||
return sizeof(*op);
|
||||
}
|
||||
diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
|
||||
index fbbd4f2..726da3b 100644
|
||||
index 048a0cf..64dd14b 100644
|
||||
--- a/dlls/wined3d/query.c
|
||||
+++ b/dlls/wined3d/query.c
|
||||
@@ -314,6 +314,12 @@ HRESULT CDECL wined3d_query_get_data(struct wined3d_query *query,
|
||||
TRACE("query %p, data %p, data_size %u, flags %#x.\n",
|
||||
query, data, data_size, flags);
|
||||
@@ -330,6 +330,12 @@ HRESULT CDECL wined3d_query_get_data(struct wined3d_query *query,
|
||||
if (flags)
|
||||
WARN("Ignoring flags %#x.\n", flags);
|
||||
|
||||
+ if (query->counter_main != query->counter_worker)
|
||||
+ {
|
||||
@@ -41,10 +41,10 @@ index fbbd4f2..726da3b 100644
|
||||
+ return S_FALSE;
|
||||
+ }
|
||||
+
|
||||
wined3d_cs_emit_query_get_data(query->device->cs, query, data, data_size,
|
||||
flags, &hr);
|
||||
|
||||
@@ -331,6 +337,9 @@ HRESULT CDECL wined3d_query_issue(struct wined3d_query *query, DWORD flags)
|
||||
if (query->state == QUERY_BUILDING)
|
||||
{
|
||||
WARN("Query is building, returning S_FALSE.\n");
|
||||
@@ -363,6 +369,9 @@ HRESULT CDECL wined3d_query_issue(struct wined3d_query *query, DWORD flags)
|
||||
{
|
||||
TRACE("query %p, flags %#x.\n", query, flags);
|
||||
|
||||
@@ -52,14 +52,14 @@ index fbbd4f2..726da3b 100644
|
||||
+ query->counter_main++;
|
||||
+
|
||||
wined3d_cs_emit_query_issue(query->device->cs, query, flags);
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
if (flags & WINED3DISSUE_BEGIN)
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 6f00f06..232f099 100644
|
||||
index 9c4ed1e..a641df3 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -1395,6 +1395,7 @@ struct wined3d_query
|
||||
enum wined3d_query_type type;
|
||||
@@ -1396,6 +1396,7 @@ struct wined3d_query
|
||||
const void *data;
|
||||
DWORD data_size;
|
||||
const struct wined3d_query_ops *query_ops;
|
||||
+ LONG counter_main, counter_worker;
|
||||
@@ -67,5 +67,5 @@ index 6f00f06..232f099 100644
|
||||
|
||||
union wined3d_gl_query_object
|
||||
--
|
||||
2.8.0
|
||||
2.9.0
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,115 +0,0 @@
|
||||
From bdc6e270b4f3c17a4e59d8a2fa0a18986317d438 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Wed, 24 Jul 2013 16:34:17 +0200
|
||||
Subject: wined3d: Separate main and worker thread query state
|
||||
|
||||
---
|
||||
dlls/wined3d/query.c | 29 ++++++++++-------------------
|
||||
dlls/wined3d/wined3d_private.h | 1 +
|
||||
2 files changed, 11 insertions(+), 19 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
|
||||
index 2af86b8..8d4213e 100644
|
||||
--- a/dlls/wined3d/query.c
|
||||
+++ b/dlls/wined3d/query.c
|
||||
@@ -329,6 +329,12 @@ HRESULT CDECL wined3d_query_issue(struct wined3d_query *query, DWORD flags)
|
||||
query->counter_main++;
|
||||
|
||||
wined3d_cs_emit_query_issue(query->device->cs, query, flags);
|
||||
+
|
||||
+ if (flags & WINED3DISSUE_BEGIN)
|
||||
+ query->state = QUERY_BUILDING;
|
||||
+ else
|
||||
+ query->state = QUERY_SIGNALLED;
|
||||
+
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
@@ -503,11 +509,6 @@ static void wined3d_event_query_ops_issue(struct wined3d_query *query, DWORD fla
|
||||
/* Started implicitly at query creation. */
|
||||
ERR("Event query issued with START flag - what to do?\n");
|
||||
}
|
||||
-
|
||||
- if (flags & WINED3DISSUE_BEGIN)
|
||||
- query->state = QUERY_BUILDING;
|
||||
- else
|
||||
- query->state = QUERY_SIGNALLED;
|
||||
}
|
||||
|
||||
static void wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DWORD flags)
|
||||
@@ -523,7 +524,7 @@ static void wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DWORD
|
||||
* restart. */
|
||||
if (flags & WINED3DISSUE_BEGIN)
|
||||
{
|
||||
- if (query->state == QUERY_BUILDING)
|
||||
+ if (oq->started)
|
||||
{
|
||||
if (oq->context->tid != GetCurrentThreadId())
|
||||
{
|
||||
@@ -553,13 +554,14 @@ static void wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DWORD
|
||||
checkGLcall("glBeginQuery()");
|
||||
|
||||
context_release(context);
|
||||
+ oq->started = TRUE;
|
||||
}
|
||||
if (flags & WINED3DISSUE_END)
|
||||
{
|
||||
/* MSDN says END on a non-building occlusion query returns an error,
|
||||
* but our tests show that it returns OK. But OpenGL doesn't like it,
|
||||
* so avoid generating an error. */
|
||||
- if (query->state == QUERY_BUILDING)
|
||||
+ if (oq->started)
|
||||
{
|
||||
if (oq->context->tid != GetCurrentThreadId())
|
||||
{
|
||||
@@ -575,13 +577,9 @@ static void wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DWORD
|
||||
context_release(context);
|
||||
}
|
||||
}
|
||||
+ oq->started = FALSE;
|
||||
}
|
||||
|
||||
- if (flags & WINED3DISSUE_BEGIN)
|
||||
- query->state = QUERY_BUILDING;
|
||||
- else
|
||||
- query->state = QUERY_SIGNALLED;
|
||||
-
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -688,8 +686,6 @@ static void wined3d_timestamp_query_ops_issue(struct wined3d_query *query, DWORD
|
||||
GL_EXTCALL(glQueryCounter(tq->id, GL_TIMESTAMP));
|
||||
checkGLcall("glQueryCounter()");
|
||||
context_release(context);
|
||||
-
|
||||
- query->state = QUERY_SIGNALLED;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -726,11 +722,6 @@ static BOOL wined3d_timestamp_disjoint_query_ops_poll(struct wined3d_query *quer
|
||||
static void wined3d_timestamp_disjoint_query_ops_issue(struct wined3d_query *query, DWORD flags)
|
||||
{
|
||||
TRACE("query %p, flags %#x.\n", query, flags);
|
||||
-
|
||||
- if (flags & WINED3DISSUE_BEGIN)
|
||||
- query->state = QUERY_BUILDING;
|
||||
- if (flags & WINED3DISSUE_END)
|
||||
- query->state = QUERY_SIGNALLED;
|
||||
}
|
||||
|
||||
static HRESULT wined3d_statistics_query_ops_get_data(struct wined3d_query *query,
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 2029c0a..52038aa 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -1440,6 +1440,7 @@ struct wined3d_occlusion_query
|
||||
GLuint id;
|
||||
struct wined3d_context *context;
|
||||
DWORD samples;
|
||||
+ BOOL started;
|
||||
};
|
||||
|
||||
struct wined3d_timestamp_query
|
||||
--
|
||||
2.8.0
|
||||
|
@@ -1,19 +1,19 @@
|
||||
From 680600405dcf957ecaa1ff7915268afc112e33f7 Mon Sep 17 00:00:00 2001
|
||||
From 5c74973f7c5ec68fbde36808b55771c81133b670 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 | 25 +++++++++++++++++++------
|
||||
dlls/wined3d/wined3d_private.h | 2 +-
|
||||
3 files changed, 22 insertions(+), 10 deletions(-)
|
||||
3 files changed, 23 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 2f66eff..7178624 100644
|
||||
index fb55549..105cf45 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -1984,10 +1984,11 @@ static UINT wined3d_cs_exec_query_issue(struct wined3d_cs *cs, const void *data)
|
||||
@@ -2013,10 +2013,11 @@ static UINT wined3d_cs_exec_query_issue(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
const struct wined3d_cs_query_issue *op = data;
|
||||
struct wined3d_query *query = op->query;
|
||||
@@ -28,10 +28,10 @@ index 2f66eff..7178624 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 337ec9b..8682e22 100644
|
||||
index aa0973f..c7814a0 100644
|
||||
--- a/dlls/wined3d/query.c
|
||||
+++ b/dlls/wined3d/query.c
|
||||
@@ -500,7 +500,7 @@ enum wined3d_query_type CDECL wined3d_query_get_type(const struct wined3d_query
|
||||
@@ -465,7 +465,7 @@ enum wined3d_query_type CDECL wined3d_query_get_type(const struct wined3d_query
|
||||
return query->type;
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ index 337ec9b..8682e22 100644
|
||||
{
|
||||
TRACE("query %p, flags %#x.\n", query, flags);
|
||||
|
||||
@@ -509,20 +509,23 @@ static void wined3d_event_query_ops_issue(struct wined3d_query *query, DWORD fla
|
||||
@@ -474,20 +474,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,20 +65,19 @@ index 337ec9b..8682e22 100644
|
||||
|
||||
TRACE("query %p, flags %#x.\n", query, flags);
|
||||
|
||||
@@ -584,9 +587,10 @@ static void wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DWORD
|
||||
@@ -549,7 +552,10 @@ static void wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DWORD
|
||||
}
|
||||
}
|
||||
oq->started = FALSE;
|
||||
+ poll = TRUE;
|
||||
}
|
||||
|
||||
- return;
|
||||
+
|
||||
+ return poll;
|
||||
}
|
||||
|
||||
static HRESULT wined3d_timestamp_query_ops_get_data(struct wined3d_query *query,
|
||||
@@ -670,7 +674,7 @@ static BOOL wined3d_timestamp_query_ops_poll(struct wined3d_query *query)
|
||||
return ret;
|
||||
static BOOL wined3d_timestamp_query_ops_poll(struct wined3d_query *query)
|
||||
@@ -590,7 +596,7 @@ static BOOL wined3d_timestamp_query_ops_poll(struct wined3d_query *query)
|
||||
return available;
|
||||
}
|
||||
|
||||
-static void wined3d_timestamp_query_ops_issue(struct wined3d_query *query, DWORD flags)
|
||||
@@ -86,7 +85,7 @@ index 337ec9b..8682e22 100644
|
||||
{
|
||||
struct wined3d_timestamp_query *tq = wined3d_timestamp_query_from_query(query);
|
||||
struct wined3d_device *device = query->device;
|
||||
@@ -693,6 +697,10 @@ static void wined3d_timestamp_query_ops_issue(struct wined3d_query *query, DWORD
|
||||
@@ -613,6 +619,10 @@ static void wined3d_timestamp_query_ops_issue(struct wined3d_query *query, DWORD
|
||||
checkGLcall("glQueryCounter()");
|
||||
context_release(context);
|
||||
}
|
||||
@@ -96,8 +95,8 @@ index 337ec9b..8682e22 100644
|
||||
+ return FALSE;
|
||||
}
|
||||
|
||||
static HRESULT wined3d_timestamp_disjoint_query_ops_get_data(struct wined3d_query *query,
|
||||
@@ -725,9 +733,10 @@ static BOOL wined3d_timestamp_disjoint_query_ops_poll(struct wined3d_query *quer
|
||||
static BOOL wined3d_timestamp_disjoint_query_ops_poll(struct wined3d_query *query)
|
||||
@@ -622,9 +632,10 @@ static BOOL wined3d_timestamp_disjoint_query_ops_poll(struct wined3d_query *quer
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -108,8 +107,8 @@ index 337ec9b..8682e22 100644
|
||||
+ return FALSE;
|
||||
}
|
||||
|
||||
static HRESULT wined3d_statistics_query_ops_get_data(struct wined3d_query *query,
|
||||
@@ -747,9 +756,10 @@ static BOOL wined3d_statistics_query_ops_poll(struct wined3d_query *query)
|
||||
static BOOL wined3d_statistics_query_ops_poll(struct wined3d_query *query)
|
||||
@@ -634,9 +645,10 @@ static BOOL wined3d_statistics_query_ops_poll(struct wined3d_query *query)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -120,8 +119,8 @@ index 337ec9b..8682e22 100644
|
||||
+ return FALSE;
|
||||
}
|
||||
|
||||
static HRESULT wined3d_overflow_query_ops_get_data(struct wined3d_query *query,
|
||||
@@ -769,9 +779,10 @@ static BOOL wined3d_overflow_query_ops_poll(struct wined3d_query *query)
|
||||
static HRESULT wined3d_overflow_query_ops_poll(struct wined3d_query *query)
|
||||
@@ -646,9 +658,10 @@ static HRESULT wined3d_overflow_query_ops_poll(struct wined3d_query *query)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -134,12 +133,12 @@ index 337ec9b..8682e22 100644
|
||||
|
||||
static const struct wined3d_query_ops event_query_ops =
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index b3374bf..d70804f 100644
|
||||
index 8a04b4c..20ea5a8 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -1383,7 +1383,7 @@ struct wined3d_query_ops
|
||||
@@ -1382,7 +1382,7 @@ enum wined3d_query_state
|
||||
struct wined3d_query_ops
|
||||
{
|
||||
HRESULT (*query_get_data)(struct wined3d_query *query, void *data, DWORD data_size, DWORD flags);
|
||||
BOOL (*query_poll)(struct wined3d_query *query);
|
||||
- void (*query_issue)(struct wined3d_query *query, DWORD flags);
|
||||
+ BOOL (*query_issue)(struct wined3d_query *query, DWORD flags);
|
||||
@@ -147,5 +146,5 @@ index b3374bf..d70804f 100644
|
||||
|
||||
struct wined3d_query
|
||||
--
|
||||
2.8.0
|
||||
2.9.0
|
||||
|
||||
|
@@ -1,31 +0,0 @@
|
||||
From b8bb97c977b85a946ba508538bd5d621b03b0488 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Mon, 5 Aug 2013 13:07:42 +0200
|
||||
Subject: wined3d: Don't reset the query state if it doesn't have a ctx
|
||||
|
||||
The CS recreates occlusion queries and changes the context variable.
|
||||
This leads to incorrect query results.
|
||||
|
||||
TODO: Before sending, find out why the line was there in the first place
|
||||
and if it is needed with the multithreaded and/or singlethreaded CS.
|
||||
---
|
||||
dlls/wined3d/query.c | 3 ---
|
||||
1 file changed, 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
|
||||
index 2a9dc2f..c115c04 100644
|
||||
--- a/dlls/wined3d/query.c
|
||||
+++ b/dlls/wined3d/query.c
|
||||
@@ -349,9 +349,6 @@ static HRESULT wined3d_occlusion_query_ops_get_data(struct wined3d_query *query,
|
||||
struct wined3d_occlusion_query *oq = wined3d_occlusion_query_from_query(query);
|
||||
GLuint samples;
|
||||
|
||||
- if (!oq->context)
|
||||
- query->state = QUERY_CREATED;
|
||||
-
|
||||
if (query->state == QUERY_CREATED)
|
||||
{
|
||||
/* D3D allows GetData on a new query, OpenGL doesn't. So just invent the data ourselves */
|
||||
--
|
||||
2.8.0
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 8fa73a39c4748e5c8a8ca00984fab4fbe740a806 Mon Sep 17 00:00:00 2001
|
||||
From 4e9e48376defff77261a0ae433694fc848b764b8 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Thu, 1 Aug 2013 00:10:40 +0200
|
||||
Subject: wined3d: Send texture preloads through the CS
|
||||
@@ -10,10 +10,10 @@ Subject: wined3d: Send texture preloads through the CS
|
||||
3 files changed, 35 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 72c83f5..e115a28 100644
|
||||
index 7b91220..811c4b7 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -70,6 +70,7 @@ enum wined3d_cs_op
|
||||
@@ -71,6 +71,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_TEXTURE_MAP,
|
||||
WINED3D_CS_OP_TEXTURE_UNMAP,
|
||||
WINED3D_CS_OP_QUERY_ISSUE,
|
||||
@@ -21,7 +21,7 @@ index 72c83f5..e115a28 100644
|
||||
WINED3D_CS_OP_STOP,
|
||||
};
|
||||
|
||||
@@ -396,6 +397,12 @@ struct wined3d_cs_query_issue
|
||||
@@ -403,6 +404,12 @@ struct wined3d_cs_query_issue
|
||||
DWORD flags;
|
||||
};
|
||||
|
||||
@@ -34,7 +34,7 @@ index 72c83f5..e115a28 100644
|
||||
static void wined3d_cs_mt_submit(struct wined3d_cs *cs, size_t size)
|
||||
{
|
||||
LONG new_val = (cs->queue.head + size) & (WINED3D_CS_QUEUE_SIZE - 1);
|
||||
@@ -2030,6 +2037,30 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
|
||||
@@ -2059,6 +2066,30 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ index 72c83f5..e115a28 100644
|
||||
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
|
||||
@@ -2078,6 +2109,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -2108,6 +2139,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_TEXTURE_MAP */ wined3d_cs_exec_texture_map,
|
||||
/* WINED3D_CS_OP_TEXTURE_UNMAP */ wined3d_cs_exec_texture_unmap,
|
||||
/* WINED3D_CS_OP_QUERY_ISSUE */ wined3d_cs_exec_query_issue,
|
||||
@@ -74,7 +74,7 @@ index 72c83f5..e115a28 100644
|
||||
|
||||
static inline void *_wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size, BOOL prio)
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index e239282..f650cd9 100644
|
||||
index e19484b..687799d 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -920,10 +920,8 @@ void wined3d_texture_load(struct wined3d_texture *texture,
|
||||
@@ -91,17 +91,17 @@ index e239282..f650cd9 100644
|
||||
|
||||
void * CDECL wined3d_texture_get_parent(const struct wined3d_texture *texture)
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 277d891..0c968d2 100644
|
||||
index 20ea5a8..66fd4ae 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -3150,6 +3150,7 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
|
||||
@@ -3161,6 +3161,7 @@ void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture
|
||||
void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *query,
|
||||
DWORD flags) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_query_get_data(struct wined3d_cs *cs, struct wined3d_query *query, void *data,
|
||||
UINT data_size, DWORD flags, HRESULT *ret) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_query_poll(struct wined3d_cs *cs, struct wined3d_query *query, BOOL *ret) DECLSPEC_HIDDEN;
|
||||
+void wined3d_cs_emit_texture_preload(struct wined3d_cs *cs, struct wined3d_texture *texture) DECLSPEC_HIDDEN;
|
||||
|
||||
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
|
||||
* fixed function semantics as D3DCOLOR or FLOAT16 */
|
||||
--
|
||||
2.8.0
|
||||
2.9.0
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 5022da3bf443b3ff8e74cb13a23e2bc1aeab0e77 Mon Sep 17 00:00:00 2001
|
||||
From e98df687ff8ca219bc6518a82f120b0fe856f9c7 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Thu, 1 Aug 2013 00:33:48 +0200
|
||||
Subject: wined3d: Send update_texture calls through the CS
|
||||
@@ -11,10 +11,10 @@ FIXME: This logic duplication is ugly.
|
||||
3 files changed, 137 insertions(+), 82 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index e115a28..aa66603 100644
|
||||
index 811c4b7..2cb9ad7 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -71,6 +71,7 @@ enum wined3d_cs_op
|
||||
@@ -72,6 +72,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_TEXTURE_UNMAP,
|
||||
WINED3D_CS_OP_QUERY_ISSUE,
|
||||
WINED3D_CS_OP_TEXTURE_PRELOAD,
|
||||
@@ -22,7 +22,7 @@ index e115a28..aa66603 100644
|
||||
WINED3D_CS_OP_STOP,
|
||||
};
|
||||
|
||||
@@ -403,6 +404,12 @@ struct wined3d_cs_texture_preload
|
||||
@@ -410,6 +411,12 @@ struct wined3d_cs_texture_preload
|
||||
struct wined3d_texture *texture;
|
||||
};
|
||||
|
||||
@@ -35,7 +35,7 @@ index e115a28..aa66603 100644
|
||||
static void wined3d_cs_mt_submit(struct wined3d_cs *cs, size_t size)
|
||||
{
|
||||
LONG new_val = (cs->queue.head + size) & (WINED3D_CS_QUEUE_SIZE - 1);
|
||||
@@ -2061,6 +2068,31 @@ void wined3d_cs_emit_texture_preload(struct wined3d_cs *cs, struct wined3d_textu
|
||||
@@ -2090,6 +2097,31 @@ void wined3d_cs_emit_texture_preload(struct wined3d_cs *cs, struct wined3d_textu
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ index e115a28..aa66603 100644
|
||||
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
|
||||
@@ -2110,6 +2142,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -2140,6 +2172,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_TEXTURE_UNMAP */ wined3d_cs_exec_texture_unmap,
|
||||
/* WINED3D_CS_OP_QUERY_ISSUE */ wined3d_cs_exec_query_issue,
|
||||
/* WINED3D_CS_OP_TEXTURE_PRELOAD */ wined3d_cs_exec_texture_preload,
|
||||
@@ -76,10 +76,10 @@ index e115a28..aa66603 100644
|
||||
|
||||
static inline void *_wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size, BOOL prio)
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index c5f20c9..ad8e7c6 100644
|
||||
index d458747..99118f2 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -3532,34 +3532,17 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device
|
||||
@@ -3558,34 +3558,17 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device
|
||||
start_idx, index_count, start_instance, instance_count, TRUE);
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ index c5f20c9..ad8e7c6 100644
|
||||
|
||||
/* Only a prepare, since we're uploading entire volumes. */
|
||||
wined3d_texture_prepare_texture(dst_texture, context, FALSE);
|
||||
@@ -3567,32 +3550,89 @@ static HRESULT wined3d_device_update_texture_3d(struct wined3d_device *device,
|
||||
@@ -3593,32 +3576,89 @@ static HRESULT wined3d_device_update_texture_3d(struct wined3d_device *device,
|
||||
|
||||
for (i = 0; i < level_count; ++i)
|
||||
{
|
||||
@@ -218,7 +218,7 @@ index c5f20c9..ad8e7c6 100644
|
||||
|
||||
TRACE("device %p, src_texture %p, dst_texture %p.\n", device, src_texture, dst_texture);
|
||||
|
||||
@@ -3629,70 +3669,48 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
|
||||
@@ -3655,70 +3695,48 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@@ -319,10 +319,10 @@ index c5f20c9..ad8e7c6 100644
|
||||
|
||||
HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device, DWORD *num_passes)
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 2565a16..47fdc9e 100644
|
||||
index e2e8673..9caeb46 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2521,6 +2521,8 @@ void device_resource_add(struct wined3d_device *device, struct wined3d_resource
|
||||
@@ -2533,6 +2533,8 @@ void device_resource_add(struct wined3d_device *device, struct wined3d_resource
|
||||
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;
|
||||
void device_invalidate_shader_constants(const struct wined3d_device *device, DWORD mask) DECLSPEC_HIDDEN;
|
||||
@@ -331,9 +331,9 @@ index 2565a16..47fdc9e 100644
|
||||
|
||||
static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD state)
|
||||
{
|
||||
@@ -3151,6 +3153,8 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
|
||||
void wined3d_cs_emit_query_get_data(struct wined3d_cs *cs, struct wined3d_query *query, void *data,
|
||||
UINT data_size, DWORD flags, HRESULT *ret) DECLSPEC_HIDDEN;
|
||||
@@ -3162,6 +3164,8 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
|
||||
DWORD flags) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_query_poll(struct wined3d_cs *cs, struct wined3d_query *query, BOOL *ret) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_texture_preload(struct wined3d_cs *cs, struct wined3d_texture *texture) DECLSPEC_HIDDEN;
|
||||
+void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_texture *src,
|
||||
+ struct wined3d_texture *dst) DECLSPEC_HIDDEN;
|
||||
@@ -341,5 +341,5 @@ index 2565a16..47fdc9e 100644
|
||||
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
|
||||
* fixed function semantics as D3DCOLOR or FLOAT16 */
|
||||
--
|
||||
2.8.0
|
||||
2.9.0
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -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