From 19e3a0f319fd04c1dde803796ec272d038b634f7 Mon Sep 17 00:00:00 2001 From: Irene Knapp Date: Wed, 12 Aug 2026 19:13:32 -0700 Subject: split the texture's sampler and its image view into separaet bindings this will make it easier to change the image view dynamically as a push update, in a future CL Force-Push: yes Change-Id: If7cfab07913a5a462e16dd7fb478ed491d33d4d9 --- src/graphics/permanent.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/graphics/permanent.rs') diff --git a/src/graphics/permanent.rs b/src/graphics/permanent.rs index df86284..b39dbdd 100644 --- a/src/graphics/permanent.rs +++ b/src/graphics/permanent.rs @@ -575,11 +575,17 @@ fn init_descriptor_set_layout(device: &Device) let sampler_binding = vk::DescriptorSetLayoutBinding::builder() .binding(1) - .descriptor_type(vk::DescriptorType::COMBINED_IMAGE_SAMPLER) + .descriptor_type(vk::DescriptorType::SAMPLER) .descriptor_count(1) .stage_flags(vk::ShaderStageFlags::FRAGMENT); - let bindings = [uniform_block_binding, sampler_binding]; + let texture_binding = vk::DescriptorSetLayoutBinding::builder() + .binding(2) + .descriptor_type(vk::DescriptorType::SAMPLED_IMAGE) + .descriptor_count(1) + .stage_flags(vk::ShaderStageFlags::FRAGMENT); + + let bindings = [uniform_block_binding, sampler_binding, texture_binding]; let descriptor_set_layout_info = vk::DescriptorSetLayoutCreateInfo::builder() .bindings(&bindings); -- cgit 1.4.1