mirror of
https://github.com/mpv-player/mpv
synced 2025-03-30 15:29:56 +00:00
vo_opengl: explicitly check for GL errors around framebuffer depth check
It seems like many GL implementations (including Mesa) choke on this, while others are fine. We still think that this use of the GL API is allowed by the standard (at least in the Mesa case), so to reduce confusion, explicitly check the "controversial" calls, and use an appropriate error message.
This commit is contained in:
parent
251ecf6e4b
commit
3e0d4de988
@ -3153,6 +3153,8 @@ static void init_gl(struct gl_video *p)
|
||||
if ((gl->es >= 300 || gl->version) && (gl->mpgl_caps & MPGL_CAP_FB)) {
|
||||
gl->BindFramebuffer(GL_FRAMEBUFFER, gl->main_fb);
|
||||
|
||||
debug_check_gl(p, "before retrieving framebuffer depth");
|
||||
|
||||
GLenum obj = gl->version ? GL_BACK_LEFT : GL_BACK;
|
||||
if (gl->main_fb)
|
||||
obj = GL_COLOR_ATTACHMENT0;
|
||||
@ -3166,6 +3168,8 @@ static void init_gl(struct gl_video *p)
|
||||
gl->GetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, obj,
|
||||
GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE, &depth_b);
|
||||
|
||||
debug_check_gl(p, "retrieving framebuffer depth");
|
||||
|
||||
MP_VERBOSE(p, "Reported display depth: R=%d, G=%d, B=%d\n",
|
||||
depth_r, depth_g, depth_b);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user