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
ae772d40
Commit
ae772d40
authored
6 months ago
by
Giovanni Mascellani
Committed by
Henri Verbeet
6 months ago
Browse files
Options
Downloads
Patches
Plain Diff
vkd3d: Disable push descriptors when that's helpful to stay within 8 descriptor sets.
parent
3bf114f3
No related branches found
No related tags found
1 merge request
!1202
vkd3d: Disable push descriptors when that's helpful to stay within 8 descriptor sets.
Pipeline
#33584
skipped
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libs/vkd3d/device.c
+20
-0
20 additions, 0 deletions
libs/vkd3d/device.c
tests/d3d12.c
+0
-4
0 additions, 4 deletions
tests/d3d12.c
with
20 additions
and
4 deletions
libs/vkd3d/device.c
+
20
−
0
View file @
ae772d40
...
...
@@ -1918,6 +1918,26 @@ static HRESULT vkd3d_init_device_caps(struct d3d12_device *device,
&&
descriptor_indexing
->
descriptorBindingUniformTexelBufferUpdateAfterBind
&&
descriptor_indexing
->
descriptorBindingStorageTexelBufferUpdateAfterBind
;
/* Many Vulkan implementations allow up to 8 descriptor sets. Unfortunately
* using vkd3d with Vulkan heaps and push descriptors currently requires up
* to 9 descriptor sets (up to one for the push descriptors, up to one for
* the static samplers and seven for Vulkan heaps, one for each needed
* descriptor type). If we detect such situation, we disable push
* descriptors, which allows us to stay within the limits (not doing so is
* fatal on many implmentations).
*
* It is possible that a different strategy might be used. For example, we
* could move the static samplers to one of the seven Vulkan heaps sets. Or
* we could decide whether to create the push descriptor set when creating
* the root signature, depending on whether there are static samplers or
* not. */
if
(
device
->
vk_info
.
device_limits
.
maxBoundDescriptorSets
==
8
&&
device
->
use_vk_heaps
&&
device
->
vk_info
.
KHR_push_descriptor
)
{
TRACE
(
"Disabling VK_KHR_push_descriptor to save a descriptor set.
\n
"
);
device
->
vk_info
.
KHR_push_descriptor
=
VK_FALSE
;
}
if
(
device
->
use_vk_heaps
)
vkd3d_device_vk_heaps_descriptor_limits_init
(
&
vulkan_info
->
descriptor_limits
,
&
physical_device_info
->
descriptor_indexing_properties
);
...
...
This diff is collapsed.
Click to expand it.
tests/d3d12.c
+
0
−
4
View file @
ae772d40
...
...
@@ -19402,8 +19402,6 @@ static void test_descriptors_visibility(void)
root_signature_desc.NumStaticSamplers = 2;
root_signature_desc.pStaticSamplers = sampler_desc;
hr = create_root_signature(device, &root_signature_desc, &context.root_signature);
/* llvmpipe (from Mesa 24.0.4) has maxBoundDescriptorSet == 8, which is less than we need. */
todo_if(is_llvmpipe_device(device))
ok(SUCCEEDED(hr), "Failed to create root signature, hr %#x.\n", hr);
if (FAILED(hr))
...
...
@@ -21155,8 +21153,6 @@ static void test_depth_stencil_sampling(void)
root_signature_desc.NumStaticSamplers = 2;
root_signature_desc.pStaticSamplers = sampler_desc;
hr = create_root_signature(device, &root_signature_desc, &context.root_signature);
/* llvmpipe (from Mesa 24.0.4) has maxBoundDescriptorSet == 8, which is less than we need. */
todo_if(is_llvmpipe_device(device))
ok(SUCCEEDED(hr), "Failed to create root signature, hr %#x.\n", hr);
if (FAILED(hr))
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