Open elinorbgr opened 3 years ago
I've got the following data:
With Anvil or WaRVk
With swvkc or sway
I think that's all the data I have, I could do more testing of Intel in VK_KHR_display
mode with WaRVk and tty-udev
with Anvil but Ik they both have Issues. Essentially We're just dropping frames like crazy.
I haven no way of testing on an AMD card at the moment so it'd be very useful if someone could verify my results with an AMD card.
Okay, what's perhaps even more concerning is that weston-simple-shm
doesn't work properly. This must mean there is a serious issue with the handling of shm buffers.
Okay, after some testing, I think that this is indeed an issue with the way anvil manages its frame callbacks. We handle them in a bad way, causing weston-simple-shm
to render at 30fps instead of 60fps.
weston-simple-shm
is running way slower than 30fps for me. weston-simple-egl
on the other hand is running at 1/2 the frame rate that it is meant to. tested at 4k@30fps (runs at 15pfs) and 1080p@60fps (runs at 30fps).
Yes, indeed, I found the core issue, will quickly make a PR.
Oh, amazing!
Okay, could you tell how much of the problem is fixed by #236 ?
that fixes weston-simple-shm
, still dropping frames excessively with mpv
and weston-simple-egl
is now running at 40 fps instead of 30 when anvil is running at 60fps on winit. In tty-udev all issues are fixed including playing 4k video through mpv.
I added an other change, how is it now?
That fixes weston-simple-egl
in winit, still hasn't fixed mpv on either. I was mistaken when I said mpv worked on tty-udev
; I had a ytdl format flag.
So, for mpv, is it just like before, or is there some improvement?
Yes, its like before.
OK, so the problem with weston-simple-SHM was actually unrelated with the mpv issue. Back to figuring out the problem then.
Yeah, bit of a shame. Still dropping 125 frames in a 5 second 1080p video.
I'll do a bit more investigation into the issue tomorrow.
So, I just tried to read the Sintel demo again on a computer with hardware acceleration on the wlshm
mpv backend, and it seems to run without dropping any frames now. Can you confirm with your own tests @Ella-0 ?
With a 4k clip running for 46 seconds I get 1 frame drop in sway and 36 in anvil. Sounds much better.
Initially reported in the chatroom by @Ella-0.
Apparently, high definition playback with mpv on its wlshm backend drops a lot of frames on anvil while not on sway.
We're talking at least 4k video, or 1080p@60fps. Should be reproduced by running
mpv the-video-file --vo=wlshm
. Only shows when using hardware decoding, as otherwise video decoding is the bottleneck. This is apparently specific to SHM buffers.I could not repro on my laptop for lack of a good enough hardware video decoding.
We need to investigate to figure out if its an issue in anvil or smithay, and to what is it related exactly (shm buffer management ? frame callbacks ? something else ?).
Possible 4K video files to use for testing:
If anyone can try to repro, the following information about the cases tested would be useful: