mpv icon indicating copy to clipboard operation
mpv copied to clipboard

OpenGL error: GL_INVALID_OPERATION

Open christoph-heinrich opened this issue 2 years ago • 5 comments

  • mpv 0.34.0-353-g230d490eca
  • Arch Linux
  • compiled from source
  • introduced in 661b5542de21d46d4d7c4693e564f4eec0526812
  • KDE Plasma 5.25.1 using Wayland
  • Mesa 22.1.2 AMD R9 380

I get the following error when using --vo=gpu-next and OpenGL: [vo/gpu-next] gl_fb_query: OpenGL error: GL_INVALID_OPERATION Other then that message, everything seems to be working as expected.

Reproduction steps

mpv --no-config --idle=yes --force-window=yes --vo=gpu-next --gpu-api=opengl Does not happen with --gpu-api=vulkan.

Expected behavior

No errors when everything is working fine.

Actual behavior

[vo/gpu-next] gl_fb_query: OpenGL error: GL_INVALID_OPERATION

Log file

output.txt

christoph-heinrich avatar Jun 21 '22 19:06 christoph-heinrich

Ah yeah, that message is from libplacebo. It's harmless but perhaps scary looking.

Dudemanguy avatar Jun 21 '22 19:06 Dudemanguy

If you can track down which exact call is the invalid one we might be able to avoid running it. (Try apitrace)

haasn avatar Jun 21 '22 19:06 haasn

For future reference: As discussed in IRC, using apitrace was not successful. Neither the Arch package (10.0) nor a compiled version showed where this error occurs. Same story for libepoxy (Arch package 1.5.10) A fix got reverted again because it caused a bunch of new problems. Regardless I tried reverting the revert, which also didn't help.

christoph-heinrich avatar Jun 22 '22 01:06 christoph-heinrich

I came across RenderDoc and tried it out.

In the call glClear() with the mask GL_COLOR_BUFFER_BIT (only happens here) it gives me a bunch of debug messages with severety "High". description GL_INVALID_OPERATION in glGetFramebufferAttachmentParameteriv(invalid pname GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE) description GL_INVALID_OPERATION in glGetFramebufferAttachmentParameteriv(invalid pname GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE) description GL_INVALID_OPERATION in glGetFramebufferAttachmentParameteriv(invalid pname GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE) description GL_INVALID_OPERATION in glGetFramebufferAttachmentParameteriv(invalid pname GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE) description GL_INVALID_OPERATION in glGetFramebufferAttachmentParameteriv(invalid pname GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE) The only place where these happen is here.

The same call also gives this debug message with severity "Info". description Shader Stats: SGPRS: 96 VGPRS: 8 Code Size: 48 LDS: 0 Scratch: 0 Max Waves: 8 Spilled SGPRs: 0 Spilled VGPRs: 0 PrivMem VGPRs: 0 DivergentLoop: 0, InlineUniforms: 0, ParamExports: 0, (PS, W64)

christoph-heinrich avatar Jul 15 '22 20:07 christoph-heinrich

That seems logical. The framebuffer likely doesn't exist the very first time that gets called. I'm not sure what the right way around this is.

Dudemanguy avatar Jul 15 '22 22:07 Dudemanguy

I’m still getting this error with vo=gpu-next and gpu-context=wayland in mpv 0.35.1 on a fully-updated Manjaro installation. Despite the error, mpv plays videos normally.

[vo/gpu-next/libplacebo] gl_fb_query: OpenGL error: GL_INVALID_OPERATION

I have tried running mpv -v and saw no other messages concerning this error.

bsmith75 avatar Apr 20 '23 23:04 bsmith75