How to estimate the GPU memory need when enable the MSAA for the offscreen buffer

Hi all expert,

Hardware: BXS 4-64 MC1 core GPU
OS: GHS
API: ghs_create_egl_native_pixmap_rgb565
OffscreenBufferFormat: RGB565

Change the EGL config to enable the MSAA like below
EGL_SAMPLE_BUFFERS, 1,
EGL_SAMPLES, 4,

We use offscreen buffer as a render target, When we try to enable the MSAA , the GPU needed is more than we expect. Please check the test case as below, there is no regularity in terms of the memory required to activate MSAA.

If we don’t give enough GPU memory, the program will crash

The opengl-driver is a black box to us , we don’t know what happend inside, if you understand the principle and know the calculation formular, please let me know.

Thanks a lot~

Hi axel,

Welcome to the PowerVR Developer Forum!

The size of a texture depends on internal memory layout and the underlying real texture format used to store the texture information, so going from no MSAA to 4x MSAA can take more memory than expected. Still, the numbers you show depending on MSAA values might have other factors involved. I would suggest:

  • Verify how many textures are really affected by the changes when applying 2x MSAA and 4x MSAA.
  • Do each memory measurement after restarting the device to obtain a clean memory measurement in case any memory leaks are present.

Best regards,
Alejandro

Hi AlejandroC,

Thanks for your reply,

Only 4 buffer with resolution 1920x900 are affected by the change
The measurement occurs after the initialization buffer is completed, and no other operations are performed.

Is there any way to save the GPU memory and enable the MSAA