Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenGL error: GL_INVALID_OPERATION #10324

Closed
christoph-heinrich opened this issue Jun 21, 2022 · 6 comments
Closed

OpenGL error: GL_INVALID_OPERATION #10324

christoph-heinrich opened this issue Jun 21, 2022 · 6 comments

Comments

@christoph-heinrich
Copy link
Contributor

  • mpv 0.34.0-353-g230d490eca
  • Arch Linux
  • compiled from source
  • introduced in 661b554
  • 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

@Dudemanguy
Copy link
Member

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

@haasn
Copy link
Member

haasn commented Jun 21, 2022

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

@christoph-heinrich
Copy link
Contributor Author

christoph-heinrich commented Jun 22, 2022

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
Copy link
Contributor Author

christoph-heinrich commented Jul 15, 2022

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)

@Dudemanguy
Copy link
Member

Dudemanguy commented Jul 15, 2022

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.

@bsmith75
Copy link

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.

Dudemanguy added a commit to Dudemanguy/mpv that referenced this issue Jul 12, 2023
The original reason for this commit was to prevent a compositor error on
weston when going into the maximized state. The configured dimensions of
mpv didn't match its actual size and Weston is super strict about this
so it threw a compositor error which is fatal. It only happened in
opengl and this seemed like an OK workaround, so I went with this.
However, there's actually a far easier way to solve this problem and we
don't need this anymore. This has the benefit of avoiding a harmless
warning message that appears with gpu-next on opengl. The next commit is
the proper solution. Closes mpv-player#10324.

This reverts commit 661b554.
dyphire pushed a commit to dyphire/mpv that referenced this issue Jul 15, 2023
The original reason for this commit was to prevent a compositor error on
weston when going into the maximized state. The configured dimensions of
mpv didn't match its actual size and Weston is super strict about this
so it threw a compositor error which is fatal. It only happened in
opengl and this seemed like an OK workaround, so I went with this.
However, there's actually a far easier way to solve this problem and we
don't need this anymore. This has the benefit of avoiding a harmless
warning message that appears with gpu-next on opengl. The next commit is
the proper solution. Closes mpv-player#10324.

This reverts commit 661b554.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants