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

109 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

27 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
%3CLINGO-SUB%20id%3D%22lingo-sub-2368409%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EGL_INVALID_OPERATION%20error%2C%20when%20doing%20multisample%20framebuffer%20to%20multisample%20EGL%20Surface%20blitting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2368409%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3CBR%20%2F%3EI%20am%20doing%26nbsp%3Bmultisample%20framebuffer%20to%20multisample%20EGL%20Surface%20blitting%20using%20Opengl%20ES%20in%20my%20I.MX8QM%20Eval%20board%20and%20I%20am%20getting%20error%20as%20%22%3CSPAN%3E%3CSTRONG%3EGL_INVALID_OPERATION%3C%2FSTRONG%3E%3C%2FSPAN%3E%22.%20Below%20are%20the%20steps%20I%20did.%3C%2FP%3E%3CUL%3E%3CLI%3E%3CP%20align%3D%22left%22%3E%3CSPAN%3EFrameBufferObject%20%3C%2FSPAN%3E%3CSPAN%3Ecreated%20%3C%2FSPAN%3E%3CSPAN%3Ewith%20multisampled%20renderbuffer%20attached%20%3C%2FSPAN%3E%3CSPAN%3Eas%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%3CSTRONG%3EglRenderbufferStorageMultisample%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%3E(GL_RENDERBUFFER%2C%204%2C%20GL_RGBA8%2C%20width%2Cheight)%3B%20and%20drawing%20in%20to%20FBO.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CSPAN%3E%3CSPAN%3EWhen%20using%26nbsp%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%3E%3CSPAN%3E%3CSTRONG%3EglBlitFramebuffer%20%3C%2FSTRONG%3Eto%20render%20from%20FBO%20in%20to%20Default%20Framebuffer%20%2Cit%20gives%20%3CSTRONG%3EGL_INVALID_OPERATION%3C%2FSTRONG%3E%26nbsp%3Berror%20when%26nbsp%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%3E%3CSPAN%3EEGL%20window%20surface%20is%20created%20with%20%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%3E%3CSPAN%3Eattributes%3A%3C%2FSPAN%3E%3C%2FSPAN%3E%3CUL%3E%3CLI%3E%3CP%20align%3D%22left%22%3EEGL_SAMPLES%20%3D%204%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%20align%3D%22left%22%3EEGL_RED_SIZE%20%3D%208%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%20align%3D%22left%22%3EEGL_GREEN_SIZE%20%3D%208%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%20align%3D%22left%22%3EEGL_BLUE_SIZE%20%3D%208%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%20align%3D%22left%22%3EEGL_ALPHA_SIZE%20%3D%208%3C%2FP%3E%3C%2FLI%3E%3C%2FUL%3E%3C%2FLI%3E%3CLI%3E%3CSPAN%3E%3CSPAN%3EWhen%20EGL%20Surface%26nbsp%3B%20is%20created%20with%26nbsp%3B%3C%2FSPAN%3E%3C%2FSPAN%3EEGL_SAMPLES%20%3D%200%26nbsp%3B%3CSPAN%3E%3CSTRONG%3EglBlitFramebuffer%20%3C%2FSTRONG%3Edraws%20in%20to%20default%20framebuffer%20correctly.%3C%2FSPAN%3E%3CSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3ENote%3A%26nbsp%3B%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%3ESource%20and%20Destination%20rectangles%20are%26nbsp%3B%20exactly%20same%20size%20in%20the%26nbsp%3B%3CSTRONG%3EglBlitFramebuffer%3C%2FSTRONG%3E.%3C%2FSPAN%3E%3C%2FLI%3E%3C%2FUL%3E%3C%2FLINGO-BODY%3E