-
-
Notifications
You must be signed in to change notification settings - Fork 317
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
Make cleanup of OpenGL objects explicit in GLMakie #4699
Open
ffreyer
wants to merge
42
commits into
master
Choose a base branch
from
ff/safe-context
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.
+608
−313
Open
Changes from 20 commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
5b99033
pull tweaks from #4689
ffreyer fed962b
pull context validation from #4689
ffreyer 442b271
handle texture atlas explicitly + fix errors
ffreyer 1310186
explicitly clean up shaders & programs
ffreyer fb4bf07
handle GLBuffer, GLVertexArray, Postprocessors
ffreyer e8bf0fe
handle Texture explicitly
ffreyer d12c511
fix SSAO error
ffreyer affbfa9
test cleanup
ffreyer 18fb15f
add some sanity checks
ffreyer 437ac9f
fix tests
ffreyer 662c971
cleanup finalizers, free(), unsafe_free()
ffreyer ca120a9
skip GLFW initialized assert for CI
ffreyer 3eb56a1
update changelog
ffreyer 4722f58
fix freeing of unused uniforms & cleanup unused pattern_sections
ffreyer 39c7357
count and check failed OpenGL cleanup
ffreyer dbbf3f7
try to handle GLFW CI failure
ffreyer a500572
Merge branch 'master' into ff/safe-context
ffreyer e94363f
try fix CI
ffreyer a47ed68
require context for Texture and GLBuffer in most cases
ffreyer 4b74544
fix incorrect uniform cleanup
ffreyer c096311
CI please
ffreyer 4a1d278
fix typo
ffreyer e638450
try handling GLFW init errors differently
ffreyer 3b46514
maybe just destroy the window if the context dies?
ffreyer c7285ca
fix typos
ffreyer 0296205
maybe also cleanup dead screens when trying to reopen?
ffreyer b819240
tweak require_context to maybe catch error earlier
ffreyer 6c64137
switch before requiring
ffreyer 07e6d2e
avoid requiring context for get_texture and thus robj cleanup
ffreyer 6f6eb32
treat scene finalizer
ffreyer 54f1c1b
Treat scene finalizer in texture atlas too
ffreyer 73f78c2
add missing passthrough
ffreyer c3f2131
move object deletion test to end
ffreyer 86d4b0b
warn on dead context
ffreyer e54c2e2
avoid the last few current_context() calls
ffreyer c31bac8
fix scatter indices
ffreyer abe3d91
put finalizers behind debug constant
ffreyer bab465e
don't skip observable cleanup in free
ffreyer fa61c24
cleanup require_context
ffreyer 8c58f93
fix typo
ffreyer 667094d
fix test errors
ffreyer 41351c7
clean up
SimonDanisch File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is used as the finalizer now, to "error" when something hasn't been deleted. I also added a counter to query in CI. We could also de/activate that with an environment variable but I figured incrementing and integer doesn't really matter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO:
string(T)
seems to be pretty slow, should be moved so it only happens if the branch is true (dragged one of my benchmarks in #4689 from ~300µs down to 800µs)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't we want to completely disable finalizers and only activate them in debug mode?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think registering a finalizer is somewhat expensive, so if we only use it for debugging purposes we should just disable it via a global ( not an env var)