Commit 63e22315 authored by Lepton Wu's avatar Lepton Wu Committed by Marge Bot
Browse files

render: Check GL error for glEGLImageTargetTexture2DOES

It turns out on Mali GPU, sometimes we have some GL errors on
glEGLImageTargetTexture2DOES on some NV12 format image. Before we
figure out a proper fix, call glGetError to clear it.

Signed-off-by: Lepton Wu's avatarLepton Wu <>
Reviewed-by: Chia-I Wu's avatarChia-I Wu <>
Part-of: <!793>
parent b4816904
Pipeline #572440 passed with stages
in 32 minutes and 41 seconds
......@@ -7421,6 +7421,12 @@ static int vrend_resource_alloc_texture(struct vrend_resource *gr,
} else if (has_feature(feat_egl_image_external)) {
gr->storage_bits &= ~VREND_STORAGE_GL_IMMUTABLE;
glEGLImageTargetTexture2DOES(gr->target, (GLeglImageOES) image_oes);
if ((format == VIRGL_FORMAT_NV12 ||
format == VIRGL_FORMAT_NV21 ||
format == VIRGL_FORMAT_YV12 ||
format == VIRGL_FORMAT_P010) && glGetError() != GL_NO_ERROR) {
vrend_printf("glEGLImageTargetTexture2DOES maybe fail\n");
} else {
vrend_printf( "missing GL_OES_EGL_image_external extensions\n");
glBindTexture(gr->target, 0);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment