17:49anarsoul|2: enunes: as I said earlier, it probably makes sense to skip reload on invalidate if job is empty
17:49anarsoul|2: uis: but it won't be faster than just clear
17:55enunes: 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:55anarsoul|2: enunes: it will not break the spec. If you invalidate the buffer, buffer contents become undefined
17:56anarsoul|2: https://www.khronos.org/opengl/wiki/GlInvalidateFramebuffer
17:56anarsoul|2: After glInvalidateFramebuffer is executed, the contents of the specified attachments become undefined.
18:02enunes: do any other drivers bother to do that?
18:02enunes: 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:05anarsoul|2: enunes: I check panfrost, and it has identical behavior to lima
18:05anarsoul|2: enunes: it's just a hint to the driver if I understand correctly
18:13enunes: 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:14anarsoul|2: hmmm, I didn't get an email
18:14anarsoul|2: oh, you mean in mesa
18:14anarsoul|2: sorry, misread it
18:15anarsoul|2: I'll check it later today
18:15enunes: thanks
18:16enunes: I have some minor cleanup patches to finish and send to mesa after I get time to rework the kernel patches
18:21anarsoul|2: enunes: see https://registry.khronos.org/OpenGL/extensions/EXT/EXT_discard_framebuffer.txt
18:23enunes: 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:24enunes: but agreed that invalidate at beginning of frame doesn't violate spec
18:27enunes: 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:35anarsoul|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:36anarsoul|2: so basically draw cancels invalidate
19:20anarsoul|2: uis: can you try this mesa patch? https://gist.github.com/anarsoul/d99b3a3151c22810269e879305ea872f