Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
23ad2662
Commit
23ad2662
authored
May 26, 2020
by
Henri Verbeet
Committed by
Alexandre Julliard
May 27, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Implement timestamp disjoint queries for the Vulkan adapter.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7101af57
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
3 deletions
+37
-3
query.c
dlls/wined3d/query.c
+37
-3
No files found.
dlls/wined3d/query.c
View file @
23ad2662
...
...
@@ -1660,12 +1660,21 @@ static const struct wined3d_query_ops wined3d_query_timestamp_vk_ops =
.
query_destroy
=
wined3d_query_vk_destroy
,
};
static
const
struct
wined3d_query_ops
wined3d_query_timestamp_disjoint_vk_ops
=
{
.
query_poll
=
wined3d_timestamp_disjoint_query_ops_poll
,
.
query_issue
=
wined3d_timestamp_disjoint_query_ops_issue
,
.
query_destroy
=
wined3d_query_vk_destroy
,
};
HRESULT
wined3d_query_vk_create
(
struct
wined3d_device
*
device
,
enum
wined3d_query_type
type
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
struct
wined3d_query
**
query
)
{
struct
wined3d_query_data_timestamp_disjoint
*
disjoint_data
;
const
struct
wined3d_query_ops
*
ops
=
&
wined3d_query_vk_ops
;
struct
wined3d_query_vk
*
query_vk
;
unsigned
int
data_size
;
void
*
data
;
TRACE
(
"device %p, type %#x, parent %p, parent_ops %p, query %p.
\n
"
,
device
,
type
,
parent
,
parent_ops
,
query
);
...
...
@@ -1686,6 +1695,16 @@ HRESULT wined3d_query_vk_create(struct wined3d_device *device, enum wined3d_quer
data_size
=
sizeof
(
uint64_t
);
break
;
case
WINED3D_QUERY_TYPE_TIMESTAMP_DISJOINT
:
if
(
!
wined3d_device_vk
(
device
)
->
timestamp_bits
)
{
WARN
(
"Timestamp queries not supported.
\n
"
);
return
WINED3DERR_NOTAVAILABLE
;
}
ops
=
&
wined3d_query_timestamp_disjoint_vk_ops
;
data_size
=
sizeof
(
struct
wined3d_query_data_timestamp_disjoint
);
break
;
default:
FIXME
(
"Unhandled query type %#x.
\n
"
,
type
);
return
WINED3DERR_NOTAVAILABLE
;
...
...
@@ -1693,11 +1712,26 @@ HRESULT wined3d_query_vk_create(struct wined3d_device *device, enum wined3d_quer
if
(
!
(
query_vk
=
heap_alloc_zero
(
sizeof
(
*
query_vk
)
+
data_size
)))
return
E_OUTOFMEMORY
;
data
=
query_vk
+
1
;
wined3d_query_init
(
&
query_vk
->
q
,
device
,
type
,
query_vk
+
1
,
data_size
,
ops
,
parent
,
parent_ops
);
wined3d_query_init
(
&
query_vk
->
q
,
device
,
type
,
data
,
data_size
,
ops
,
parent
,
parent_ops
);
list_init
(
&
query_vk
->
entry
);
if
(
type
==
WINED3D_QUERY_TYPE_OCCLUSION
)
query_vk
->
control_flags
=
VK_QUERY_CONTROL_PRECISE_BIT
;
switch
(
type
)
{
case
WINED3D_QUERY_TYPE_OCCLUSION
:
query_vk
->
control_flags
=
VK_QUERY_CONTROL_PRECISE_BIT
;
break
;
case
WINED3D_QUERY_TYPE_TIMESTAMP_DISJOINT
:
disjoint_data
=
data
;
disjoint_data
->
frequency
=
1000000000
/
wined3d_adapter_vk
(
device
->
adapter
)
->
device_limits
.
timestampPeriod
;
disjoint_data
->
disjoint
=
FALSE
;
break
;
default:
break
;
}
TRACE
(
"Created query %p.
\n
"
,
query_vk
);
*
query
=
&
query_vk
->
q
;
...
...
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