1
0
mirror of https://github.com/ocornut/imgui.git synced 2024-11-27 17:10:57 +01:00

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;

View File

@ -76,6 +76,8 @@ Other changes:
with IMGUI_DISABLE_DEBUG_TOOLS is used. (#5901) [@Teselka]
- Misc: fixed compile-time detection of SSE features on MSVC 32-bits builds. (#5943) [@TheMostDiligent]
- Backends: Allegro5: restoring using al_draw_indexed_prim() when Allegro version is >= 5.2.5. (#5937) [@Espyo]
- Backends: Vulkan: Fixed sampler passed to ImGui_ImplVulkan_AddTexture() not being honored as we were using
an immutable sampler. (#5502, #6001, #914) [@martin-ejdestig, @rytisss]
-----------------------------------------------------------------------