gl-renderer: Remove glGetError() check from gl_fbo_image_init()

Remove the glGetError() check from gl_fbo_image_init() after the call
to glEGLImageTargetRenderbufferStorageOES(). It would probably just
return a previous error queued by an unrelated GL call because the
error flags aren't cleared. So instead of obfuscating the code, this
commit removes that check and relies instead on the framebuffer
completeness check which will better report issues.

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
This commit is contained in:
Loïc Molinari 2024-09-06 14:40:32 +02:00
parent 0688343dec
commit 1f4d291850

View file

@ -704,8 +704,6 @@ gl_fbo_image_init(struct gl_renderer *gr,
glGenRenderbuffers(1, &rb);
glBindRenderbuffer(GL_RENDERBUFFER, rb);
gr->image_target_renderbuffer_storage(GL_RENDERBUFFER, image);
if (glGetError() == GL_INVALID_OPERATION)
goto error;
glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
GL_RENDERBUFFER, rb);
status = glCheckFramebufferStatus(GL_FRAMEBUFFER);