Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix validation warnings on macOS #165

Merged
merged 1 commit into from
May 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion crates/yakui-vulkan/examples/demo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,8 @@ impl VulkanTest {

let mut descriptor_indexing_features =
vk::PhysicalDeviceDescriptorIndexingFeatures::default()
.descriptor_binding_partially_bound(true);
.descriptor_binding_partially_bound(true)
.descriptor_binding_sampled_image_update_after_bind(true);

let device_create_info = vk::DeviceCreateInfo::default()
.queue_create_infos(std::slice::from_ref(&queue_info))
Expand Down
5 changes: 4 additions & 1 deletion crates/yakui-vulkan/src/descriptors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ impl Descriptors {
device.create_descriptor_pool(
&vk::DescriptorPoolCreateInfo::default()
.max_sets(1)
.flags(vk::DescriptorPoolCreateFlags::UPDATE_AFTER_BIND)
.pool_sizes(&[vk::DescriptorPoolSize {
ty: vk::DescriptorType::COMBINED_IMAGE_SAMPLER,
descriptor_count: 1000,
Expand All @@ -27,7 +28,8 @@ impl Descriptors {
}
.unwrap();

let flags = [vk::DescriptorBindingFlags::PARTIALLY_BOUND];
let flags = [vk::DescriptorBindingFlags::PARTIALLY_BOUND
| vk::DescriptorBindingFlags::UPDATE_AFTER_BIND];
let mut binding_flags =
vk::DescriptorSetLayoutBindingFlagsCreateInfo::default().binding_flags(&flags);

Expand All @@ -41,6 +43,7 @@ impl Descriptors {
descriptor_count: 1000,
..Default::default()
}])
.flags(vk::DescriptorSetLayoutCreateFlags::UPDATE_AFTER_BIND_POOL)
.push_next(&mut binding_flags),
None,
)
Expand Down
Loading