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

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

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

173 Views
mallibeerala
Contributor III

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.
Tags (1)
0 Kudos
Reply
1 Reply

91 Views
AldoG
NXP TechSupport
NXP TechSupport

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.
0 Kudos
Reply