Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
8f70aad2
Commit
8f70aad2
authored
May 27, 2020
by
Henri Verbeet
Committed by
Alexandre Julliard
May 27, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Implement event queries for the Vulkan adapter.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4963da25
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
0 deletions
+58
-0
query.c
dlls/wined3d/query.c
+58
-0
No files found.
dlls/wined3d/query.c
View file @
8f70aad2
...
...
@@ -1617,6 +1617,59 @@ static const struct wined3d_query_ops wined3d_query_vk_ops =
.
query_destroy
=
wined3d_query_vk_destroy
,
};
static
BOOL
wined3d_query_event_vk_poll
(
struct
wined3d_query
*
query
,
uint32_t
flags
)
{
struct
wined3d_query_vk
*
query_vk
=
wined3d_query_vk
(
query
);
struct
wined3d_context_vk
*
context_vk
;
BOOL
*
signalled
;
context_vk
=
wined3d_context_vk
(
context_acquire
(
query
->
device
,
NULL
,
0
));
signalled
=
(
BOOL
*
)
query
->
data
;
if
(
flags
&
WINED3DGETDATA_FLUSH
)
wined3d_context_vk_submit_command_buffer
(
context_vk
,
0
,
NULL
,
NULL
,
0
,
NULL
);
if
(
query_vk
->
command_buffer_id
==
context_vk
->
current_command_buffer
.
id
)
{
context_release
(
&
context_vk
->
c
);
return
*
signalled
=
FALSE
;
}
if
(
query_vk
->
command_buffer_id
>
context_vk
->
completed_command_buffer_id
)
wined3d_context_vk_poll_command_buffers
(
context_vk
);
*
signalled
=
context_vk
->
completed_command_buffer_id
>=
query_vk
->
command_buffer_id
;
context_release
(
&
context_vk
->
c
);
return
*
signalled
;
}
static
BOOL
wined3d_query_event_vk_issue
(
struct
wined3d_query
*
query
,
uint32_t
flags
)
{
struct
wined3d_device_vk
*
device_vk
=
wined3d_device_vk
(
query
->
device
);
struct
wined3d_query_vk
*
query_vk
=
wined3d_query_vk
(
query
);
struct
wined3d_context_vk
*
context_vk
;
TRACE
(
"query %p, flags %#x.
\n
"
,
query
,
flags
);
if
(
flags
&
WINED3DISSUE_END
)
{
context_vk
=
wined3d_context_vk
(
context_acquire
(
&
device_vk
->
d
,
NULL
,
0
));
wined3d_context_vk_reference_query
(
context_vk
,
query_vk
);
context_release
(
&
context_vk
->
c
);
return
TRUE
;
}
return
FALSE
;
}
static
const
struct
wined3d_query_ops
wined3d_query_event_vk_ops
=
{
.
query_poll
=
wined3d_query_event_vk_poll
,
.
query_issue
=
wined3d_query_event_vk_issue
,
.
query_destroy
=
wined3d_query_vk_destroy
,
};
static
BOOL
wined3d_query_timestamp_vk_issue
(
struct
wined3d_query
*
query
,
uint32_t
flags
)
{
struct
wined3d_device_vk
*
device_vk
=
wined3d_device_vk
(
query
->
device
);
...
...
@@ -1681,6 +1734,11 @@ HRESULT wined3d_query_vk_create(struct wined3d_device *device, enum wined3d_quer
switch
(
type
)
{
case
WINED3D_QUERY_TYPE_EVENT
:
ops
=
&
wined3d_query_event_vk_ops
;
data_size
=
sizeof
(
BOOL
);
break
;
case
WINED3D_QUERY_TYPE_OCCLUSION
:
data_size
=
sizeof
(
uint64_t
);
break
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment