diff --git a/GLMakie/src/GLAbstraction/GLTypes.jl b/GLMakie/src/GLAbstraction/GLTypes.jl index a4d3f5e88ce..5936ca9ba61 100644 --- a/GLMakie/src/GLAbstraction/GLTypes.jl +++ b/GLMakie/src/GLAbstraction/GLTypes.jl @@ -431,6 +431,8 @@ include("GLRenderObject.jl") #################################################################################### # freeing +# const TRACE_FREE = Ref(false) + function free(x::T, called_from_finalizer = false) where {T} # don't free if already freed (this should only be set by unsafe_free) x.id == 0 && return @@ -439,6 +441,17 @@ function free(x::T, called_from_finalizer = false) where {T} # to be active or alive here, because unsafe_free() may also do # cleanup that doesn't depend on context + # if TRACE_FREE[] + # try + # error("tracing...") + # catch e + # bt = catch_backtrace() + # Threads.@spawn begin + # @warn "free(::$T)" exception = (e, bt) + # end + # end + # end + # This may be called from the scene finalizer in which case no errors and # no printing allowed from the current task if called_from_finalizer diff --git a/GLMakie/src/gl_backend.jl b/GLMakie/src/gl_backend.jl index 13b9d0b9634..ec0237394f4 100644 --- a/GLMakie/src/gl_backend.jl +++ b/GLMakie/src/gl_backend.jl @@ -39,10 +39,10 @@ function get_texture!(context, atlas::Makie.TextureAtlas, called_from_finalizer catch e if called_from_finalizer Threads.@spawn begin - @error "Cached atlas textures should be removed explicitly!" exception = (e, catch_backtrace()) + @error "Cached atlas textures should be removed explicitly! Dropping $(tex_func[1].id)" exception = (e, catch_backtrace()) end else - @error "Cached atlas textures should be removed explicitly!" exception = (e, catch_backtrace()) + @error "Cached atlas textures should be removed explicitly! Dropping $(tex_func[1].id)" exception = (e, catch_backtrace()) end end tex_func[1].id = 0 # Should get cleaned up when OpenGL context gets destroyed diff --git a/GLMakie/src/postprocessing.jl b/GLMakie/src/postprocessing.jl index a32276b8fb6..467bd6df07e 100644 --- a/GLMakie/src/postprocessing.jl +++ b/GLMakie/src/postprocessing.jl @@ -399,6 +399,7 @@ function construct(::Val{:FXAA1}, screen, framebuffer, inputs, parent) loadshader("postprocessing/postprocess.frag"), view = Dict("FILTER_IN_SHADER" => filter_fxaa_in_shader ? "#define FILTER_IN_SHADER" : "") ) + filter_fxaa_in_shader || pop!(inputs, :objectid_buffer) robj = RenderObject(inputs, shader, PostprocessPrerender(), nothing, screen.glscreen) robj.postrenderfunction = () -> draw_fullscreen(robj.vertexarray.id) diff --git a/GLMakie/test/glmakie_refimages.jl b/GLMakie/test/glmakie_refimages.jl index 0971ef44d36..30dcfd0cef2 100644 --- a/GLMakie/test/glmakie_refimages.jl +++ b/GLMakie/test/glmakie_refimages.jl @@ -170,7 +170,7 @@ end end @reference_test "render stage parameters with SSAO postprocessor" begin - GLMakie.closeall() + GLMakie.closeall() # (mostly?) for recompilation of plot shaders GLMakie.activate!(ssao = true) f = Figure() ps = [Point3f(x, y, sin(x * y + y-x)) for x in range(-2, 2, length=21) for y in range(-2, 2, length=21)]