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

Issues with macOS after commit dead206 #4615

Closed
AirPort opened this issue Jul 17, 2017 · 53 comments
Closed

Issues with macOS after commit dead206 #4615

AirPort opened this issue Jul 17, 2017 · 53 comments

Comments

@AirPort
Copy link

AirPort commented Jul 17, 2017

mpv version and platform

git master
macOS 10.12.5

Reproduction steps

Play a video setting alternatively the opengl-pbo and the opengl-early-flush=no options

Results

  1. With opengl-early-flush=no ("needed" to play hi-fps video in audio-sync mode), the image flickers a lot both going on and off fullscreen if the video is bigger in at least one dimension than the screen resolution, everytime.

  2. opengl-pbo also causes flicker going on and off fullscreen, with any kind of video but in a less "reliable" way (roughly half the times I tested, I think).

  3. Before dead206, the opengl-pbo option used to help a lot with display-resample in fullscreen: with the option on, vsync-jitter value was pretty much stable at ~0.03, with no dropped frames and few missed ones. After the commit, the vsync-jitter value is 10x or more, and the framedrop counter runs continuosly.

This with both GPUs I can test on (integrated intel and discrete AMD).

(It's worth noting that incidentally the commit had ripercussion on the flickering system indicator/dock issue in #3746 on my machine: now they don't flicker anymore out the box, and setting the opengl-pbo option that used to be a workaround now actually makes them flicker).
EDIT: Nope, turns out it just flicker at random, and without workarounds now.

Log file

The verbose logs don't seem to show any difference before/after that commit. If you need stats dumps or other things I should test let me know.

@Akemi Akemi added the os:mac label Jul 17, 2017
@Akemi
Copy link
Member

Akemi commented Jul 17, 2017

i am wondering if adding double buffering back will fix it. can you try this branch/commit, pls.

@AirPort
Copy link
Author

AirPort commented Jul 17, 2017

It indeed seems to fix the aforementioned issues, but on the other hand it seems to have a noticeable impact on performaces in fs with display-resample and hi-fps videos (the old problem started with El Capitan?).

@Akemi
Copy link
Member

Akemi commented Jul 17, 2017

yeah most likely the old problem. i kinda hoped that it would be magically fixed now.

if you remember my little CAOpenGLLayer test from PR #4391, would you mind testing it again with libmpv from current master?

@Akemi
Copy link
Member

Akemi commented Jul 17, 2017

if you use stats.lua it can be shown via echo 'script-binding stats/display_stats_toggle' | socat - /tmp/mpvsocket in a separate terminal, providing you have socat installed.

@AirPort
Copy link
Author

AirPort commented Jul 17, 2017

Finally I can bring some good news: I used my good old 60 fps clip to test and unlike last time it seems to be smooth, both in fs and windowed.
The only weird thing is that sometimes when I start it, it begins to judder for a bit, matter of a few seconds, then it "gain" sync and it stays smooth (but maybe that's the limitation of the test program you mention in your original post?).

@haasn
Copy link
Member

haasn commented Jul 18, 2017

A logfile with --msg-level=vo=debug would be helpful.

@AirPort
Copy link
Author

AirPort commented Jul 18, 2017

Neither option: https://0x0.st/DsP.txt
Both options: https://0x0.st/DsZ.txt
opengl-pbo: https://0x0.st/DsN.txt
opengl-early-flush=no: https://0x0.st/Dsq.txt
plain display-resample: https://0x0.st/Dsc.txt
display-resample + pbo: https://0x0.st/Dsb.txt

@Akemi
Copy link
Member

Akemi commented Jul 18, 2017

i've got some time today and could test various things too. though i can't confirm every issue from @AirPort, since in the first place i never experienced the Dock/Volume overlay flicker or the fullscreen regression.

with current master i do see a slight performance regression. moving the window breaks display resample, or rather the estimated display fps drop quite drastically. which didn't happen prior to dead206. i do see a flicker every now and then, but it isn't very drastic. opengl-pbo doesn't make a difference. vsync jitter stays between 0.032-0.04. before it usually was <0.032.

current master + re-adding double buffering completely breaks the fullscreen performance for me now. i didn't have that problem before and never could reproduce that issue (#2392). vsync jitter rises up to ~1.0 and stays there for a few seconds and descend to >0.031. this repeats itself. in general with double buffering it performs even worse than without.

with my opengl-cb + CAOpenGLLayer test i get the best result. i don't experience any kind of issues. vsync jitter stays mostly constantly under 0.03. moving the window doesn't break display resample. i see no flicker.

Finally I can bring some good news: I used my good old 60 fps clip to test and unlike last time it seems to be smooth, both in fs and windowed.
The only weird thing is that sometimes when I start it, it begins to judder for a bit, matter of a few seconds, then it "gain" sync and it stays smooth (but maybe that's the limitation of the test program you mention in your original post?).

yeah there are few small limitations that could potentially cause this. though most likely the display link callback is not completely stable sometimes directly after initialising it.

@haasn
Copy link
Member

haasn commented Jul 18, 2017

Moving.. the window? Commit dead206 only changes the way textures are uploaded, it should have nothing to do with the window location.

Also if opengl-pbo doesn't make a difference, how can that commit be related if it only affects opengl-pbo?

@Akemi
Copy link
Member

Akemi commented Jul 18, 2017

Moving.. the window? Commit dead206 only changes the way textures are uploaded, it should have nothing to do with the window location.

yeah moving the window. i am just reporting what i am experience, and i am not going to claim that it makes sense. who knows what macOS and its window manager is doing but it's choking on it when moving the window around. probably just because the performance in general took a hit.

Also if opengl-pbo doesn't make a difference, how can that commit be related if it only affects opengl-pbo?

to make sure i tested dead206 and the commit before it 46bfa37. dead206 both opengl-pbo=yes and opengl-pbo=no have the window moving problem. on 46bfa37 opengl-pbo=yes doesn't have the problem but the problem occurs with opengl-pbo=no. since i have pbo activated in my config i just didn't notice. so yeah it makes sense, just that since dead206 opengl-pbo=yes also has that problem. also on dead206 opengl-pbo=no is worse than with opengl-pbo=yes.

@haasn
Copy link
Member

haasn commented Jul 18, 2017

Okay, so it seems like directly mapping the texture would be way better on OS X.

Possible solutions

  1. Test/implement direct rendering as an alternative to mapped PBOs, and rely on that to solve OS X problems
  2. Add a fallback path for mapped PBOs again and expand --opengl-pbo to allow you to choose any of the three paths

I'm planning on continuing work on #1 anyway, so it might be a good idea to just postpone this discussion until we have a better idea of whether or not DR helps.

@AirPort
Copy link
Author

AirPort commented Aug 7, 2017

Now DR landed on master, but requires at least OpenGL 4.4: is there any chance for a try with possible solution #2?

@haasn
Copy link
Member

haasn commented Aug 7, 2017

Maybe. This stuff is actually handled by ra_gl instead of vo_opengl now so getting options into it might be harder.

@ghost
Copy link

ghost commented Aug 8, 2017

Before dead206, the opengl-pbo option used to help a lot with display-resample in fullscreen: with the option on, vsync-jitter value was pretty much stable at ~0.03, with no dropped frames and few missed ones. After the commit, the vsync-jitter value is 10x or more, and the framedrop counter runs continuosly.

That was most likely a coincidence, by causing the driver to flush or something (glFlush calls also affect our cocoa backend in ways it shouldn't). OSX GL display is in limbo (both in mpv, and apparently at Apple), so the real solution is much more complex. Maybe changing the cocoa code to use opengl-cb will help.

@ghost ghost added the priority:stalled label Aug 8, 2017
@Akemi
Copy link
Member

Akemi commented Sep 1, 2017

so the past few weeks i worked on a cocoa opengl-cb 'backend' that fixes all the annoying issues we still have, at least from my tests. i still need to clean-up the code, there are still some segfaults, i need to add some build related things, etc. there is still one big issue, the initialisation. it could happen that the core starts before the opengl context is set and mpv just quits. with a 'complex' enough config that won't happen and is enough for testing.

anyway, if you want to test the linked branch just set --vo=opengl-cb.

@AirPort
Copy link
Author

AirPort commented Sep 1, 2017

Oh, I noticed some work in the test program repo some weeks ago, really happy to see it's coming along in "real" mpv. Just a question: the build exit with an error in the linking step; does it need the entire Xcode environment to build?

ld: warning: directory not found for option '-L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift_static/macosx'
ld: library not found for -lswiftCore for architecture x86_64

@Akemi
Copy link
Member

Akemi commented Sep 1, 2017

yeah for now.

@AirPort
Copy link
Author

AirPort commented Sep 1, 2017

Time to dig up my old machine then. Will report ASAP.

@Akemi
Copy link
Member

Akemi commented Sep 1, 2017

seems like the equivalent command line tools directory would be /Library/Developer/CommandLineTools/usr/lib/swift_static/macosx. might be easier to use your normal machine and change that path here.

@AirPort
Copy link
Author

AirPort commented Sep 1, 2017

Yep, changed the line manually in wscript_build and it worked.
I did just a few quick tests and the results are really good, and pretty much any of the annoying issues seems to have disappeared: system overlays doesn't flicker anymore as far as I can see, same for the fs animation. I didn't notice any black flicker on resize, and performances are good in both windowed and fs, no matter audio or video-sync.

Just a few minor notes (although you probably already know all of this)

  • The OSD looks kinda blurry.
  • Sometimes the window's title is cut after a few letters.
  • The OSC has a strange behaviour, it appears only when the cursor is on a precise, little area of the player window.
  • A couple of opengl options doesn't seem to work, like icc-profile-auto or the timers (probably fault of opengl-cb?).
  • Sometimes it crashes on exit.

(Here's a couple images to show the first two point of the list: master and macOS_cocoa-cb2)

@Akemi
Copy link
Member

Akemi commented Sep 1, 2017

i was actually not aware of the first 3. i probably know why the first one occurs, it's related to being on a retina resolution. most likely easily fixable. for two no idea yet and 3 sounds weird but maybe related to retina again.

yeah icc-profile-auto still shows that error that it isn't supported. i already implemented the support but there is still a segfault somewhere so i deactivated it. the crash is something easily fixable, i just put it at the end of my TODO list.

@Akemi
Copy link
Member

Akemi commented Sep 1, 2017

oh i forgot the timers. yeah that is because of opengl-cb. no idea if this can be added to opengl-cb. it's probably up to @haasn, if at all. @Argon- probably would like it work for his stats.lua

@ghost
Copy link

ghost commented Sep 1, 2017

Possibly you're creating a legacy GL context.

@Akemi
Copy link
Member

Akemi commented Sep 1, 2017

to which issue might this be related?

the blurriness is because i use the pt values instead of actual pixels when drawing.

@ghost
Copy link

ghost commented Sep 1, 2017

Missing timers, I was thinking.

@Akemi
Copy link
Member

Akemi commented Sep 2, 2017

oh those timers are supposed to work with opengl-cb (eg the second page of stats.lua)? according to the log it detects the normal desktop opengl 4.1 like it is supposed to do. @haasn also reverted (#4721) his change, so it should also work on macOS again.

@ghost
Copy link

ghost commented Sep 2, 2017

Also the perf voctrl is missing, which could break this too.

@AirPort
Copy link
Author

AirPort commented Sep 3, 2017

No differences, sorry.

@Akemi
Copy link
Member

Akemi commented Sep 3, 2017

i pushed some changes that print some things to the terminal. mind rebuilding and pasting me the output of the terminal pls?

@AirPort
Copy link
Author

AirPort commented Sep 3, 2017

Sure, here.

@Akemi
Copy link
Member

Akemi commented Sep 3, 2017

okay, that is the exact same as here. i pushed another change to my branch. if that fixes it i was just being an idiot.

@AirPort
Copy link
Author

AirPort commented Sep 3, 2017

Yep, it seems that fixed it!

@Akemi
Copy link
Member

Akemi commented Sep 3, 2017

okay, that's great. i forgot that i need to update UI stuff on the main thread. this kinda explains the undefined behaviour. sry for all the trouble.

@AirPort
Copy link
Author

AirPort commented Sep 3, 2017

Np, I'm happy to help where I can.

@Akemi Akemi mentioned this issue Sep 17, 2017
Akemi added a commit to Akemi/mpv that referenced this issue Dec 11, 2017
this is meant to replace the old and not properly working vo_gpu/opengl
cocoa backend. the problems are various shortcomings of Apple's opengl
implementation and buggy behaviour in certain circumstances that can't
be properly worked around. there are also certain regressions on newer
macOS versions from 10.11 onwards.

- awful opengl performance with a none layer backed context
- huge amount of dropped frames with an early context flush
- flickering of system elements like the dock or volume indicator
- double buffering not properly working with a none layer backed context
- bad performance in fullscreen because of system optimisations

this has all features our old backend has sans the wid embedding,
the possibility to disable the automatic GPU switching and taking
screenshots of the window content. the first was deemed unnecessary by
me for now, since i just use the libmpv API that others can use anyway.
second is technically not possible atm because we have to pre-allocate
our opengl context at a time the config isn't read yet, so we can't get
the needed property. third one is a bit tricky because of deadlocking
an it needed to be in sync, hopefully i can work around that in the
future.

this also has at least one additional feature or eye-candy. a properly
working fullscreen animation with the native fs. also since this is a
direct port of the old backend of the parts that could be used, though
with adaptions and improvements, this looks a lot cleaner and easier to
understand.

some credit goes to @pigoz for the initial swift build support which
i could improve upon.

Fixes: mpv-player#5152, mpv-player#5151, mpv-player#4615, mpv-player#4476, mpv-player#3978, mpv-player#3746, mpv-player#3739, mpv-player#2392, mpv-player#2217
Akemi added a commit to Akemi/mpv that referenced this issue Dec 11, 2017
this is meant to replace the old and not properly working vo_gpu/opengl
cocoa backend. the problems are various shortcomings of Apple's opengl
implementation and buggy behaviour in certain circumstances that can't
be properly worked around. there are also certain regressions on newer
macOS versions from 10.11 onwards.

- awful opengl performance with a none layer backed context
- huge amount of dropped frames with an early context flush
- flickering of system elements like the dock or volume indicator
- double buffering not properly working with a none layer backed context
- bad performance in fullscreen because of system optimisations

this has all features our old backend has sans the wid embedding,
the possibility to disable the automatic GPU switching and taking
screenshots of the window content. the first was deemed unnecessary by
me for now, since i just use the libmpv API that others can use anyway.
second is technically not possible atm because we have to pre-allocate
our opengl context at a time the config isn't read yet, so we can't get
the needed property. third one is a bit tricky because of deadlocking
an it needed to be in sync, hopefully i can work around that in the
future.

this also has at least one additional feature or eye-candy. a properly
working fullscreen animation with the native fs. also since this is a
direct port of the old backend of the parts that could be used, though
with adaptions and improvements, this looks a lot cleaner and easier to
understand.

some credit goes to @pigoz for the initial swift build support which
i could improve upon.

Fixes: mpv-player#5152, mpv-player#5151, mpv-player#4615, mpv-player#4476, mpv-player#3978, mpv-player#3746, mpv-player#3739, mpv-player#2392, mpv-player#2217
Akemi added a commit to Akemi/mpv that referenced this issue Dec 28, 2017
this is meant to replace the old and not properly working vo_gpu/opengl
cocoa backend. the problems are various shortcomings of Apple's opengl
implementation and buggy behaviour in certain circumstances that can't
be properly worked around. there are also certain regressions on newer
macOS versions from 10.11 onwards.

- awful opengl performance with a none layer backed context
- huge amount of dropped frames with an early context flush
- flickering of system elements like the dock or volume indicator
- double buffering not properly working with a none layer backed context
- bad performance in fullscreen because of system optimisations

this has all features our old backend has sans the wid embedding,
the possibility to disable the automatic GPU switching and taking
screenshots of the window content. the first was deemed unnecessary by
me for now, since i just use the libmpv API that others can use anyway.
second is technically not possible atm because we have to pre-allocate
our opengl context at a time the config isn't read yet, so we can't get
the needed property. third one is a bit tricky because of deadlocking
an it needed to be in sync, hopefully i can work around that in the
future.

this also has at least one additional feature or eye-candy. a properly
working fullscreen animation with the native fs. also since this is a
direct port of the old backend of the parts that could be used, though
with adaptions and improvements, this looks a lot cleaner and easier to
understand.

some credit goes to @pigoz for the initial swift build support which
i could improve upon.

Fixes: mpv-player#5152, mpv-player#5151, mpv-player#4615, mpv-player#4476, mpv-player#3978, mpv-player#3746, mpv-player#3739, mpv-player#2392, mpv-player#2217
Akemi added a commit to Akemi/mpv that referenced this issue Dec 28, 2017
this is meant to replace the old and not properly working vo_gpu/opengl
cocoa backend. the problems are various shortcomings of Apple's opengl
implementation and buggy behaviour in certain circumstances that can't
be properly worked around. there are also certain regressions on newer
macOS versions from 10.11 onwards.

- awful opengl performance with a none layer backed context
- huge amount of dropped frames with an early context flush
- flickering of system elements like the dock or volume indicator
- double buffering not properly working with a none layer backed context
- bad performance in fullscreen because of system optimisations

this has all features our old backend has sans the wid embedding,
the possibility to disable the automatic GPU switching and taking
screenshots of the window content. the first was deemed unnecessary by
me for now, since i just use the libmpv API that others can use anyway.
second is technically not possible atm because we have to pre-allocate
our opengl context at a time the config isn't read yet, so we can't get
the needed property. third one is a bit tricky because of deadlocking
an it needed to be in sync, hopefully i can work around that in the
future.

this also has at least one additional feature or eye-candy. a properly
working fullscreen animation with the native fs. also since this is a
direct port of the old backend of the parts that could be used, though
with adaptions and improvements, this looks a lot cleaner and easier to
understand.

some credit goes to @pigoz for the initial swift build support which
i could improve upon.

Fixes: mpv-player#5152, mpv-player#5151, mpv-player#4615, mpv-player#4476, mpv-player#3978, mpv-player#3746, mpv-player#3739, mpv-player#2392, mpv-player#2217
Akemi added a commit to Akemi/mpv that referenced this issue Dec 28, 2017
this is meant to replace the old and not properly working vo_gpu/opengl
cocoa backend. the problems are various shortcomings of Apple's opengl
implementation and buggy behaviour in certain circumstances that can't
be properly worked around. there are also certain regressions on newer
macOS versions from 10.11 onwards.

- awful opengl performance with a none layer backed context
- huge amount of dropped frames with an early context flush
- flickering of system elements like the dock or volume indicator
- double buffering not properly working with a none layer backed context
- bad performance in fullscreen because of system optimisations

this has all features our old backend has sans the wid embedding,
the possibility to disable the automatic GPU switching and taking
screenshots of the window content. the first was deemed unnecessary by
me for now, since i just use the libmpv API that others can use anyway.
second is technically not possible atm because we have to pre-allocate
our opengl context at a time the config isn't read yet, so we can't get
the needed property. third one is a bit tricky because of deadlocking
an it needed to be in sync, hopefully i can work around that in the
future.

this also has at least one additional feature or eye-candy. a properly
working fullscreen animation with the native fs. also since this is a
direct port of the old backend of the parts that could be used, though
with adaptions and improvements, this looks a lot cleaner and easier to
understand.

some credit goes to @pigoz for the initial swift build support which
i could improve upon.

Fixes: mpv-player#5152, mpv-player#5151, mpv-player#4615, mpv-player#4476, mpv-player#3978, mpv-player#3746, mpv-player#3739, mpv-player#2392, mpv-player#2217
Akemi added a commit to Akemi/mpv that referenced this issue Jan 14, 2018
this is meant to replace the old and not properly working vo_gpu/opengl
cocoa backend. the problems are various shortcomings of Apple's opengl
implementation and buggy behaviour in certain circumstances that can't
be properly worked around. there are also certain regressions on newer
macOS versions from 10.11 onwards.

- awful opengl performance with a none layer backed context
- huge amount of dropped frames with an early context flush
- flickering of system elements like the dock or volume indicator
- double buffering not properly working with a none layer backed context
- bad performance in fullscreen because of system optimisations

this has all features our old backend has sans the wid embedding,
the possibility to disable the automatic GPU switching and taking
screenshots of the window content. the first was deemed unnecessary by
me for now, since i just use the libmpv API that others can use anyway.
second is technically not possible atm because we have to pre-allocate
our opengl context at a time the config isn't read yet, so we can't get
the needed property. third one is a bit tricky because of deadlocking
an it needed to be in sync, hopefully i can work around that in the
future.

this also has at least one additional feature or eye-candy. a properly
working fullscreen animation with the native fs. also since this is a
direct port of the old backend of the parts that could be used, though
with adaptions and improvements, this looks a lot cleaner and easier to
understand.

some credit goes to @pigoz for the initial swift build support which
i could improve upon.

Fixes:
mpv-player#5393, mpv-player#5152, mpv-player#5151, mpv-player#4615, mpv-player#4476, mpv-player#3978, mpv-player#3746, mpv-player#3739, mpv-player#2392, mpv-player#2217
Akemi added a commit to Akemi/mpv that referenced this issue Jan 14, 2018
this is meant to replace the old and not properly working vo_gpu/opengl
cocoa backend. the problems are various shortcomings of Apple's opengl
implementation and buggy behaviour in certain circumstances that can't
be properly worked around. there are also certain regressions on newer
macOS versions from 10.11 onwards.

- awful opengl performance with a none layer backed context
- huge amount of dropped frames with an early context flush
- flickering of system elements like the dock or volume indicator
- double buffering not properly working with a none layer backed context
- bad performance in fullscreen because of system optimisations

this has all features our old backend has sans the wid embedding,
the possibility to disable the automatic GPU switching and taking
screenshots of the window content. the first was deemed unnecessary by
me for now, since i just use the libmpv API that others can use anyway.
second is technically not possible atm because we have to pre-allocate
our opengl context at a time the config isn't read yet, so we can't get
the needed property. third one is a bit tricky because of deadlocking
an it needed to be in sync, hopefully i can work around that in the
future.

this also has at least one additional feature or eye-candy. a properly
working fullscreen animation with the native fs. also since this is a
direct port of the old backend of the parts that could be used, though
with adaptions and improvements, this looks a lot cleaner and easier to
understand.

some credit goes to @pigoz for the initial swift build support which
i could improve upon.

Fixes:
mpv-player#5393, mpv-player#5152, mpv-player#5151, mpv-player#4615, mpv-player#4476, mpv-player#3978, mpv-player#3746, mpv-player#3739, mpv-player#2392, mpv-player#2217
Akemi added a commit to Akemi/mpv that referenced this issue Jan 20, 2018
this is meant to replace the old and not properly working vo_gpu/opengl
cocoa backend. the problems are various shortcomings of Apple's opengl
implementation and buggy behaviour in certain circumstances that can't
be properly worked around. there are also certain regressions on newer
macOS versions from 10.11 onwards.

- awful opengl performance with a none layer backed context
- huge amount of dropped frames with an early context flush
- flickering of system elements like the dock or volume indicator
- double buffering not properly working with a none layer backed context
- bad performance in fullscreen because of system optimisations

this has all features our old backend has sans the wid embedding,
the possibility to disable the automatic GPU switching and taking
screenshots of the window content. the first was deemed unnecessary by
me for now, since i just use the libmpv API that others can use anyway.
second is technically not possible atm because we have to pre-allocate
our opengl context at a time the config isn't read yet, so we can't get
the needed property. third one is a bit tricky because of deadlocking
an it needed to be in sync, hopefully i can work around that in the
future.

this also has at least one additional feature or eye-candy. a properly
working fullscreen animation with the native fs. also since this is a
direct port of the old backend of the parts that could be used, though
with adaptions and improvements, this looks a lot cleaner and easier to
understand.

some credit goes to @pigoz for the initial swift build support which
i could improve upon.

Fixes:
mpv-player#5393, mpv-player#5152, mpv-player#5151, mpv-player#4615, mpv-player#4476, mpv-player#3978, mpv-player#3746, mpv-player#3739, mpv-player#2392, mpv-player#2217
Akemi added a commit to Akemi/mpv that referenced this issue Jan 20, 2018
this is meant to replace the old and not properly working vo_gpu/opengl
cocoa backend. the problems are various shortcomings of Apple's opengl
implementation and buggy behaviour in certain circumstances that can't
be properly worked around. there are also certain regressions on newer
macOS versions from 10.11 onwards.

- awful opengl performance with a none layer backed context
- huge amount of dropped frames with an early context flush
- flickering of system elements like the dock or volume indicator
- double buffering not properly working with a none layer backed context
- bad performance in fullscreen because of system optimisations

this has all features our old backend has sans the wid embedding,
the possibility to disable the automatic GPU switching and taking
screenshots of the window content. the first was deemed unnecessary by
me for now, since i just use the libmpv API that others can use anyway.
second is technically not possible atm because we have to pre-allocate
our opengl context at a time the config isn't read yet, so we can't get
the needed property. third one is a bit tricky because of deadlocking
an it needed to be in sync, hopefully i can work around that in the
future.

this also has at least one additional feature or eye-candy. a properly
working fullscreen animation with the native fs. also since this is a
direct port of the old backend of the parts that could be used, though
with adaptions and improvements, this looks a lot cleaner and easier to
understand.

some credit goes to @pigoz for the initial swift build support which
i could improve upon.

Fixes:
mpv-player#5393, mpv-player#5152, mpv-player#5151, mpv-player#4615, mpv-player#4476, mpv-player#3978, mpv-player#3746, mpv-player#3739, mpv-player#2392, mpv-player#2217
Akemi added a commit to Akemi/mpv that referenced this issue Jan 30, 2018
this is meant to replace the old and not properly working vo_gpu/opengl
cocoa backend. the problems are various shortcomings of Apple's opengl
implementation and buggy behaviour in certain circumstances that can't
be properly worked around. there are also certain regressions on newer
macOS versions from 10.11 onwards.

- awful opengl performance with a none layer backed context
- huge amount of dropped frames with an early context flush
- flickering of system elements like the dock or volume indicator
- double buffering not properly working with a none layer backed context
- bad performance in fullscreen because of system optimisations

this has all features our old backend has sans the wid embedding,
the possibility to disable the automatic GPU switching and taking
screenshots of the window content. the first was deemed unnecessary by
me for now, since i just use the libmpv API that others can use anyway.
second is technically not possible atm because we have to pre-allocate
our opengl context at a time the config isn't read yet, so we can't get
the needed property. third one is a bit tricky because of deadlocking
an it needed to be in sync, hopefully i can work around that in the
future.

this also has at least one additional feature or eye-candy. a properly
working fullscreen animation with the native fs. also since this is a
direct port of the old backend of the parts that could be used, though
with adaptions and improvements, this looks a lot cleaner and easier to
understand.

some credit goes to @pigoz for the initial swift build support which
i could improve upon.

Fixes:
mpv-player#5393, mpv-player#5152, mpv-player#5151, mpv-player#4615, mpv-player#4476, mpv-player#3978, mpv-player#3746, mpv-player#3739, mpv-player#2392, mpv-player#2217
Akemi added a commit to Akemi/mpv that referenced this issue Jan 30, 2018
this is meant to replace the old and not properly working vo_gpu/opengl
cocoa backend. the problems are various shortcomings of Apple's opengl
implementation and buggy behaviour in certain circumstances that can't
be properly worked around. there are also certain regressions on newer
macOS versions from 10.11 onwards.

- awful opengl performance with a none layer backed context
- huge amount of dropped frames with an early context flush
- flickering of system elements like the dock or volume indicator
- double buffering not properly working with a none layer backed context
- bad performance in fullscreen because of system optimisations

this has all features our old backend has sans the wid embedding,
the possibility to disable the automatic GPU switching and taking
screenshots of the window content. the first was deemed unnecessary by
me for now, since i just use the libmpv API that others can use anyway.
second is technically not possible atm because we have to pre-allocate
our opengl context at a time the config isn't read yet, so we can't get
the needed property. third one is a bit tricky because of deadlocking
an it needed to be in sync, hopefully i can work around that in the
future.

this also has at least one additional feature or eye-candy. a properly
working fullscreen animation with the native fs. also since this is a
direct port of the old backend of the parts that could be used, though
with adaptions and improvements, this looks a lot cleaner and easier to
understand.

some credit goes to @pigoz for the initial swift build support which
i could improve upon.

Fixes:
mpv-player#5393, mpv-player#5152, mpv-player#5151, mpv-player#4615, mpv-player#4476, mpv-player#3978, mpv-player#3746, mpv-player#3739, mpv-player#2392, mpv-player#2217

cocoa-cb: initial implementation via opengl-cb API
Akemi added a commit to Akemi/mpv that referenced this issue Jan 31, 2018
this is meant to replace the old and not properly working vo_gpu/opengl
cocoa backend. the problems are various shortcomings of Apple's opengl
implementation and buggy behaviour in certain circumstances that can't
be properly worked around. there are also certain regressions on newer
macOS versions from 10.11 onwards.

- awful opengl performance with a none layer backed context
- huge amount of dropped frames with an early context flush
- flickering of system elements like the dock or volume indicator
- double buffering not properly working with a none layer backed context
- bad performance in fullscreen because of system optimisations

this has all features our old backend has sans the wid embedding,
the possibility to disable the automatic GPU switching and taking
screenshots of the window content. the first was deemed unnecessary by
me for now, since i just use the libmpv API that others can use anyway.
second is technically not possible atm because we have to pre-allocate
our opengl context at a time the config isn't read yet, so we can't get
the needed property. third one is a bit tricky because of deadlocking
and it needed to be in sync, hopefully i can work around that in the
future.

this also has at least one additional feature or eye-candy. a properly
working fullscreen animation with the native fs. also since this is a
direct port of the old backend of the parts that could be used, though
with adaptions and improvements, this looks a lot cleaner and easier to
understand.

some credit goes to @pigoz for the initial swift build support which
i could improve upon.

Fixes:
mpv-player#5393, mpv-player#5152, mpv-player#5151, mpv-player#4615, mpv-player#4476, mpv-player#3978, mpv-player#3746, mpv-player#3739, mpv-player#2392, mpv-player#2217
Akemi added a commit to Akemi/mpv that referenced this issue Jan 31, 2018
this is meant to replace the old and not properly working vo_gpu/opengl
cocoa backend. the problems are various shortcomings of Apple's opengl
implementation and buggy behaviour in certain circumstances that can't
be properly worked around. there are also certain regressions on newer
macOS versions from 10.11 onwards.

- awful opengl performance with a none layer backed context
- huge amount of dropped frames with an early context flush
- flickering of system elements like the dock or volume indicator
- double buffering not properly working with a none layer backed context
- bad performance in fullscreen because of system optimisations

this has all features our old backend has sans the wid embedding,
the possibility to disable the automatic GPU switching and taking
screenshots of the window content. the first was deemed unnecessary by
me for now, since i just use the libmpv API that others can use anyway.
second is technically not possible atm because we have to pre-allocate
our opengl context at a time the config isn't read yet, so we can't get
the needed property. third one is a bit tricky because of deadlocking
and it needed to be in sync, hopefully i can work around that in the
future.

this also has at least one additional feature or eye-candy. a properly
working fullscreen animation with the native fs. also since this is a
direct port of the old backend of the parts that could be used, though
with adaptions and improvements, this looks a lot cleaner and easier to
understand.

some credit goes to @pigoz for the initial swift build support which
i could improve upon.

Fixes:
mpv-player#5393, mpv-player#5152, mpv-player#5151, mpv-player#4615, mpv-player#4476, mpv-player#3978, mpv-player#3746, mpv-player#3739, mpv-player#2392, mpv-player#2217
Akemi added a commit to Akemi/mpv that referenced this issue Feb 3, 2018
this is meant to replace the old and not properly working vo_gpu/opengl
cocoa backend. the problems are various shortcomings of Apple's opengl
implementation and buggy behaviour in certain circumstances that can't
be properly worked around. there are also certain regressions on newer
macOS versions from 10.11 onwards.

- awful opengl performance with a none layer backed context
- huge amount of dropped frames with an early context flush
- flickering of system elements like the dock or volume indicator
- double buffering not properly working with a none layer backed context
- bad performance in fullscreen because of system optimisations

this has all features our old backend has sans the wid embedding,
the possibility to disable the automatic GPU switching and taking
screenshots of the window content. the first was deemed unnecessary by
me for now, since i just use the libmpv API that others can use anyway.
second is technically not possible atm because we have to pre-allocate
our opengl context at a time the config isn't read yet, so we can't get
the needed property. third one is a bit tricky because of deadlocking
and it needed to be in sync, hopefully i can work around that in the
future.

this also has at least one additional feature or eye-candy. a properly
working fullscreen animation with the native fs. also since this is a
direct port of the old backend of the parts that could be used, though
with adaptions and improvements, this looks a lot cleaner and easier to
understand.

some credit goes to @pigoz for the initial swift build support which
i could improve upon.

Fixes: mpv-player#5478, mpv-player#5393, mpv-player#5152, mpv-player#5151, mpv-player#4615, mpv-player#4476, mpv-player#3978, mpv-player#3746, mpv-player#3739,
mpv-player#2392, mpv-player#2217
Akemi added a commit to Akemi/mpv that referenced this issue Feb 7, 2018
this is meant to replace the old and not properly working vo_gpu/opengl
cocoa backend. the problems are various shortcomings of Apple's opengl
implementation and buggy behaviour in certain circumstances that can't
be properly worked around. there are also certain regressions on newer
macOS versions from 10.11 onwards.

- awful opengl performance with a none layer backed context
- huge amount of dropped frames with an early context flush
- flickering of system elements like the dock or volume indicator
- double buffering not properly working with a none layer backed context
- bad performance in fullscreen because of system optimisations

this has all features our old backend has sans the wid embedding,
the possibility to disable the automatic GPU switching and taking
screenshots of the window content. the first was deemed unnecessary by
me for now, since i just use the libmpv API that others can use anyway.
second is technically not possible atm because we have to pre-allocate
our opengl context at a time the config isn't read yet, so we can't get
the needed property. third one is a bit tricky because of deadlocking
and it needed to be in sync, hopefully i can work around that in the
future.

this also has at least one additional feature or eye-candy. a properly
working fullscreen animation with the native fs. also since this is a
direct port of the old backend of the parts that could be used, though
with adaptions and improvements, this looks a lot cleaner and easier to
understand.

some credit goes to @pigoz for the initial swift build support which
i could improve upon.

Fixes: mpv-player#5478, mpv-player#5393, mpv-player#5152, mpv-player#5151, mpv-player#4615, mpv-player#4476, mpv-player#3978, mpv-player#3746, mpv-player#3739,
mpv-player#2392, mpv-player#2217
Akemi added a commit to Akemi/mpv that referenced this issue Feb 12, 2018
this is meant to replace the old and not properly working vo_gpu/opengl
cocoa backend in the future. the problems are various shortcomings of
Apple's opengl implementation and buggy behaviour in certain
circumstances that couldn't be properly worked around. there are also
certain regressions on newer macOS versions from 10.11 onwards.

- awful opengl performance with a none layer backed context
- huge amount of dropped frames with an early context flush
- flickering of system elements like the dock or volume indicator
- double buffering not properly working with a none layer backed context
- bad performance in fullscreen because of system optimisations

all the problems were caused by using a normal opengl context, that
seems somewhat abandoned by apple, and are fixed by using a layer backed
opengl context instead. problems that couldn't be fixed could be
properly worked around.

this has all features our old backend has sans the wid embedding,
the possibility to disable the automatic GPU switching and taking
screenshots of the window content. the first was deemed unnecessary by
me for now, since i just use the libmpv API that others can use anyway.
second is technically not possible atm because we have to pre-allocate
our opengl context at a time the config isn't read yet, so we can't get
the needed property. third one is a bit tricky because of deadlocking
and it needed to be in sync, hopefully i can work around that in the
future.

this also has at least one additional feature or eye-candy. a properly
working fullscreen animation with the native fs. also since this is a
direct port of the old backend of the parts that could be used, though
with adaptions and improvements, this looks a lot cleaner and easier to
understand.

some credit goes to @pigoz for the initial swift build support which
i could improve upon.

Fixes: mpv-player#5478, mpv-player#5393, mpv-player#5152, mpv-player#5151, mpv-player#4615, mpv-player#4476, mpv-player#3978, mpv-player#3746, mpv-player#3739,
mpv-player#2392, mpv-player#2217
Akemi added a commit to Akemi/mpv that referenced this issue Feb 12, 2018
this is meant to replace the old and not properly working vo_gpu/opengl
cocoa backend in the future. the problems are various shortcomings of
Apple's opengl implementation and buggy behaviour in certain
circumstances that couldn't be properly worked around. there are also
certain regressions on newer macOS versions from 10.11 onwards.

- awful opengl performance with a none layer backed context
- huge amount of dropped frames with an early context flush
- flickering of system elements like the dock or volume indicator
- double buffering not properly working with a none layer backed context
- bad performance in fullscreen because of system optimisations

all the problems were caused by using a normal opengl context, that
seems somewhat abandoned by apple, and are fixed by using a layer backed
opengl context instead. problems that couldn't be fixed could be
properly worked around.

this has all features our old backend has sans the wid embedding,
the possibility to disable the automatic GPU switching and taking
screenshots of the window content. the first was deemed unnecessary by
me for now, since i just use the libmpv API that others can use anyway.
second is technically not possible atm because we have to pre-allocate
our opengl context at a time the config isn't read yet, so we can't get
the needed property. third one is a bit tricky because of deadlocking
and it needed to be in sync, hopefully i can work around that in the
future.

this also has at least one additional feature or eye-candy. a properly
working fullscreen animation with the native fs. also since this is a
direct port of the old backend of the parts that could be used, though
with adaptions and improvements, this looks a lot cleaner and easier to
understand.

some credit goes to @pigoz for the initial swift build support which
i could improve upon.

Fixes: mpv-player#5478, mpv-player#5393, mpv-player#5152, mpv-player#5151, mpv-player#4615, mpv-player#4476, mpv-player#3978, mpv-player#3746, mpv-player#3739,
mpv-player#2392, mpv-player#2217
Akemi added a commit to Akemi/mpv that referenced this issue Feb 12, 2018
this is meant to replace the old and not properly working vo_gpu/opengl
cocoa backend in the future. the problems are various shortcomings of
Apple's opengl implementation and buggy behaviour in certain
circumstances that couldn't be properly worked around. there are also
certain regressions on newer macOS versions from 10.11 onwards.

- awful opengl performance with a none layer backed context
- huge amount of dropped frames with an early context flush
- flickering of system elements like the dock or volume indicator
- double buffering not properly working with a none layer backed context
- bad performance in fullscreen because of system optimisations

all the problems were caused by using a normal opengl context, that
seems somewhat abandoned by apple, and are fixed by using a layer backed
opengl context instead. problems that couldn't be fixed could be
properly worked around.

this has all features our old backend has sans the wid embedding,
the possibility to disable the automatic GPU switching and taking
screenshots of the window content. the first was deemed unnecessary by
me for now, since i just use the libmpv API that others can use anyway.
second is technically not possible atm because we have to pre-allocate
our opengl context at a time the config isn't read yet, so we can't get
the needed property. third one is a bit tricky because of deadlocking
and it needed to be in sync, hopefully i can work around that in the
future.

this also has at least one additional feature or eye-candy. a properly
working fullscreen animation with the native fs. also since this is a
direct port of the old backend of the parts that could be used, though
with adaptions and improvements, this looks a lot cleaner and easier to
understand.

some credit goes to @pigoz for the initial swift build support which
i could improve upon.

Fixes: mpv-player#5478, mpv-player#5393, mpv-player#5152, mpv-player#5151, mpv-player#4615, mpv-player#4476, mpv-player#3978, mpv-player#3746, mpv-player#3739,
mpv-player#2392, mpv-player#2217
kevmitch pushed a commit that referenced this issue Feb 12, 2018
this is meant to replace the old and not properly working vo_gpu/opengl
cocoa backend in the future. the problems are various shortcomings of
Apple's opengl implementation and buggy behaviour in certain
circumstances that couldn't be properly worked around. there are also
certain regressions on newer macOS versions from 10.11 onwards.

- awful opengl performance with a none layer backed context
- huge amount of dropped frames with an early context flush
- flickering of system elements like the dock or volume indicator
- double buffering not properly working with a none layer backed context
- bad performance in fullscreen because of system optimisations

all the problems were caused by using a normal opengl context, that
seems somewhat abandoned by apple, and are fixed by using a layer backed
opengl context instead. problems that couldn't be fixed could be
properly worked around.

this has all features our old backend has sans the wid embedding,
the possibility to disable the automatic GPU switching and taking
screenshots of the window content. the first was deemed unnecessary by
me for now, since i just use the libmpv API that others can use anyway.
second is technically not possible atm because we have to pre-allocate
our opengl context at a time the config isn't read yet, so we can't get
the needed property. third one is a bit tricky because of deadlocking
and it needed to be in sync, hopefully i can work around that in the
future.

this also has at least one additional feature or eye-candy. a properly
working fullscreen animation with the native fs. also since this is a
direct port of the old backend of the parts that could be used, though
with adaptions and improvements, this looks a lot cleaner and easier to
understand.

some credit goes to @pigoz for the initial swift build support which
i could improve upon.

Fixes: #5478, #5393, #5152, #5151, #4615, #4476, #3978, #3746, #3739,
#2392, #2217
@Akemi
Copy link
Member

Akemi commented Feb 12, 2018

fixed via c5e4538.

@Akemi Akemi closed this as completed Feb 12, 2018
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

3 participants