ChanServ changed the topic of #asahi-gpu to: Asahi Linux: porting Linux to Apple Silicon macs | GPU / 3D graphics stack black-box RE and development (NO binary reversing) | Keep things on topic | GitHub: https://alx.sh/g | Wiki: https://alx.sh/w | Logs: https://alx.sh/l/asahi-gpu
yuyichao has quit [Read error: Connection reset by peer]
yuyichao has joined #asahi-gpu
chadmed has quit [Quit: Konversation terminated!]
<cr1901>
Lemme guess PRIME is a pun on Optimus?
digicyc2 has joined #asahi-gpu
digicyc has quit [Ping timeout: 480 seconds]
<alyssa>
cr1901: that sounds probable
<alyssa>
punns are an important part of trans culture
capta1nt0ad has quit [Quit: Konversation terminated!]
Dcow has quit [Ping timeout: 480 seconds]
SSJ_GZ has quit [Ping timeout: 480 seconds]
capta1nt0ad has joined #asahi-gpu
Dcow has joined #asahi-gpu
Dcow has quit [Ping timeout: 480 seconds]
Dcow has joined #asahi-gpu
SSJ_GZ has joined #asahi-gpu
capta1nt0ad has quit [Remote host closed the connection]
capta1nt0ad has joined #asahi-gpu
as400 has quit [Remote host closed the connection]
la1440 has joined #asahi-gpu
la1440 has quit []
<alyssa>
These multisampling tests are taunting me
<alyssa>
just when I think I've finally 'got' it.. bam, fail
<alyssa>
Passed: 1/1 (100.0%)
<alyssa>
.....
<alyssa>
:-D
as400 has joined #asahi-gpu
zkrx has quit []
karolherbst has quit [Remote host closed the connection]
karolherbst has joined #asahi-gpu
zkrx has joined #asahi-gpu
cylm has joined #asahi-gpu
<jannau>
gah, using dcp from two entry points (kms and backlight device) at the same time to swap surfaces / brightness works as well as one can imagine
<alyssa>
jannau: :-(
<jannau>
i.e. it crashes dcp quite easily
<alyssa>
yeah
<alyssa>
move all dcp work to a worker thread?
<sven>
just rewrite it in rust! I heard that way lina and zero concurrency bugs :p
<sven>
*had
<jannau>
I wonder if I can use out of band swaps for the brightness
<alyssa>
dcp had multiple channels to help with this right?
<jannau>
my main problem is that I'm trying to avoid blocking surface swaps
<jannau>
yes, it has an out of band channel
<jannau>
I don't understand under which conditions macos uses it though
<alyssa>
IIRC it's just to make it easier for threaded AP clients
<jannau>
probably, it looks like macos uses for some commands if the main context is busy
<jannau>
at least a zeroed swap structure with just the brightness fields set works
<alyssa>
any reason not to just do main for DRM swaps and OOB for backlight?
<jannau>
trying right now. I wouldn't be surprised if that crashes dcp as well
<alyssa>
woof
<sven>
:/
<jannau>
no crashes so far but I see some strange flickering
felix_ has joined #asahi-gpu
zzywysm has quit [Ping timeout: 480 seconds]
felix_ is now known as glxplz
glxplz has quit [Quit: glxplz]
<jannau>
yes, it seems cause issues with with the normal swap and it takes ~3 seconds until it updates
<maximbaz>
jannau: thanks for the tip, my M1 Pro is able to boot as a m1n1 hypervisor guest with virtual UART, and in dmesg [1] I see some successful debug from the GPU driver (and much more with asahi.debug_flags)! It would be interesting to figure out why booting the kernel directly is getting stuck...
<maximbaz>
to test next steps, I compiled MESA from alyssa/asahi/rebased, using PKGBUILD from archlinuxarm as a base, and adding "asahi" to -Dgallium-drivers. I have /usr/lib/dri/asahi_dri.so, sway starts, but I am struggling to get gnome, supertuxkart or even glxgears to start [1], I think it boils down to "libEGL warning: egl: failed to create dri2 screen".
<maximbaz>
Do you have any ideas what I could be missing?
<Cyrinux>
jannau, i'm sitting with maximbaz for the debugging, after adding CONFIG_DRM_APPLE we got a black screen on boot, on the console we see the laptop is alive, but no screen at all. Any idea?
<Cyrinux>
we have CONFIG_DRM_APPLE=y and CONFIG_DRM_ASAHI=y so actually
<jannau>
I think it will work if hold the lock until the brightness swap is completed but that itself is annoying
<alyssa>
jannau: :(
* alyssa
stuck on dEQP-GLES3.functional.fragment_out.random.51
<alyssa>
attachment 0 is unhappy
<alyssa>
R16I
<jannau>
Cyrinux: that all looks well, can you start weston from text console. I think there are some issues with sddm/xorg and the dcp version in lina's branch. you could test gdm instead
<Cyrinux>
jannau, I'm not sure to understand, you mean you want we start weston from the proxyclient side ? We got a full black screen on macbook side / we are blind. We use sway as window manager usually.
<Cyrinux>
black here mean like brighness is 0%, no tty text prompt.
bpye has quit [Quit: Ping timeout (120 seconds)]
bpye has joined #asahi-gpu
<jannau>
you should be able to login over the vuart
<jannau>
you could also try switching the tty via ctrl + option + Fx (+ Fn)
<Cyrinux>
interesting, so from macbook side, if i try to switch the TTY, this doesnt work, until I killall sway from the proxyclient, suddently I got the tty on the macbook.
<Cyrinux>
I can then start weston, I just install it, but looks like no more luck to start applications from there then.
<alyssa>
are you setting LIBGL_DRIVERS_PATH correctly
Dcow has quit [Remote host closed the connection]
Dcow has joined #asahi-gpu
<jannau>
Cyrinux: you could try to cherry-pick 09cee10b3b2556f009c79112174ee8ce75deca58 from bits/200-dcp
<jannau>
but I doubt that fixes problems with sway
alxdrl has joined #asahi-gpu
* alyssa
would like to know how fragdepth writes work on here
alxdrl has quit [Remote host closed the connection]
<maximbaz>
thanks jannau, we managed to get it to work! 🎉 it's a bit weird, screen goes dark once tty is shown, but if we enable auto-login, autostart sway, and then exit sway, this somehow brings screen back to life, and then we can start sway again and enjoy GPU acceleration :) will try next the cherry-pick above!
<alyssa>
warning: stuff is broken ^_^
alxdrl has joined #asahi-gpu
alxdrl has quit [Remote host closed the connection]
<maximbaz>
so if you are curious, sway works, supertuxkart is very smooth and plays in full screen, mpv is smoother than before (we see some constant GPU timeouts [1]), kitty terminal doesn't start with some other error [2], but otherwise things seem quite good and interesting to further experiment with :)
<maximbaz>
also the display output is taking "more of the screen real estate", in other words the notch is suddenly covering a bit of a panel, haha :)
<alyssa>
maximbaz: I promised a broken driver, your expectactions are exceeded, woohoo! :-D
<maximbaz>
that's all I wanted haha :D
<alyssa>
:-D
<alyssa>
fragdepth + MSAA is an ugly interaction on here..
c10l has quit [Quit: Ping timeout (120 seconds)]
<alyssa>
maximbaz: Worth noting that supertuxkart is using its older GL2.1 renderer
<alyssa>
which omits all the graphics effects
<alyssa>
the newer GL3 renderer uses ~all features in GLES3.0
<alyssa>
so it will be a nice milestone but a massive pile of work
<maximbaz>
interesting, makes sense!
cylm has joined #asahi-gpu
<alyssa>
that's my current project but I'm uhh
<alyssa>
1000s of lines on code on top of asahi/rebased
capta1nt0ad has quit [Quit: Konversation terminated!]
capta1nt0ad has joined #asahi-gpu
capta1nt0ad has quit [Remote host closed the connection]
millenialhacker has joined #asahi-gpu
capta1nt0ad has joined #asahi-gpu
<maximbaz>
that's an impressive project, interesting and complex, I hope you don't lose motivation alyssa, despite the big road ahead :) seeing even current results with my own eyes makes me appreciate contributions of all of you guys on a whole new level, it's super awesome!
<alyssa>
thanks (:
<alyssa>
fragdepth is starting to make a little sense
<alyssa>
but not a ton
<alyssa>
got the conservative depth enum
<alyssa>
stencil export is still not making sense
<alyssa>
I'm missing a bit that says stencil should come from the shader instead of the default value
<alyssa>
oh, I think I found it
<alyssa>
but now IDK where the stencil register is specified
<alyssa>
Ohhh
<alyssa>
I see
<alyssa>
Hahaha
<alyssa>
Duh
<alyssa>
gg apple
<alyssa>
Okay, stencil export makes sense no
<alyssa>
(In the absence of MSAA)
<alyssa>
that's easy :-)
<alyssa>
Stencil export + MSAA also makes plenty sense, good
cylm has quit [Ping timeout: 480 seconds]
pthariensflame has joined #asahi-gpu
pthariensflame has quit []
c10l has joined #asahi-gpu
millenialhacker has quit [Remote host closed the connection]
<alyssa>
Oh boy
<alyssa>
if depth or stencil is written, then Metal will implement discard() as "gl_FragDepth = NaN;"
SSJ_GZ has quit [Ping timeout: 480 seconds]
<alyssa>
and then in the other path (for stencil export + discard), "gl_FragDepth = gl_FragCoord.z"