Skip to content

Commit f36bce3

Browse files
committed
Merge branch 'docking' of github.com:ocornut/imgui into HEAD
2 parents db40bda + 44aa9a4 commit f36bce3

26 files changed

+681
-264
lines changed

.github/workflows/build.yml

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ on:
1717

1818
jobs:
1919
Windows:
20-
runs-on: windows-2019
20+
runs-on: windows-2025
2121
env:
22-
VS_PATH: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\
23-
MSBUILD_PATH: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\
22+
VS_PATH: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\
23+
MSBUILD_PATH: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\
2424
steps:
2525
- uses: actions/checkout@v4
2626

@@ -40,8 +40,8 @@ jobs:
4040
run: |
4141
# CI workers do not supporter older Visual Studio versions. Fix projects to target newer available version.
4242
gci -recurse -filter "*.vcxproj" | ForEach-Object {
43-
(Get-Content $_.FullName) -Replace "<PlatformToolset>v\d{3}</PlatformToolset>","<PlatformToolset>v142</PlatformToolset>" | Set-Content -Path $_.FullName
44-
(Get-Content $_.FullName) -Replace "<WindowsTargetPlatformVersion>[\d\.]+</WindowsTargetPlatformVersion>","<WindowsTargetPlatformVersion>10.0.18362.0</WindowsTargetPlatformVersion>" | Set-Content -Path $_.FullName
43+
(Get-Content $_.FullName) -Replace "<PlatformToolset>v\d{3}</PlatformToolset>","<PlatformToolset>v143</PlatformToolset>" | Set-Content -Path $_.FullName
44+
(Get-Content $_.FullName) -Replace "<WindowsTargetPlatformVersion>[\d\.]+</WindowsTargetPlatformVersion>",'<WindowsTargetPlatformVersion>$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>' | Set-Content -Path $_.FullName
4545
}
4646
4747
# Not using matrix here because it would inflate job count too much. Check out and setup is done for every job and that makes build times way too long.
@@ -51,15 +51,11 @@ jobs:
5151
- name: Build example_null (mingw 64-bit, as DLL)
5252
shell: bash
5353
run: |
54-
echo '#ifdef _EXPORT' > example_single_file.cpp
55-
echo '# define IMGUI_API __declspec(dllexport)' >> example_single_file.cpp
56-
echo '#else' >> example_single_file.cpp
57-
echo '# define IMGUI_API __declspec(dllimport)' >> example_single_file.cpp
58-
echo '#endif' >> example_single_file.cpp
54+
echo '#define IMGUI_API __declspec(dllexport)' > example_single_file.cpp
5955
echo '#define IMGUI_IMPLEMENTATION' >> example_single_file.cpp
6056
echo '#include "misc/single_file/imgui_single_file.h"' >> example_single_file.cpp
61-
g++ -I. -Wall -Wformat -D_EXPORT -shared -o libimgui.dll -Wl,--out-implib,libimgui.a example_single_file.cpp -limm32
62-
g++ -I. -Wall -Wformat -o example_null.exe examples/example_null/main.cpp -L. -limgui
57+
g++ -I. -Wall -Wformat -shared -o libimgui.dll -Wl,--out-implib,libimgui.a example_single_file.cpp -limm32
58+
g++ -I. -Wall -Wformat -DIMGUI_API='__declspec(dllimport)' -o example_null.exe examples/example_null/main.cpp -L. -limgui
6359
rm -f example_null.exe libimgui.* example_single_file.*
6460
6561
- name: Build example_null (extra warnings, msvc 64-bit)
@@ -99,16 +95,12 @@ jobs:
9995
run: |
10096
call "%VS_PATH%\VC\Auxiliary\Build\vcvars64.bat"
10197
102-
echo #ifdef _EXPORT > example_single_file.cpp
103-
echo # define IMGUI_API __declspec(dllexport) >> example_single_file.cpp
104-
echo #else >> example_single_file.cpp
105-
echo # define IMGUI_API __declspec(dllimport) >> example_single_file.cpp
106-
echo #endif >> example_single_file.cpp
98+
echo #define IMGUI_API __declspec(dllexport) > example_single_file.cpp
10799
echo #define IMGUI_IMPLEMENTATION >> example_single_file.cpp
108100
echo #include "misc/single_file/imgui_single_file.h" >> example_single_file.cpp
109101
110-
cl.exe /D_USRDLL /D_WINDLL /D_EXPORT /I. example_single_file.cpp /LD /FeImGui.dll /link
111-
cl.exe /I. ImGui.lib /Feexample_null.exe examples/example_null/main.cpp
102+
cl.exe /D_USRDLL /D_WINDLL /I. example_single_file.cpp /LD /FeImGui.dll /link
103+
cl.exe /DIMGUI_API=__declspec(dllimport) /I. ImGui.lib /Feexample_null.exe examples/example_null/main.cpp
112104
113105
- name: Build Win32 example_glfw_opengl2
114106
shell: cmd

backends/imgui_impl_allegro5.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
// CHANGELOG
2424
// (minor and older changes stripped away, please see git history for details)
25+
// 2025-07-07: Fixed texture update broken on some platforms where ALLEGRO_LOCK_WRITEONLY needed all texels to be rewritten.
2526
// 2025-06-11: Added support for ImGuiBackendFlags_RendererHasTextures, for dynamic font atlas. Removed ImGui_ImplSDLGPU3_CreateFontsTexture() and ImGui_ImplSDLGPU3_DestroyFontsTexture().
2627
// 2025-02-18: Added ImGuiMouseCursor_Wait and ImGuiMouseCursor_Progress mouse cursor support.
2728
// 2025-01-06: Avoid calling al_set_mouse_cursor() repeatedly since it appears to leak on on X11 (#8256).
@@ -292,14 +293,12 @@ void ImGui_ImplAllegro5_UpdateTexture(ImTextureData* tex)
292293
{
293294
// Update selected blocks. We only ever write to textures regions which have never been used before!
294295
// This backend choose to use tex->Updates[] but you can use tex->UpdateRect to upload a single region.
295-
ImTextureRect r_bb = tex->UpdateRect; // Bounding box encompassing all individual updates
296+
ImTextureRect r = tex->UpdateRect; // Bounding box encompassing all individual updates
296297
ALLEGRO_BITMAP* gpu_bitmap = (ALLEGRO_BITMAP*)(intptr_t)tex->TexID;
297-
ALLEGRO_LOCKED_REGION* locked_region = al_lock_bitmap_region(gpu_bitmap, r_bb.x, r_bb.y, r_bb.w, r_bb.h, al_get_bitmap_format(gpu_bitmap), ALLEGRO_LOCK_WRITEONLY);
298+
ALLEGRO_LOCKED_REGION* locked_region = al_lock_bitmap_region(gpu_bitmap, r.x, r.y, r.w, r.h, al_get_bitmap_format(gpu_bitmap), ALLEGRO_LOCK_WRITEONLY);
298299
IM_ASSERT(locked_region && "Backend failed to update texture!");
299-
for (ImTextureRect& r : tex->Updates)
300-
for (int y = 0; y < r.h; y++)
301-
memcpy((unsigned char*)locked_region->data + locked_region->pitch * (r.y - r_bb.y + y) + (r.x - r_bb.x) * tex->BytesPerPixel, // dst
302-
tex->GetPixelsAt(r.x, r.y + y), r.w * tex->BytesPerPixel); // src, block pitch
300+
for (int y = 0; y < r.h; y++)
301+
memcpy((unsigned char*)locked_region->data + locked_region->pitch * y, tex->GetPixelsAt(r.x, r.y + y), r.w * tex->BytesPerPixel); // dst, src, block pitch
303302
al_unlock_bitmap(gpu_bitmap);
304303
tex->SetStatus(ImTextureStatus_OK);
305304
}

backends/imgui_impl_glfw.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
// CHANGELOG
3333
// (minor and older changes stripped away, please see git history for details)
3434
// 2025-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface.
35+
// 2025-07-08: Made ImGui_ImplGlfw_GetContentScaleForWindow(), ImGui_ImplGlfw_GetContentScaleForMonitor() helpers return 1.0f on Emscripten and Android platforms, matching macOS logic. (#8742, #8733)
3536
// 2025-06-18: Added support for multiple Dear ImGui contexts. (#8676, #8239, #8069)
3637
// 2025-06-11: Added ImGui_ImplGlfw_GetContentScaleForWindow(GLFWwindow* window) and ImGui_ImplGlfw_GetContentScaleForMonitor(GLFWmonitor* monitor) helper to facilitate making DPI-aware apps.
3738
// 2025-05-15: [Docking] Add Platform_GetWindowFramebufferScale() handler, to allow varying Retina display density on multiple monitors.
@@ -1003,7 +1004,7 @@ static void ImGui_ImplGlfw_UpdateMonitors()
10031004
// - Some accessibility applications are declaring virtual monitors with a DPI of 0.0f, see #7902. We preserve this value for caller to handle.
10041005
float ImGui_ImplGlfw_GetContentScaleForWindow(GLFWwindow* window)
10051006
{
1006-
#if GLFW_HAS_PER_MONITOR_DPI && !defined(__APPLE__)
1007+
#if GLFW_HAS_PER_MONITOR_DPI && !(defined(__APPLE__) || defined(__EMSCRIPTEN__) || defined(__ANDROID__))
10071008
float x_scale, y_scale;
10081009
glfwGetWindowContentScale(window, &x_scale, &y_scale);
10091010
return x_scale;
@@ -1015,7 +1016,7 @@ float ImGui_ImplGlfw_GetContentScaleForWindow(GLFWwindow* window)
10151016

10161017
float ImGui_ImplGlfw_GetContentScaleForMonitor(GLFWmonitor* monitor)
10171018
{
1018-
#if GLFW_HAS_PER_MONITOR_DPI && !defined(__APPLE__)
1019+
#if GLFW_HAS_PER_MONITOR_DPI && !(defined(__APPLE__) || defined(__EMSCRIPTEN__) || defined(__ANDROID__))
10191020
float x_scale, y_scale;
10201021
glfwGetMonitorContentScale(monitor, &x_scale, &y_scale);
10211022
return x_scale;

backends/imgui_impl_osx.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
// [X] Platform: IME support.
1313
// [x] Platform: Multi-viewport / platform windows.
1414
// Missing features or Issues:
15-
// [ ] Missing ImGuiMouseCursor_Wait and ImGuiMouseCursor_Progress cursors.
1615
// [ ] Multi-viewport: Window size not correctly reported when enabling io.ConfigViewportsNoDecoration
1716
// [ ] Multi-viewport: ParentViewportID not honored, and so io.ConfigViewportsNoDefaultParent has no effect (minor).
1817

backends/imgui_impl_osx.mm

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
// [X] Platform: IME support.
1313
// [x] Platform: Multi-viewport / platform windows.
1414
// Missing features or Issues:
15-
// [ ] Missing ImGuiMouseCursor_Wait and ImGuiMouseCursor_Progress cursors.
1615
// [ ] Multi-viewport: Window size not correctly reported when enabling io.ConfigViewportsNoDecoration
1716
// [ ] Multi-viewport: ParentViewportID not honored, and so io.ConfigViewportsNoDefaultParent has no effect (minor).
1817

@@ -35,6 +34,8 @@
3534
// CHANGELOG
3635
// (minor and older changes stripped away, please see git history for details)
3736
// 2025-XX-XX: Added support for multiple windows via the ImGuiPlatformIO interface.
37+
// 2025-07-08: [Docking] Fixed multi-viewport handling broken on 2025-06-02. (#8644, #8777)
38+
// 2025-06-27: Added ImGuiMouseCursor_Wait and ImGuiMouseCursor_Progress mouse cursor support.
3839
// 2025-06-12: ImGui_ImplOSX_HandleEvent() only process event for window containing our view. (#8644)
3940
// 2025-05-15: [Docking] Add Platform_GetWindowFramebufferScale() handler, to allow varying Retina display density on multiple monitors.
4041
// 2025-03-21: Fill gamepad inputs and set ImGuiBackendFlags_HasGamepad regardless of ImGuiConfigFlags_NavEnableGamepad being set.
@@ -118,6 +119,7 @@ + (id)_windowResizeNorthWestSouthEastCursor;
118119
+ (id)_windowResizeNorthEastSouthWestCursor;
119120
+ (id)_windowResizeNorthSouthCursor;
120121
+ (id)_windowResizeEastWestCursor;
122+
+ (id)busyButClickableCursor;
121123
@end
122124

123125
/**
@@ -465,6 +467,7 @@ bool ImGui_ImplOSX_Init(NSView* view)
465467
bd->MouseCursors[ImGuiMouseCursor_ResizeNESW] = [NSCursor respondsToSelector:@selector(_windowResizeNorthEastSouthWestCursor)] ? [NSCursor _windowResizeNorthEastSouthWestCursor] : [NSCursor closedHandCursor];
466468
bd->MouseCursors[ImGuiMouseCursor_ResizeNWSE] = [NSCursor respondsToSelector:@selector(_windowResizeNorthWestSouthEastCursor)] ? [NSCursor _windowResizeNorthWestSouthEastCursor] : [NSCursor closedHandCursor];
467469
bd->MouseCursors[ImGuiMouseCursor_Hand] = [NSCursor pointingHandCursor];
470+
bd->MouseCursors[ImGuiMouseCursor_Wait] = bd->MouseCursors[ImGuiMouseCursor_Progress] = [NSCursor respondsToSelector:@selector(busyButClickableCursor)] ? [NSCursor busyButClickableCursor] : [NSCursor arrowCursor];
468471
bd->MouseCursors[ImGuiMouseCursor_NotAllowed] = [NSCursor operationNotAllowedCursor];
469472

470473
// Note that imgui.cpp also include default OSX clipboard handlers which can be enabled
@@ -699,12 +702,7 @@ static ImGuiMouseSource GetMouseSource(NSEvent* event)
699702
static bool ImGui_ImplOSX_HandleEvent(NSEvent* event, NSView* view)
700703
{
701704
// Only process events from the window containing ImGui view
702-
void* event_handle = (__bridge void*)(event.window);
703-
void* view_handle = (__bridge void*)(view.window);
704-
if (event_handle == nullptr || view_handle == nullptr)
705-
return false;
706-
ImGuiViewport* viewport = ImGui::FindViewportByPlatformHandle(view_handle);
707-
if (viewport == nullptr || viewport->PlatformHandleRaw != event_handle)
705+
if (!ImGui::FindViewportByPlatformHandle((__bridge void*)event.window))
708706
return false;
709707

710708
ImGuiIO& io = ImGui::GetIO();
@@ -949,9 +947,6 @@ static void ImGui_ImplOSX_CreateWindow(ImGuiViewport* viewport)
949947

950948
static void ImGui_ImplOSX_DestroyWindow(ImGuiViewport* viewport)
951949
{
952-
NSWindow* window = (__bridge_transfer NSWindow*)viewport->PlatformHandleRaw;
953-
window = nil;
954-
955950
if (ImGui_ImplOSX_ViewportData* vd = (ImGui_ImplOSX_ViewportData*)viewport->PlatformUserData)
956951
{
957952
NSWindow* window = vd->Window;

backends/imgui_impl_sdl2.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
// CHANGELOG
2727
// (minor and older changes stripped away, please see git history for details)
2828
// 2025-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface.
29+
// 2025-07-08: Made ImGui_ImplSDL2_GetContentScaleForWindow(), ImGui_ImplSDL2_GetContentScaleForDisplay() helpers return 1.0f on Emscripten and Android platforms, matching macOS logic. (#8742, #8733)
2930
// 2025-06-11: Added ImGui_ImplSDL2_GetContentScaleForWindow(SDL_Window* window) and ImGui_ImplSDL2_GetContentScaleForDisplay(int display_index) helper to facilitate making DPI-aware apps.
3031
// 2025-05-15: [Docking] Add Platform_GetWindowFramebufferScale() handler, to allow varying Retina display density on multiple monitors.
3132
// 2025-04-09: [Docking] Revert update monitors and work areas information every frame. Only do it on Windows. (#8415, #8558)
@@ -128,6 +129,7 @@
128129
#ifdef __EMSCRIPTEN__
129130
#include <emscripten/em_js.h>
130131
#endif
132+
#undef Status // X11 headers are leaking this.
131133

132134
#if SDL_VERSION_ATLEAST(2,0,4) && !defined(__EMSCRIPTEN__) && !defined(__ANDROID__) && !(defined(__APPLE__) && TARGET_OS_IOS) && !defined(__amigaos4__)
133135
#define SDL_HAS_CAPTURE_AND_GLOBAL_MOUSE 1
@@ -824,7 +826,7 @@ float ImGui_ImplSDL2_GetContentScaleForWindow(SDL_Window* window)
824826
float ImGui_ImplSDL2_GetContentScaleForDisplay(int display_index)
825827
{
826828
#if SDL_HAS_PER_MONITOR_DPI
827-
#ifndef __APPLE__
829+
#if !defined(__APPLE__) && !defined(__EMSCRIPTEN__) && !defined(__ANDROID__)
828830
float dpi = 0.0f;
829831
if (SDL_GetDisplayDPI(display_index, &dpi, nullptr, nullptr) == 0)
830832
return dpi / 96.0f;

backends/imgui_impl_sdl3.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
// CHANGELOG
2525
// (minor and older changes stripped away, please see git history for details)
2626
// 2025-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface.
27+
// 2025-06-27: IME: avoid calling SDL_StartTextInput() again if already active. (#8727)
2728
// 2025-05-15: [Docking] Add Platform_GetWindowFramebufferScale() handler, to allow varying Retina display density on multiple monitors.
2829
// 2025-05-06: [Docking] macOS: fixed secondary viewports not appearing on other monitors before of parenting.
2930
// 2025-04-09: [Docking] Revert update monitors and work areas information every frame. Only do it on Windows. (#8415, #8558)
@@ -187,7 +188,7 @@ static void ImGui_ImplSDL3_PlatformSetImeData(ImGuiContext*, ImGuiViewport* view
187188
SDL_SetTextInputArea(window, &r, 0);
188189
bd->ImeWindow = window;
189190
}
190-
if (data->WantVisible || data->WantTextInput)
191+
if (!SDL_TextInputActive(window) && (data->WantVisible || data->WantTextInput))
191192
SDL_StartTextInput(window);
192193
}
193194

backends/imgui_impl_vulkan.cpp

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
// CHANGELOG
3030
// (minor and older changes stripped away, please see git history for details)
3131
// 2025-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface.
32+
// 2025-07-07: Vulkan: Fixed texture synchronization issue introduced on 2025-06-11. (#8772)
33+
// 2025-06-27: Vulkan: Fixed validation errors during texture upload/update by aligning upload size to 'nonCoherentAtomSize'. (#8743, #8744)
3234
// 2025-06-11: Vulkan: Added support for ImGuiBackendFlags_RendererHasTextures, for dynamic font atlas. Removed ImGui_ImplVulkan_CreateFontsTexture() and ImGui_ImplVulkan_DestroyFontsTexture().
3335
// 2025-05-07: Vulkan: Fixed validation errors during window detach in multi-viewport mode. (#8600, #8176)
3436
// 2025-05-07: Vulkan: Load dynamic rendering functions using vkGetDeviceProcAddr() + try both non-KHR and KHR versions. (#8600, #8326, #8365)
@@ -98,6 +100,7 @@
98100
#ifndef IM_MAX
99101
#define IM_MAX(A, B) (((A) >= (B)) ? (A) : (B))
100102
#endif
103+
#undef Status // X11 headers are leaking this.
101104

102105
// Visual Studio warnings
103106
#ifdef _MSC_VER
@@ -266,6 +269,7 @@ struct ImGui_ImplVulkan_Data
266269
{
267270
ImGui_ImplVulkan_InitInfo VulkanInitInfo;
268271
VkDeviceSize BufferMemoryAlignment;
272+
VkDeviceSize NonCoherentAtomSize;
269273
VkPipelineCreateFlags PipelineCreateFlags;
270274
VkDescriptorSetLayout DescriptorSetLayout;
271275
VkPipelineLayout PipelineLayout;
@@ -287,6 +291,7 @@ struct ImGui_ImplVulkan_Data
287291
{
288292
memset((void*)this, 0, sizeof(*this));
289293
BufferMemoryAlignment = 256;
294+
NonCoherentAtomSize = 64;
290295
}
291296
};
292297

@@ -780,7 +785,7 @@ void ImGui_ImplVulkan_UpdateTexture(ImTextureData* tex)
780785

781786
VkBuffer upload_buffer;
782787
VkDeviceSize upload_pitch = upload_w * tex->BytesPerPixel;
783-
VkDeviceSize upload_size = upload_h * upload_pitch;
788+
VkDeviceSize upload_size = AlignBufferSize(upload_h * upload_pitch, bd->NonCoherentAtomSize);
784789
{
785790
VkBufferCreateInfo buffer_info = {};
786791
buffer_info.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO;
@@ -831,6 +836,16 @@ void ImGui_ImplVulkan_UpdateTexture(ImTextureData* tex)
831836

832837
// Copy to Image:
833838
{
839+
VkBufferMemoryBarrier upload_barrier[1] = {};
840+
upload_barrier[0].sType = VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER;
841+
upload_barrier[0].srcAccessMask = VK_ACCESS_HOST_WRITE_BIT;
842+
upload_barrier[0].dstAccessMask = VK_ACCESS_TRANSFER_READ_BIT;
843+
upload_barrier[0].srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
844+
upload_barrier[0].dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
845+
upload_barrier[0].buffer = upload_buffer;
846+
upload_barrier[0].offset = 0;
847+
upload_barrier[0].size = upload_size;
848+
834849
VkImageMemoryBarrier copy_barrier[1] = {};
835850
copy_barrier[0].sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER;
836851
copy_barrier[0].dstAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;
@@ -842,7 +857,7 @@ void ImGui_ImplVulkan_UpdateTexture(ImTextureData* tex)
842857
copy_barrier[0].subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
843858
copy_barrier[0].subresourceRange.levelCount = 1;
844859
copy_barrier[0].subresourceRange.layerCount = 1;
845-
vkCmdPipelineBarrier(bd->TexCommandBuffer, VK_PIPELINE_STAGE_HOST_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, 0, 0, nullptr, 0, nullptr, 1, copy_barrier);
860+
vkCmdPipelineBarrier(bd->TexCommandBuffer, VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT | VK_PIPELINE_STAGE_HOST_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, 0, 0, nullptr, 1, upload_barrier, 1, copy_barrier);
846861

847862
VkBufferImageCopy region = {};
848863
region.imageSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
@@ -1256,6 +1271,11 @@ bool ImGui_ImplVulkan_Init(ImGui_ImplVulkan_InitInfo* info)
12561271
IM_ASSERT(info->RenderPass != VK_NULL_HANDLE);
12571272

12581273
bd->VulkanInitInfo = *info;
1274+
1275+
VkPhysicalDeviceProperties properties;
1276+
vkGetPhysicalDeviceProperties(info->PhysicalDevice, &properties);
1277+
bd->NonCoherentAtomSize = properties.limits.nonCoherentAtomSize;
1278+
12591279
#ifdef IMGUI_IMPL_VULKAN_HAS_DYNAMIC_RENDERING
12601280
ImGui_ImplVulkan_InitInfo* v = &bd->VulkanInitInfo;
12611281
if (v->PipelineRenderingCreateInfo.pColorAttachmentFormats != NULL)

0 commit comments

Comments
 (0)