2368409_en-US

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

2368409_en-US

2368409_en-US

GL_INVALID_OPERATION error, when doing multisample framebuffer to multisample EGL Surface blitting

Hi,
I am doing multisample framebuffer to multisample EGL Surface blitting using Opengl ES in my I.MX8QM Eval board and I am getting error as "GL_INVALID_OPERATION". Below are the steps I did.

  • FrameBufferObject created with multisampled renderbuffer attached as  glRenderbufferStorageMultisample(GL_RENDERBUFFER, 4, GL_RGBA8, width,height); and drawing in to FBO.

  • When using glBlitFramebuffer to render from FBO in to Default Framebuffer ,it gives GL_INVALID_OPERATION error when EGL window surface is created with attributes:
    • EGL_SAMPLES = 4

    • EGL_RED_SIZE = 8

    • EGL_GREEN_SIZE = 8

    • EGL_BLUE_SIZE = 8

    • EGL_ALPHA_SIZE = 8

  • When EGL Surface  is created with EGL_SAMPLES = 0 glBlitFramebuffer draws in to default framebuffer correctly.

    Note: 
    Source and Destination rectangles are  exactly same size in the glBlitFramebuffer.
Re: GL_INVALID_OPERATION error, when doing multisample framebuffer to multisample EGL Surface blitti

Hello,

This kind of use case is forbidden in OpenGL ES, you cannot resolve (blit) from multisampled buffer to a multisampled buffer.

As specified in the documentation:
https://registry.khronos.org/OpenGL-Refpages/es3.0/html/glBlitFramebuffer.xhtml

GL_INVALID_OPERATION is generated if the value of GL_SAMPLE_BUFFERS for the draw buffer is greater than zero.

Best regards/Saludos,
Aldo.
Tags (1)
No ratings
Version history
Last update:
‎05-30-2026 02:50 AM
Updated by: