Skip to content

Commit

Permalink
Backends: Metal: Fixed texture storage mode when building on Mac Cata…
Browse files Browse the repository at this point in the history
…lyst. (#3748)
  • Loading branch information
Belinsky-L-V authored and ocornut committed Jan 25, 2021
1 parent f144c67 commit 695a4bd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion backends/imgui_impl_metal.mm
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

// CHANGELOG
// (minor and older changes stripped away, please see git history for details)
// 2021-01-25: Metal: Fixed texture storage mode when building on Mac Catalyst.
// 2019-05-29: Metal: Added support for large mesh (64K+ vertices), enable ImGuiBackendFlags_RendererHasVtxOffset flag.
// 2019-04-30: Metal: Added support for special ImDrawCallback_ResetRenderState callback to reset render state.
// 2019-02-11: Metal: Projecting clipping rectangles correctly using draw_data->FramebufferScale to allow multi-viewports for retina display.
Expand Down Expand Up @@ -238,7 +239,7 @@ - (void)makeFontTextureWithDevice:(id<MTLDevice>)device
height:(NSUInteger)height
mipmapped:NO];
textureDescriptor.usage = MTLTextureUsageShaderRead;
#if TARGET_OS_OSX
#if TARGET_OS_OSX || TARGET_OS_MACCATALYST
textureDescriptor.storageMode = MTLStorageModeManaged;
#else
textureDescriptor.storageMode = MTLStorageModeShared;
Expand Down
3 changes: 2 additions & 1 deletion docs/CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ HOW TO UPDATE?

Other Changes:

- ImDrawList: fixed AddCircle()/AddCircleFilled() with (rad > 0.0f && rad < 1.0f && num_segments == 0). (#3738)
- ImDrawList: Fixed AddCircle()/AddCircleFilled() with (rad > 0.0f && rad < 1.0f && num_segments == 0). (#3738)
Would lead to a buffer read overflow.
- Backends: Metal: Fixed texture storage mode when building on Mac Catalyst. (#3748) [@Belinsky-L-V]


-----------------------------------------------------------------------
Expand Down

0 comments on commit 695a4bd

Please # to comment.