glDiscardFramebufferEXT is a performance hint for the driver. Mobile GPUs use tile-based deferred rendering. In this context, setting any of your framebuffers to be discarded saves the work and memory of gpu, since there is no need to write them back to a single memory.
Usually you drop:
- depth buffer because it is not displayed on the screen. It is just used when rendering on gpu.
- msaa buffer as it is allowed for a smaller buffer for presentation to the screen.
In addition, any buffer that is used only for rendering on the GPU must be discarded so that it is not written back to the unified memory.
source share