You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make cleanup of OpenGL objects explicit in GLMakie (#4699)
* pull tweaks from #4689
* pull context validation from #4689
* handle texture atlas explicitly + fix errors
* explicitly clean up shaders & programs
* handle GLBuffer, GLVertexArray, Postprocessors
* handle Texture explicitly
* fix SSAO error
* test cleanup
* add some sanity checks
* fix tests
* cleanup finalizers, free(), unsafe_free()
* skip GLFW initialized assert for CI
* update changelog
* fix freeing of unused uniforms & cleanup unused pattern_sections
* count and check failed OpenGL cleanup
* try to handle GLFW CI failure
* try fix CI
* require context for Texture and GLBuffer in most cases
* fix incorrect uniform cleanup
* CI please
* fix typo
* try handling GLFW init errors differently
* maybe just destroy the window if the context dies?
* fix typos
* maybe also cleanup dead screens when trying to reopen?
* tweak require_context to maybe catch error earlier
* switch before requiring
* avoid requiring context for get_texture and thus robj cleanup
* treat scene finalizer
* Treat scene finalizer in texture atlas too
* add missing passthrough
* move object deletion test to end
* warn on dead context
* avoid the last few current_context() calls
* fix scatter indices
* put finalizers behind debug constant
* don't skip observable cleanup in free
* cleanup require_context
* fix typo
* fix test errors
* clean up
* fix errors
* fix freeing of GLBuffer Observables
* cleanup unsafe_free
* cleanup called_from_finalizer & add comments to implied functions
* remove try .. catch in free
* slightly safer + better verify_free
* some small cleanups
* need to switch context
* catch GC bugs early and try destroy! outside
* switch context, since those can be called from anywhere
* switch instead of require
---------
Co-authored-by: SimonDanisch <[email protected]>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1
Original file line number
Diff line number
Diff line change
@@ -29,6 +29,7 @@
29
29
- Fixed gaps in corners of `poly(Rect2(...))` stroke [#4664](https://github.com/MakieOrg/Makie.jl/pull/4664)
30
30
- Fixed an issue where `reinterpret`ed arrays of line points were not handled correctly in CairoMakie [#4668](https://github.com/MakieOrg/Makie.jl/pull/4668).
31
31
- Fixed various issues with `markerspace = :data`, `transform_marker = true` and `rotation` for scatter in CairoMakie (incorrect marker transformations, ignored transformations, Cairo state corruption) [#4663](https://github.com/MakieOrg/Makie.jl/pull/4663)
32
+
- Refactored OpenGL cleanup to run immediately rather than on GC [#4699](https://github.com/MakieOrg/Makie.jl/pull/4699)
Copy file name to clipboardExpand all lines: GLMakie/src/GLAbstraction/AbstractGPUArray.jl
+2-2
Original file line number
Diff line number
Diff line change
@@ -190,8 +190,8 @@ gpu_setindex!(t) = error("gpu_setindex! not implemented for: $(typeof(t)). This
190
190
max_dim(t) =error("max_dim not implemented for: $(typeof(t)). This happens, when you call setindex! on an array, without implementing the GPUArray interface")
191
191
192
192
193
-
function (::Type{GPUArrayType})(data::Observable; kw...) where GPUArrayType <:GPUArray
194
-
gpu_mem =GPUArrayType(data[]; kw...)
193
+
function (::Type{GPUArrayType})(context, data::Observable; kw...) where GPUArrayType <:GPUArray
194
+
gpu_mem =GPUArrayType(context, data[]; kw...)
195
195
#TODO merge these and handle update tracking during construction
0 commit comments