The game is built upon UE4 and we use stencil for optimization purpose. The issue is that when we deployed the game on Snapdragon Adreno series, it worked as expected. However, it failed on the Mali GPU. After debugging, we found out the stencil write operation failed, but I couldn't extract the depth stencil texture by using Graphics Analyzer.
Here is the screenshot:
For the trace config, I have changed to Everything, but the result has no difference.
Thanks in advance.
If you pause the capture and restart do the buttons become accessible?
Nope. We are using a customized UE4 engine, is there any setting we need to set for those captures with UE4?
Hi Peter, we have found that after we remove glDiscardFramebufferEXT(target=GL_FRAMEBUFFER, numAttachments=1, attachments=[GL_DEPTH_ATTACHMENT]), the stencil works. It looks like when we discards depth, the stencil value lost as well.
Thanks, I'll raise a bug with the driver team.
The driver team have pointed out that the behavior you are getting is expected, based on the extension spec for glDiscardFramebufferEXT when using packed depth/stencil attachments.
From the extension spec:
2) What happens if the app discards only one of the depth and stencil attachments, but those are backed by the same packed_depth_stencil buffer? a) Generate an error b) Both images become undefined c) Neither image becomes undefined d) Only one of the images becomes undefined RESOLVED: (b) which sort of falls out of Issue 4.
2) What happens if the app discards only one of the depth and stencil attachments, but those are backed by the same packed_depth_stencil buffer?
RESOLVED: (b) which sort of falls out of Issue 4.
https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_discard_framebuffer.txt
Kind regards, Pete
Just one follow up on this one - we've tested on our stock drivers and cannot reproduce this problem. Can you let us know what device and driver version (GL_RENDERER and GL_VERSION string) you are using, and we can raise with the device manufacturer.