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

[vo/opengl] dither setup: OpenGL error INVALID_ENUM #4519

Closed
alfrix opened this Issue Jun 15, 2017 · 23 comments

Comments

Projects
None yet
7 participants
@alfrix

alfrix commented Jun 15, 2017

This error started to show up since version 25, however mpv seems to work regardless of this issue.

Win10 15063
Nvidia 9600gt (driver 342.01)
Mpv 0.25

Playing: .\1-Black Clipping.mp4
 (+) Video --vid=1 (*) (h264 1920x1080 23.976fps)
[vo/opengl] High bit depth FBOs unsupported. Enabling dumb mode.
[vo/opengl] Most extended features will be disabled.
VO: [opengl] 1920x1080 yuv420p
[vo/opengl] dither setup: OpenGL error INVALID_ENUM.
MPV_VERSION=mpv 0.25.0
V: 00:00:00 / 00:05:00 (0%) DS: 3.560/1
Exiting... (Quit)

Git version

Playing:
 .\1-Black Clipping.mp4
 (+) Video --vid=1 (*) (h264 1920x1080 23.976fps)
[vo/opengl] High bit depth FBOs unsupported. Enabling dumb mode.
[vo/opengl] Most extended features will be disabled.
VO: [opengl] 1920x1080 yuv420p
[vo/opengl] dither setup: OpenGL error INVALID_ENUM.
MPV_VERSION=mpv 0.25.0-117-g4e12baf3d
V: 00:00:01 / 00:05:00 (0%) DS: 3.548/6
Exiting... (Quit)

Reproduction steps

play any video

### Expected behavior
No errors like in 24

Playing: .\1-Black Clipping.mp4
 (+) Video --vid=1 (*) (h264)
[vo/opengl] High bit depth FBOs unsupported. Enabling dumb mode.
[vo/opengl] Most extended features will be disabled.
VO: [opengl] 1920x1080 yuv420p
MPV_VERSION=mpv 0.24.0-git-0f1afc6ba
V: 00:00:01 / 00:05:00 (0%) DS: 3.543/2
Exiting... (Quit)
@Hrxn

This comment has been minimized.

Hrxn commented Jun 15, 2017

I think that's the real problem here:

[vo/opengl] High bit depth FBOs unsupported. Enabling dumb mode.

@haasn

This comment has been minimized.

Member

haasn commented Jun 15, 2017

Regardless of high bit FBOs being supported or not, mpv should not normally be throwing OpenGL errors, and this sounds like a regression. But without a log it's impossible to say anything else.

@alfrix

This comment has been minimized.

alfrix commented Jun 15, 2017

@haasn

This comment has been minimized.

Member

haasn commented Jun 15, 2017

Hmm, don't see anything particular that seems out of place. Does --dither=no help? (although I think “dither setup” might be a red herring)

@alfrix

This comment has been minimized.

alfrix commented Jun 15, 2017

Does --dither=no help?

yes, no errors in that case

dither=8 also causes the error

@lachs0r

This comment has been minimized.

Member

lachs0r commented Jun 15, 2017

Could be a problem with ANGLE. Try with my builds, and if that doesn’t work, a different --opengl-backend.

@alfrix

This comment has been minimized.

alfrix commented Jun 16, 2017

Could be a problem with ANGLE

Yes it is, because it doesn't happen with --opengl-backend=win or --opengl-backend=dxinterop

Try with my builds

The first short log it´s from your build (MPV_VERSION=mpv 0.25.0)

@Hrxn

This comment has been minimized.

Hrxn commented Jun 16, 2017

What happens if you try ffplay? Does this work without any issues?

@haasn

This comment has been minimized.

Member

haasn commented Jun 16, 2017

What happens if you try ffplay? Does this work without any issues?

Don't see how that's relevant at all. We essentially already know the problem has something to do with the texture format being chosen to upload the dither texture. I doubt ffplay is relevant at all.

@wm4

This comment has been minimized.

Contributor

wm4 commented Jun 16, 2017

ffplay uses SDL's YUV overlay feature for video, so you get "whatever" (literally). So, very not relevant.

@Hrxn

This comment has been minimized.

Hrxn commented Jun 16, 2017

Yeah, but the GPU is rather old, and so is the driver. If mpv switches to OpenGL dumb mode, it could indicate that something is not working properly, or not supported at all.
If you try to run ffplay on an somewhat old system, you should get a similar OpenGL error message, and it probably doesn't work at all because it doesn't have mpv's fallback mechanism.

@alfrix

This comment has been minimized.

alfrix commented Jun 16, 2017

I don't see how ffplay is relevant but here you go https://pastebin.com/jGTX1b6r

@quilloss

This comment has been minimized.

@wm4

This comment has been minimized.

Contributor

wm4 commented Jun 16, 2017

Actually if the else branch happens, it should error out or so.

But no idea why the else branch would happen in the first place. It could happen only with old GLES versions.

@Hrxn

This comment has been minimized.

Hrxn commented Jun 16, 2017

Okay no error with ffplay, then scratch that.
mpv shouldn't be in OpenGL dumb mode, but it somehow is.
But I think it's something specific to your config still..

@quilloss

This comment has been minimized.

Contributor

quilloss commented Jun 16, 2017

It could happen only with old GLES versions.

I thought GLES 2.0 doesn't support 16 bit textures.

@alfrix

This comment has been minimized.

alfrix commented Jun 16, 2017

The OpenGL support of the 9600gt https://pastebin.com/V650b0wM
Edit: Report generated by "OpenGL Extensions Viewer 5.0"
The card has 512mb of memory not 40mb as stated

@haasn

This comment has been minimized.

Member

haasn commented Jun 16, 2017

mpv shouldn't be in OpenGL dumb mode, but it somehow is

I don't get why you're so hung up about dumb mode. Dumb mode literally exists to make sure mpv works properly on environments like this. Entering dumb mode on hardware where nothing else is supported is not a bug, but erroring during dither texture creation certainly is.

@wm4

This comment has been minimized.

Contributor

wm4 commented Jun 16, 2017

Dumb mode doesn't even disable dithering.

Anyway, the real issue is that GLES 3.0 context creation seems to fail. It shouldn't fail, because his ANGLE is new and I suppose he uses nvidia d3d11 drivers.

The dithering thing is a bug (it should either fallback to a working dithering method, or disable it), but the real problem is that something is going wrong with ANGLE.

@alfrix

This comment has been minimized.

alfrix commented Jun 16, 2017

Anyway, the real issue is that GLES 3.0 context creation seems to fail.

I believe that this card doesn´t support GLES 3.0 since that would require OGL 4.3

i was sure that this bug appeared on 0.25, but after looking at f8861f6 it may be older

@Hrxn

This comment has been minimized.

Hrxn commented Jun 17, 2017

Dumb mode doesn't even disable dithering.

Was just going to ask since when, but okay he already found it: f8861f6, Mar 20 2017.

I believe that this card doesn´t support GLES 3.0 since that would require OGL 4.3

That's the real question. Maybe it's somehow trying to run something between GLES 2 and GLES 3, heh.

@rossy

This comment has been minimized.

Member

rossy commented Jun 17, 2017

Yeah, IIRC ANGLE only supports GLES 3.x on Direct3D feature level 10_1 and up. If that log is correct, the card only supports up to 10_0, so creating a GLES 2.0 context should be correct.

@wm4 wm4 closed this in 182bbb5 Jun 17, 2017

@wm4

This comment has been minimized.

Contributor

wm4 commented Jun 17, 2017

Yeah, IIRC ANGLE only supports GLES 3.x on Direct3D feature level 10_1 and up. If that log is correct, the card only supports up to 10_0, so creating a GLES 2.0 context should be correct.

That's a shame, given the HW can do everything we actually need. The Windows situation still sucks, I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment