Resource corruption with secure contexts on Mali G71 and G72

Hi,

On the G71 (Samsung Galaxy 8) and G72 (Samsung Galaxy 9) we are having issues using the EGL_EXT_protected_content and GL_EXT_protected_textures extensions in our pipeline.

It seems that repeated destruction and creation of a secure context results in corrupted textures (ghosting, flashing screens, blocky artifacts across the screen). At first we thought it was a synchronisation issue, but adding in fences at appropriate points unfortunately didn't do anything. glFinish() calls seemed to improve the situation a little, but it just took slightly longer to see the problem happening again.

This is also happening when we use either textures or hardware buffers. The G71 exhibits the behaviour within the first 2-3 context recreations, and the G72 takes slightly longer.

We've modified one of the NDK samples that renders to a texture for a test case and are happy to send over the APK if anyone wants to have a better look at what's happening.

Cheers,

Ray