17:49 anarsoul|2: enunes: as I said earlier, it probably makes sense to skip reload on invalidate if job is empty
17:49 anarsoul|2: uis: but it won't be faster than just clear
17:55 enunes: anarsoul|2: maybe that would break spec in some case, since if you don't clear but invalidate, I think invalidate is supposed to only apply for the next frame you are building and reload should still have to happen
17:55 anarsoul|2: enunes: it will not break the spec. If you invalidate the buffer, buffer contents become undefined
17:56 anarsoul|2: https://www.khronos.org/opengl/wiki/GlInvalidateFramebuffer
17:56 anarsoul|2: After glInvalidateFramebuffer is executed, the contents of the specified attachments become undefined.
18:02 enunes: do any other drivers bother to do that?
18:02 enunes: I feel like it won't be encouraging its intended use which is to prevent writeback of the rendered buffers, at the end of the frame
18:05 anarsoul|2: enunes: I check panfrost, and it has identical behavior to lima
18:05 anarsoul|2: enunes: it's just a hint to the driver if I understand correctly
18:13 enunes: anarsoul|2: btw I wrote a ping in your shaderdb fix patches some weeks ago, maybe you can add my rb and we can merge it? :)
18:14 anarsoul|2: hmmm, I didn't get an email
18:14 anarsoul|2: oh, you mean in mesa
18:14 anarsoul|2: sorry, misread it
18:15 anarsoul|2: I'll check it later today
18:15 enunes: thanks
18:16 enunes: I have some minor cleanup patches to finish and send to mesa after I get time to rework the kernel patches
18:21 anarsoul|2: enunes: see https://registry.khronos.org/OpenGL/extensions/EXT/EXT_discard_framebuffer.txt
18:23 enunes: from my read it is indeed meant to prevent writeback at end of frame, since reload at beginning of frame is already covered by Clear
18:24 enunes: but agreed that invalidate at beginning of frame doesn't violate spec
18:27 enunes: and doing something like invalidate depth/stencil at beginning of frame won't work as a user might expect as the next draw will make it "hold valid content" again so it can't be discarded anymore
18:35 anarsoul|2: enunes: After rendering, some or all of these buffers are likewise stored back to external memory so their contents can be used again in the future
18:36 anarsoul|2: so basically draw cancels invalidate
19:20 anarsoul|2: uis: can you try this mesa patch? https://gist.github.com/anarsoul/d99b3a3151c22810269e879305ea872f