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
3eb5e59e
Commit
3eb5e59e
authored
7 years ago
by
Józef Kucia
Browse files
Options
Downloads
Patches
Plain Diff
libs/vkd3d: Count buffer SRVs and UAVs separately.
SRV and UAV root parameters are buffer views.
parent
cb86c9c8
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/state.c
+17
-7
17 additions, 7 deletions
libs/vkd3d/state.c
with
17 additions
and
7 deletions
libs/vkd3d/state.c
+
17
−
7
View file @
3eb5e59e
...
...
@@ -243,10 +243,11 @@ static VkDescriptorType vk_descriptor_type_from_d3d12_root_parameter(D3D12_ROOT_
{
switch
(
type
)
{
/* SRV and UAV root parameters are buffer views. */
case
D3D12_ROOT_PARAMETER_TYPE_SRV
:
return
VK_DESCRIPTOR_TYPE_
SAMPLED_IMAGE
;
return
VK_DESCRIPTOR_TYPE_
UNIFORM_TEXEL_BUFFER
;
case
D3D12_ROOT_PARAMETER_TYPE_UAV
:
return
VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER
;
/* FIXME: Add support for images. */
return
VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER
;
case
D3D12_ROOT_PARAMETER_TYPE_CBV
:
return
VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER
;
default:
...
...
@@ -311,7 +312,9 @@ static bool vk_binding_from_d3d12_descriptor_range(struct VkDescriptorSetLayoutB
struct
d3d12_root_signature_info
{
size_t
cbv_count
;
size_t
buffer_uav_count
;
size_t
uav_count
;
size_t
buffer_srv_count
;
size_t
srv_count
;
size_t
sampler_count
;
size_t
descriptor_count
;
...
...
@@ -377,11 +380,11 @@ static HRESULT d3d12_root_signature_info_from_desc(struct d3d12_root_signature_i
++
info
->
descriptor_count
;
break
;
case
D3D12_ROOT_PARAMETER_TYPE_SRV
:
++
info
->
srv_count
;
++
info
->
buffer_
srv_count
;
++
info
->
descriptor_count
;
break
;
case
D3D12_ROOT_PARAMETER_TYPE_UAV
:
++
info
->
uav_count
;
++
info
->
buffer_
uav_count
;
++
info
->
descriptor_count
;
break
;
...
...
@@ -716,9 +719,11 @@ static HRESULT d3d12_root_signature_init(struct d3d12_root_signature *root_signa
root_signature
->
pool_size_count
=
0
;
if
(
info
.
cbv_count
)
++
root_signature
->
pool_size_count
;
if
(
info
.
buffer_srv_count
)
++
root_signature
->
pool_size_count
;
if
(
info
.
srv_count
)
++
root_signature
->
pool_size_count
;
if
(
info
.
uav_count
)
if
(
info
.
buffer_uav_count
||
info
.
uav_count
)
++
root_signature
->
pool_size_count
;
if
(
info
.
sampler_count
)
++
root_signature
->
pool_size_count
;
...
...
@@ -737,15 +742,20 @@ static HRESULT d3d12_root_signature_init(struct d3d12_root_signature *root_signa
root_signature
->
pool_sizes
[
i
].
type
=
VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER
;
root_signature
->
pool_sizes
[
i
++
].
descriptorCount
=
info
.
cbv_count
;
}
if
(
info
.
buffer_srv_count
)
{
root_signature
->
pool_sizes
[
i
].
type
=
VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER
;
root_signature
->
pool_sizes
[
i
++
].
descriptorCount
=
info
.
buffer_srv_count
;
}
if
(
info
.
srv_count
)
{
root_signature
->
pool_sizes
[
i
].
type
=
VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE
;
root_signature
->
pool_sizes
[
i
++
].
descriptorCount
=
info
.
srv_count
;
}
if
(
info
.
uav_count
)
if
(
info
.
buffer_uav_count
||
info
.
uav_count
)
{
root_signature
->
pool_sizes
[
i
].
type
=
VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER
;
root_signature
->
pool_sizes
[
i
++
].
descriptorCount
=
info
.
uav_count
;
root_signature
->
pool_sizes
[
i
++
].
descriptorCount
=
info
.
buffer_uav_count
+
info
.
uav_count
;
}
if
(
info
.
sampler_count
)
{
...
...
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