2023-03-30, 07:27
Thanks @KOPRajs for finding the exact commit! This should be easy to fix. I was digging through the entire code diff between v20 and v20.1 in a desolate search.
The memory leak is related to "zero-copy", which the DMA renderer uses. After the problematic commit, we allocate both a DMA and GLES buffer. The DMA buffer is used and released, the but a new GLES buffer is allocated every frame and never released, sucking up memory. It's not technically a leak because the memory is tracked and freed when the game ends. I would call it a memory exhaustion bug. Fix incoming.
I'll keep playing with the GLES code you've provided. Kodi's devcon is this weekend but next week I'll have a GLES device to test with.
The memory leak is related to "zero-copy", which the DMA renderer uses. After the problematic commit, we allocate both a DMA and GLES buffer. The DMA buffer is used and released, the but a new GLES buffer is allocated every frame and never released, sucking up memory. It's not technically a leak because the memory is tracked and freed when the game ends. I would call it a memory exhaustion bug. Fix incoming.
I'll keep playing with the GLES code you've provided. Kodi's devcon is this weekend but next week I'll have a GLES device to test with.