Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
vkd3d
Manage
Activity
Members
Labels
Plan
Wiki
Bugzilla
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wine
vkd3d
Commits
3001ad5a
Commit
3001ad5a
authored
7 years ago
by
Sven Hesse
Browse files
Options
Downloads
Patches
Plain Diff
libs/vkd3d: Implement ResolveQueryData() for QUERY_TYPE_PIPELINE_STATISTICS.
parent
08c5b5ec
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libs/vkd3d/command.c
+41
-10
41 additions, 10 deletions
libs/vkd3d/command.c
with
41 additions
and
10 deletions
libs/vkd3d/command.c
+
41
−
10
View file @
3001ad5a
...
...
@@ -3101,6 +3101,28 @@ static D3D12_QUERY_HEAP_TYPE vkd3d_query_heap_type_from_query_type(D3D12_QUERY_T
}
}
static
UINT64
vkd3d_query_type_result_size
(
D3D12_QUERY_TYPE
type
)
{
switch
(
type
)
{
case
D3D12_QUERY_TYPE_OCCLUSION
:
case
D3D12_QUERY_TYPE_BINARY_OCCLUSION
:
case
D3D12_QUERY_TYPE_TIMESTAMP
:
case
D3D12_QUERY_TYPE_SO_STATISTICS_STREAM0
:
case
D3D12_QUERY_TYPE_SO_STATISTICS_STREAM1
:
case
D3D12_QUERY_TYPE_SO_STATISTICS_STREAM2
:
case
D3D12_QUERY_TYPE_SO_STATISTICS_STREAM3
:
return
8
;
case
D3D12_QUERY_TYPE_PIPELINE_STATISTICS
:
return
sizeof
(
struct
D3D12_QUERY_DATA_PIPELINE_STATISTICS
);
default:
WARN
(
"Invalid query type %#x.
\n
"
,
type
);
return
0
;
}
}
static
void
STDMETHODCALLTYPE
d3d12_command_list_BeginQuery
(
ID3D12GraphicsCommandList
*
iface
,
ID3D12QueryHeap
*
heap
,
D3D12_QUERY_TYPE
type
,
UINT
index
)
{
...
...
@@ -3208,22 +3230,31 @@ static void STDMETHODCALLTYPE d3d12_command_list_ResolveQueryData(ID3D12Graphics
WARN
(
"Destination resource is not a buffer.
\n
"
);
return
;
}
if
((
aligned_dst_buffer_offset
+
8
)
>
buffer
->
desc
.
Width
)
if
((
aligned_dst_buffer_offset
+
vkd3d_query_type_result_size
(
type
)
)
>
buffer
->
desc
.
Width
)
{
WARN
(
"Would overflow destination buffer (%"
PRIu64
" +
8
> %"
PRIu64
").
\n
"
,
aligned_dst_buffer_offset
,
buffer
->
desc
.
Width
);
WARN
(
"Would overflow destination buffer (%"
PRIu64
" +
%"
PRIu64
"
> %"
PRIu64
").
\n
"
,
aligned_dst_buffer_offset
,
vkd3d_query_type_result_size
(
type
),
buffer
->
desc
.
Width
);
return
;
}
if
(
type
!=
D3D12_QUERY_TYPE_TIMESTAMP
)
switch
(
type
)
{
FIXME
(
"Unhandled query type %#x.
\n
"
,
type
);
return
;
}
case
D3D12_QUERY_TYPE_TIMESTAMP
:
case
D3D12_QUERY_TYPE_PIPELINE_STATISTICS
:
VK_CALL
(
vkCmdCopyQueryPoolResults
(
list
->
vk_command_buffer
,
query_heap
->
vk_query_pool
,
start_index
,
query_count
,
buffer
->
u
.
vk_buffer
,
aligned_dst_buffer_offset
,
vkd3d_query_type_result_size
(
type
),
VK_QUERY_RESULT_64_BIT
|
VK_QUERY_RESULT_WAIT_BIT
));
return
;
VK_CALL
(
vkCmdCopyQueryPoolResults
(
list
->
vk_command_buffer
,
query_heap
->
vk_query_pool
,
start_index
,
query_count
,
buffer
->
u
.
vk_buffer
,
aligned_dst_buffer_offset
,
8
,
VK_QUERY_RESULT_64_BIT
|
VK_QUERY_RESULT_WAIT_BIT
));
case
D3D12_QUERY_TYPE_OCCLUSION
:
case
D3D12_QUERY_TYPE_BINARY_OCCLUSION
:
case
D3D12_QUERY_TYPE_SO_STATISTICS_STREAM0
:
case
D3D12_QUERY_TYPE_SO_STATISTICS_STREAM1
:
case
D3D12_QUERY_TYPE_SO_STATISTICS_STREAM2
:
case
D3D12_QUERY_TYPE_SO_STATISTICS_STREAM3
:
FIXME
(
"Unhandled query type %#x.
\n
"
,
type
);
return
;
}
}
static
void
STDMETHODCALLTYPE
d3d12_command_list_SetPredication
(
ID3D12GraphicsCommandList
*
iface
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment