-
-
Notifications
You must be signed in to change notification settings - Fork 10.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MacOS runtime warnings regarding access of NSView/NSWindow properties from a non-main thread #7393
Open
tim-rex
wants to merge
6
commits into
ocornut:master
Choose a base branch
from
tim-rex:NS_main_thread_runtime
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Commits on Mar 12, 2024
-
Resolve Xcode runtime warnings regarding access of NSView/NSWindow pr…
…operties from a non-main thread This issue presents when rendering from a thread that is other than the window thread, more easily reproduced when disabling vsync This commit aims to populate the relevant data into backend_data, by way of dispatch_async (ocurring on the main thread). Those particular backend data items are protected by an NSlock There may be more elegant ways to do this Main Thread Checker imgui/backends/imgui_impl_osx.mm:608 -[NSView window] must be used from main thread only imgui/backends/imgui_impl_osx.mm:608 -[NSWindow backingScaleFactor] must be used from main thread only imgui/backends/imgui_impl_osx.mm:609 -[NSView bounds] must be used from main thread only
Configuration menu - View commit details
-
Copy full SHA for bda15db - Browse repository at this point
Copy the full SHA bda15dbView commit details -
Resolve Xcode runtime warnings regarding access of NSView/NSWindow pr…
…operties from a non-main thread This issue presents when rendering from a thread that is other than the window thread, more easily reproduced when disabling vsync This commit aims to populate the relevant data into backend_data, by way of dispatch_async (ocurring on the main thread). Those particular backend data items are protected by an NSlock There may be more elegant ways to do this Main Thread Checker imgui/backends/imgui_impl_osx.mm:608 -[NSView window] must be used from main thread only imgui/backends/imgui_impl_osx.mm:608 -[NSWindow backingScaleFactor] must be used from main thread only imgui/backends/imgui_impl_osx.mm:609 -[NSView bounds] must be used from main thread only
Configuration menu - View commit details
-
Copy full SHA for 1a11a31 - Browse repository at this point
Copy the full SHA 1a11a31View commit details
Commits on Mar 14, 2024
-
Needed a little more work to resolve a number of outstanding thread s…
…anitiser concerns This is a little nasty.. I'm trying to keep all changes localised to imgui_impl_osx.mm Ideally the ImGui_IO_lock would live within ImGuiIO but I didn't want to muddy the waters Perhaps better if this lock primitive is delivered through BackendPlatformUserData, and only used where provided This change requires the client platform to explicitly lock the primitive from outside of ImGui around ImGui::NewFrame specifically, and additionally from anywhere on the client side (external to ImGui) that concurrently hooks into ImGuiIO That requires the client to define an extern lock (and use it appropriately) extern NSlock *ImGui_IO_lock If this lock were native to ImGui we could have ImGui::NewFrame() handle the lock on our behalf, negating the need for client side locking
Configuration menu - View commit details
-
Copy full SHA for c0623e9 - Browse repository at this point
Copy the full SHA c0623e9View commit details -
Configuration menu - View commit details
-
Copy full SHA for a30bc7e - Browse repository at this point
Copy the full SHA a30bc7eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7360718 - Browse repository at this point
Copy the full SHA 7360718View commit details -
Configuration menu - View commit details
-
Copy full SHA for 756feb8 - Browse repository at this point
Copy the full SHA 756feb8View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.