#
…

2023-03-07

00:50aratuk has quit [Remote host closed the connection]
01:37aratuk has joined #asahi-gpu
01:47alyssa has joined #asahi-gpu
01:47alyssa-next is looking quite a bit less scary
01:50nafod8 has joined #asahi-gpu
01:50nafod has quit [Read error: Connection reset by peer]
01:50nafod8 is now known as nafod
01:52aratuk has quit []
02:10alyssastill big, but
02:10alyssa40 commits now
02:11akspecs_ has quit [Remote host closed the connection]
02:11akspecs has joined #asahi-gpu
03:02i509vcbNot sure if it is implemented right now, but I believe the hardware supports enough to implement timeline support for DRM sync objects?
03:03i509vcb /s/believe/does
03:03alyssai think yes
03:20kesslerd has quit [Remote host closed the connection]
03:36i509vcbI'm wondering is the next release going to support GLES 3.0? I have seen a lot of the commit history showing compute related stuff.
03:37i509vcb(Although I'd like to try my hand at some vulkan stuff for agx but don't want to cause 2 efforts for it)
03:39alyssawe don't really have a release schedule
03:39alyssabut yes, gles 3.0 comes after gles 2.0
03:39alyssaand gles 3.1 after gles 3.0
03:39alyssaand vulkan 1.0 after that
04:23linai509vcb: Timeline sync is implemented, though completely untested ^^
04:24lina(I just copied what Xe did)
04:24i509vcbHmm neat, so assuming no bugs it should be effectively automatic to have VK_KHR_timeline_semaphore
04:25linaProbably! (I don't know much about Vulkan yet, but the UAPI is designed based on modern Vulkan requirements)
04:26i509vcbI personally don't want to bug ella right now until some of the buffer and image copy stuff is pushed in (probably some local changes). But I will stick around and try to help with Vulkan if possible
04:27linaalyssa: Did you get a chance to test the new kernel branch? I want to know if it fixes all the brokenness you were running into ^^;;
04:27i509vcbI get that it is not your priority right now, but nothing wrong with trying to make it work in parallel
04:28linaDefinitely, and I think both alyssa and I will be moving towards Vulkan as the GL stuff settles down too ^^
04:28i509vcb(I partially want to see Vulkan so I can yeet the EGL code in my compositor)
04:28linaI'm actually going to write a doc on how the queue synchronization works in our driver, since I need that to make the GL frontend understandable too, but it should be useful for Vulkan
04:28wintp has quit [Quit: Connection closed for inactivity]
04:32user982492 has joined #asahi-gpu
04:35alyssalina: what's the new kernel branch
04:35alyssaI've been running b7b005953e96d9e443ea2edd5e3befd63e911138
04:35alyssaworks like a charm
04:36alyssa(with next)
04:36alyssa(except for all the shit piglit provokes but, i'm just playing with registers ;~P)
04:39linaalyssa: That's before the fixes, gpu/explicit-sync should fix the piglit explosions and that splat that you saw
04:39linaIt's also a rebase (and might need a new m1n1 for you) but it's what will be released so I would appreciate it if you can test it ^^
04:43* alyssaeyes clock
04:47linaalyssa: Is agx/release still the right branch for release (other than that dual source blending thing we need to drop)?
04:51alyssayes please
04:59alyssalina: what happened to my DCP?
05:00alyssareserved-memory node 'framebuffer' not found
05:00alyssaadev bind failed: -19
05:00c10l has quit [Quit: Bye o/]
05:00alyssaI updated my mini
05:01c10l has joined #asahi-gpu
05:01linaAre you sure you updated m1n1?
05:02linaTo upstream main?
05:02alyssato lina/gpu-wip
05:03linaOh sorry no, that's just my experiments and I hadn't pushed yet ^^;;;
05:03linaPushed now (or just use main)
05:03alyssaswitched to main
05:03alyssagirl you gotta tell me these things :p
05:03linaThere are no m1n1 changes for agx, it's just DCP that changed
05:04alyssawhat happened to my AGX?!
05:04linaWhaa...
05:05alyssaDRM_ASAHI=n and I don't see the option
05:05alyssaGuessing Rust is broken again
05:05lina"make rustavailable"
05:05alyssarust is available
05:05linaDid I mess this up??
05:06linaAaaaa hold on
05:06linaSorry this was a thing I added last minute yesterday and kconfig confuses me
05:08linaalyssa: Pushed, should be fixed, sorry T_T
05:12alyssaGPU crashed immediately, try again
05:12linaUmm...
05:12linaWhaaa...
05:13alyssaI'm going to guess whatever code I just pulled is broken
05:13alyssaOr extremely bad luck
05:13alyssaBut probably the first one
05:13alyssacan I downgrade now?
05:14linaBut it works for me...
05:14linaDo you have more dmesg backlog?
05:14linaThe first line there is already broken...
05:15alyssathat's just from running kmscube
05:16linaAre you on 12.3?
05:17linaI don't get it... I really need more dmesg backlog to have a guess at what went wrong there, it's like something is horribly wrong with the fwctl ring...
05:17linaAnd I dind't touch that code in forever...
05:18alyssathere's no other dmesg backlog
05:18linaOMG I forgot repr(C) on that and your Rust compiler must've decided to use a different struct layout aaaa
05:18alyssasanta are you ok
05:18linaPlease try again T_T
05:19linaThis has always been broken, you just got unlucky hitting it now T_T
05:19alyssaluv the commit msg
05:20alyssaand glad i could be a serviceable rubber duck
05:23alyssaok yes i have spinny cube again
05:29alyssalina: new kernel survived a piglit run. thanks for the fixes :)
05:30alyssaand actually the piglit fail/crash number isn't all that different from the older release
05:30linaGlad to hear that!
05:30alyssaso unless I see something scary in the fails.csv list (haven't looked yet) I'd say agx/release is good to go
05:34alyssa`yeah, nothing here scares me
05:34alyssagood to go
05:34linaThank you for testing, and sorry for keeping you up late ^^;;
05:35alyssaok but why is my system hanging trying to open gnome
05:35linaUmmmmmmm
05:35lina;;;;;;
05:35linaWorks here...
05:36linaI don't want to keep you up too late but if you can get me some backtraces of relevant stuff and dmesg if anything that might help ^^
05:36alyssasway is going ok
05:37alyssacould it be because gnome is a piece of-
05:38alyssaooh, oof, this is your bug after all
05:38lina;;;;;;;;;;;
05:38linakernel or mesa?
05:38linaAny messages?
05:39alyssamore missing repr(C)?
05:40linaIs there anything earlier? That just looks like the firmware died...
05:40linaCan you upload your kernel binary somewhere and go to sleep? I can probably track it down running it in the hypervisor.
05:41linaCould be a repr(C) thing and your Rust compiler really wants to shuffle structs around for some reason
05:42alyssaIDK why it's only happening with gnome
05:42alyssasway + stk is fine
05:45linaAdded more reprs though it was kinda trivial stuff, I don't know if that's it...
05:45alyssaim kinda surprised rust doesn't catch this sort of bug
05:46linaIt's an FFI thing, you need to set the struct layout... Once I add the Castable thing it should catch some (but not all) of these issues
05:46linaI think it's something that should eventually be a core feature
05:47alyssawhat I mean is, how is it ever sound to get the raw bytes of a repr(Rust) struct
05:47alyssaor is this happening in an unsafe{} block with a botched SAFETY comment?
05:47linaIt isn't, it's all unsafe, yeah
05:47alyssastill feels like this is a footgun API
05:47linaHence the Castable thing (that's supposed to mean "safe to get the raw bytes" but this isn't a core language feature yet)
05:47alyssabecause even in an unsafe{} block it is literally never legal to get raw bytes of repr(Rust)
05:48possiblemeatball has quit [Quit: Quit]
05:48linaIt is, if you know there is no padding (which can be known)
05:48alyssais that portable?
05:48linaYou can't assume anything about the layout, but you could restore it into an identical struct
05:48linaSo that's not unsafe
05:49linaCan you check if the last patch fixed it? It's all I've got...
05:49alyssa(OK, I hit the issue with firefox in sway on the older kernel. good to know it's not just gnome)
05:54alyssalina: Nope, still no good
05:54linaOK, go to sleep sis ^^
05:54linaI'll test with your kernel
05:54alyssafiiiiine
06:08i509vcbbytemuck does have some safety notes that might be worth considering even though you seem to be rolling your own type -> bytes conversion: https://docs.rs/bytemuck/1.13.1/bytemuck/trait.Pod.html
06:16user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
06:25alyssa has left #asahi-gpu [#asahi-gpu]
07:21c10l has quit [Read error: Connection reset by peer]
07:21c10l has joined #asahi-gpu
07:35cr1901_ has joined #asahi-gpu
07:42cr1901 has quit [Ping timeout: 480 seconds]
08:06MajorBiscuit has joined #asahi-gpu
08:15Major_Biscuit has joined #asahi-gpu
08:16MajorBiscuit has quit [Ping timeout: 480 seconds]
08:20bisko has joined #asahi-gpu
09:05nyilas has joined #asahi-gpu
09:07nyilas has quit [Remote host closed the connection]
09:12linaOK, alyssa was using the debug allocator and I think we're hitting a firmware bug/race, but I don't think we use that codepath at all in the regular mode so I'm just going to punt on it...
09:14nyilas has joined #asahi-gpu
09:26DarkShadow44 has quit [Quit: ZNC - https://znc.in]
09:26DarkShadow44 has joined #asahi-gpu
10:17DarkShadow44 has quit [Quit: ZNC - https://znc.in]
10:19DarkShadow44 has joined #asahi-gpu
10:31commandoline has joined #asahi-gpu
10:34commandoline has quit []
10:35commandoline has joined #asahi-gpu
11:12linaWrote this to attach to the DRM submission ^^ (cc ella-0 & alyssa): https://github.com/AsahiLinux/docs/wiki/SW:AGX-driver-notes
11:16as400 has quit [Remote host closed the connection]
11:19as400 has joined #asahi-gpu
11:41nyilas has quit [Remote host closed the connection]
11:46karolherbst_ is now known as karolherbst
11:59hightower2 has joined #asahi-gpu
12:24alyssa has joined #asahi-gpu
12:28alyssalina: nit, "the VDM level (in the GPU command stream)"
12:29alyssa*GX actually has a "control stream" in powervr lingo, not a command stream
12:29alyssathe distinction being, it isn't executed / interpeted in any meaningful way, it's not structured as commands or bytecode or anything
12:30alyssait's just a bunch of control packets one after the other, plus a link command to jump between control streams
12:30alyssathis is very different than GPUs with real command streams,
12:31alyssae.g. Mali-G610 exposes an entire Turing-complete-by-design ISA where the state vector is passed in registers that the driver sets with MOV_IMM32 instructions
12:31alyssabut that has general purpose "load/store registers from/to memory" instructions, conditional branching based on the values of registers, a simple integer ALU, etc
12:33alyssagenerally this means that AGX is easier to program -- and the AGX control stream is a lot more compact than the Mali command stream -- but there's a pretty low ceiling for what you can do with AGX in terms of indirection
12:33alyssathere's hardware support for a few important types of indirects, where there's a special control word to do an indirect draw or whatever
12:33alyssabut if you have an API requirement that the hw doesn't accommodate, you're kinda screwed
12:34alyssanotably, multiDrawIndirect, which is like draw indirect but now draws an arbitrary number of draws indirectly with the draw count loaded from memory
12:34alyssaon Mali-G610, the driver implements this with a loop in the command stream
12:35alyssaon AGX, we have no way to express a loop, it's not turing complete by itself
12:35alyssaso either we don't do multiDrawIndirect, or we implement it with a compute kernel that generates a control stream with all the draws at runtime and then stream_links to it
12:37alyssa(which is kinda horrible, because you need to plumb the draw ID into the shaders as a special uniform, but changing the uniform state means re-emitting a whole pile of shader state. it can be done with a "clone and patch" technique, or with a sufficient horrible compute kernel. but it's not nice.)
12:37alyssa(but Metal's "GPU indirect buffers" are exactly this, and if MoltenVK supports multiDrawIndirect - dont remember if they do - it's with this)
12:37alyssaanother notable one, conditional rendering, which lets you predicate draws on an occlusion query passing
12:38alyssaon Mali, this is really easy!
12:38alyssaLOAD the result of the query and branch over the draws based on the result
12:38alyssa(*Mali-G610, older Malis this all suuuucks far worse tha AGX)
12:38alyssaon AGX, this is a lot more tricky
12:39alyssaunless there's a sufficiently general conditional stream link, we again need to dispatch a compute kernel for this
12:39alyssa(feel free to replace "Compute kernel" with "internal vertex shader" if you want this to all happen on the VDM, btw)
12:39alyssathis compute kernel though isn't too horrible, thankfully
12:40alyssain the control stream after emitting the compute, always emit a stream link and put all the draws to predicate in a new control stream
12:40alyssaand then the compute kernel will just patch the link target based on the query result
12:42alyssanone of this is *challenging*, mind you
12:42alyssaand perf will be ok unless the app goes crazy with this stuff
12:42alyssabut it's still a really steep cliff you fall off as soon as you leave the comfy confines of what the hw designers intended
12:42alyssa(otoh, as far as I can tell, Mali-G610 was uniquely designed around supporting multiDrawIndirect and that's it ;P)
12:57alyssalina: "Blit command support will be added in a future driver"
12:58alyssa'since it is not safe to do so'
12:58alyssaand not stable
12:58alyssa'Upstreaming blockers (affect current draft UAPI):'
12:58alyssaalso, scratch memory
12:59alyssaI don't want to block upstreaming on me figuring out a spiller so I'll probably just wire up load_scratch/store_scratch as a proof-of-concept
12:59alyssabut this is absolutely required for a production driver and I don't want a UAPI stabilized without it
12:59alyssaprobably super easy in the kernel side, though
13:16alyssa has quit [Quit: leaving]
13:17cy8aer has quit [Remote host closed the connection]
13:17cy8aer has joined #asahi-gpu
13:32bisko has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
14:01bisko has joined #asahi-gpu
14:10c10l has quit [Quit: Bye o/]
14:24balrog has quit [Remote host closed the connection]
14:51possiblemeatball has joined #asahi-gpu
14:56kesslerd has joined #asahi-gpu
15:03kesslerd has quit [Quit: Konversation terminated!]
15:16kesslerd has joined #asahi-gpu
15:21karolherbst_ has joined #asahi-gpu
15:23iaguis has joined #asahi-gpu
15:25karolherbst has quit [Ping timeout: 480 seconds]
15:26balrog has joined #asahi-gpu
15:43alyssa has joined #asahi-gpu
15:53bisko has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
16:04linaalyssa: It's a wiki, you can just edit it~
16:15alyssalina: Hmm for glGenerateMipmap() i guess it shouldn't be too hard to do a single drm_asahi_submit with all the different batches that make it up
16:16alyssamaybe less heavyhanded than hooking up the blit queue
16:16alyssaand still get most of the benefit
16:17alyssaI guess the "right" way to do it is with a background program and no draw calls
16:18alyssaand if you do that, you don't need the VDM for anything which is where the blit queue comes in
16:18alyssayeah, ok, sure whatever
16:24alyssaglGenerateMipmap is silly but a bunch of benchmarks have it in a hot path so v_v
16:24alyssaand faster game load screens is good maybe
16:34mort_Hey, I'm trying to build the kernel according to this pkgbuild: https://github.com/AsahiLinux/PKGBUILDs/blob/d66008ea33ce6547a806fd197688a9344c02f6ef/linux-asahi/PKGBUILD -- and it works, but the edge kernel it builds doesn't seem to have an asahi.ko.zst.. I don't understand why, but it seems like the config file for the edge build somehow gets
16:34mort_overwritten?
16:35mort_the src/linux-asahi-blah/build/edge/.config.old file ends up with the stuff from config.edge (including CONFIG_DRM_ASAHI=m), but src/linux-asahi-blah/build/edge/.config ends up without it
16:38jannaumort_: no user support here, see /topic
16:38mort_ah sorry, I should've read that before asking.
17:02Bey0ndB1nary has joined #asahi-gpu
17:07chipxxx has joined #asahi-gpu
17:07chipxxx has quit [Remote host closed the connection]
17:08chipxxx has joined #asahi-gpu
17:17bluetail9 has quit [Ping timeout: 480 seconds]
17:23maria has quit [Ping timeout: 480 seconds]
17:40Bey0ndB1nary has quit []
18:00Major_Biscuit has quit [Ping timeout: 480 seconds]
18:09bluetail9 has joined #asahi-gpu
18:10maria has joined #asahi-gpu
18:11alyssamarcan: so when are you release this thing
18:18* jannaulooks on the clock and the magic eight ball answers tomorrow
18:19alyssajannau: no but i just asked so you need to double it
18:19alyssaso two days from now, got it
18:21zshrc has joined #asahi-gpu
18:35karolherbst_ is now known as karolherbst
18:42zshrc has quit [Ping timeout: 480 seconds]
18:46zshrc has joined #asahi-gpu
18:52zshrc is now known as Guest6969
18:52zshrc has joined #asahi-gpu
18:58Guest6969 has quit [Ping timeout: 480 seconds]
19:04zshrc has quit [Quit: leaving]
19:31jannaushort test of agx/release shows no problems on a m1 ultra
19:36bluetail94 has joined #asahi-gpu
19:43bluetail9 has quit [Ping timeout: 480 seconds]
19:50i509vcb has quit [Quit: Connection closed for inactivity]
20:00i509vcb has joined #asahi-gpu
20:06jannaupink/violet boxes/triangles during plasma/wayland login on m2, very briefly
20:16jannaureproducible, boxes, maybe 16x8, 1 or 2 frames
20:29cr1901_ is now known as cr1901
20:33jannaureproduces with ~50% in the first 3 login attempts after boot and seems to be very unlikely to reproduce after that (3 repeats)
20:41jannauno, still reproducible later. so maybe reproducible in 10 to 15%
20:45iaguis has quit [Quit: leaving]
20:51jannaunot reproducible on the m1 ultra in over 30 tries with the exact same m1n1/kernel/mesa
20:52possiblemeatball has quit [Quit: Quit]
21:02D-Spirits has joined #asahi-gpu
21:03possiblemeatball has joined #asahi-gpu
22:40bluetail94 has quit []
23:08D-Spirits has quit [Quit: D-Spirits]
23:28c10l has joined #asahi-gpu
23:30amada95 has joined #asahi-gpu
23:52kesslerd_ has joined #asahi-gpu
…