Backends; Vulkan: do not set VkDescriptorSetLayoutBinding::pImmutableSamplers, allow changing sampler. (#6001, #5502, #914)

Follow up to c9aef16 which removec three funtions worth of duplicate code.
This commit is contained in:
Martin Ejdestig
2022-12-16 16:48:36 +01:00
committed by ocornut
parent c9aef16066
commit e5d51866c6
2 changed files with 3 additions and 3 deletions

View File

@ -30,7 +30,7 @@
// CHANGELOG
// (minor and older changes stripped away, please see git history for details)
// 2023-01-02: Vulkan: Removed a bunch of duplicate code.
// 2023-01-02: Vulkan: Fixed sampler passed to ImGui_ImplVulkan_AddTexture() not being honored + removed a bunch of duplicate code.
// 2022-10-11: Using 'nullptr' instead of 'NULL' as per our switch to C++11.
// 2022-10-04: Vulkan: Added experimental ImGui_ImplVulkan_RemoveTexture() for api symetry. (#914, #5738).
// 2022-01-20: Vulkan: Added support for ImTextureID as VkDescriptorSet. User need to call ImGui_ImplVulkan_AddTexture(). Building for 32-bit targets requires '#define ImTextureID ImU64'. (#914).
@ -870,12 +870,10 @@ bool ImGui_ImplVulkan_CreateDeviceObjects()
if (!bd->DescriptorSetLayout)
{
VkSampler sampler[1] = {bd->FontSampler};
VkDescriptorSetLayoutBinding binding[1] = {};
binding[0].descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER;
binding[0].descriptorCount = 1;
binding[0].stageFlags = VK_SHADER_STAGE_FRAGMENT_BIT;
binding[0].pImmutableSamplers = sampler;
VkDescriptorSetLayoutCreateInfo info = {};
info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO;
info.bindingCount = 1;