#asahi-gpu · 2023-01-15 04:21
linaAnd then there's a magic store to address 0x2d822acc in here... is this some kind of MMIO or doorbell?#asahi-gpu · 2023-01-15 04:12
linaBut at least one op, 0xf, just runs 5 unknown instructions. I wonder if that is cache maintenance...#asahi-gpu · 2023-01-15 04:12
linaSome codepaths do save/restore stuff (and I think we might be missing some looping instruction decoding? I see unknown instructions right after the load/store groups...)#asahi-gpu · 2023-01-15 04:12
linaIt definitely interacts with the compute buffer struct I found#asahi-gpu · 2023-01-15 04:11
linaI'm looking at the magic shader code and it seems to be some kind of dispatcher based on a special register value...#asahi-gpu · 2023-01-15 00:07
linaI'm not using it right now and I *think* it's for context switching only, but I also have this cache issue...#asahi-gpu · 2023-01-15 00:07
linaalyssa: What did you see when you tried compute stuff without the magic shader?#asahi-gpu · 2023-01-14 05:35
linaalyssa: Will look at it tomorrow at the latest (today is compute day ^^)#asahi-gpu · 2023-01-10 12:42
linaeric_engestrom: Nobody said I had to deal with the backlog too! ;;#asahi-gpu · 2023-01-09 14:29
linaalyssa: I mean it's a hardware register, not a GL property... ^^;#asahi-gpu · 2023-01-08 02:52
linaThere are still things we don't know about fault handling though, including all that software fault handling path thing and what the bits in that field mean...#asahi-gpu · 2023-01-08 02:49
linaWe probably want to default to 0xb once things are relatively stable, and tell people to switch to 0 to debug faults#asahi-gpu · 2023-01-08 02:48
linaalyssa: No, it's global and I'm not even sure if it can be changed at runtime at all (I think it might work but with a GPU reconfigure command, which is a relatively big hammer)#asahi-gpu · 2023-01-08 02:05
lina(That's what macOS does)#asahi-gpu · 2023-01-08 02:05
linaWell, there's always asahi.fault_control=0xb... ^^;;#asahi-gpu · 2023-01-08 02:02
linaWhich bug?#asahi-gpu · 2023-01-08 02:01
linaThose are the faults you get with bad vertex fetches#asahi-gpu · 2023-01-08 02:01
linaYeah, I think r/w is definitely backwards for UL1C and I think that's the L1 cache yes#asahi-gpu · 2023-01-08 01:57
linawrite is definitely suspicious though#asahi-gpu · 2023-01-08 01:57
linaI think the unit names make sense, at least some of them match#asahi-gpu · 2023-01-08 01:57
linaalyssa: The lod_bias assert has been firing all along as far as I remember ^^#asahi-gpu · 2023-01-07 04:50
linaasahi/main already gets regularly rebased on top of mesa/main ^^#asahi-gpu · 2023-01-06 14:04
linaI just tested it and it fixes the asahi/main build with valgrind enabled!#asahi-gpu · 2023-01-06 14:03
linaThank you! ^^#asahi-gpu · 2023-01-06 13:59
linaeric_engestrom: I've actually had that problem with the Asahi driver all along and always wondered why it only broke for me... never got around to looking at it...#asahi-gpu · 2022-12-30 15:39
linaBut yeah, the next big thing is compute which is going to change one big part of the UAPI, and if not coincidentally with that, sync/etc will come right after since it follows naturally#asahi-gpu · 2022-12-30 15:38
linaThough it's a pretty easy hack to just track some process names so if I ever run into unexplainable GPU usage (this one seems pretty obvious) it might be worth just doing anyway ^^#asahi-gpu · 2022-12-30 15:36
linaSure ^^#asahi-gpu · 2022-12-30 15:02
linaNoting this down to investigate later#asahi-gpu · 2022-12-30 15:01
linaAnd opening it immediately uses that RAM.#asahi-gpu · 2022-12-30 15:01
linaOK, just closing Inochi2D cleared out half of that usage so yeah. That's not normal, Inochi2D with this model should be using a single 4Kx4K texture atlas plus mipmaps and a few intermediate framebuffers.#asahi-gpu · 2022-12-30 14:59
lina(The 4GB was constant as far as I can tell, so it's either not an outright leak or it's a leak caused by something I don't understand yet and which has a specific trigger, not leaking in the steady state)#asahi-gpu · 2022-12-30 14:58
linaThat should be enough info to at least begin to analyze/debug memory usage patterns... thoughts? ^^#asahi-gpu · 2022-12-30 14:58
linaAlso keeping the creation timestamp is a good idea I think#asahi-gpu · 2022-12-30 14:58
linaBut maybe mesa could also pass some kind of identifier for what each allocation is, at least some kind of class bits? Like what PIPE_USAGE flags were used#asahi-gpu · 2022-12-30 14:57
linaI was thinking we might want to add some GPU memory consumption tracking? At the very least the driver should track which process (PID/comm, surviving process termination) initially created each GEM object I think#asahi-gpu · 2022-12-30 14:56
linaalyssa: So one thing I noticed when setting up today's stream is I ended up with (I think) ~4GB of GPU memory usage, which seems a bit excessive considering it was mostly just Inochi2D and OBS#asahi-gpu · 2022-12-30 02:27
linaYeah, I saw it with a compute shader with tons of params#asahi-gpu · 2022-12-30 02:26
linaYou need to split after that (or at least Metal does)#asahi-gpu · 2022-12-30 02:26
linaI'm pretty sure the max load is 64 halfs and that is encoded as size=0#asahi-gpu · 2022-12-30 02:25
linaalyssa: Speaking of uniforms, I have a patch for that lying around in my compute tree on macOS#asahi-gpu · 2022-12-28 09:39
linaWhy is a Chromium build pulling in VK-GL-CTS... This is so cursed...#asahi-gpu · 2022-12-28 09:21
linaSorry for being slow on the clang-format review... though it probably didn't really have much to review ^^;;#asahi-gpu · 2022-12-28 09:21
linaalyssa: Nice!! I'll test it over the next few days ^^#asahi-gpu · 2022-12-27 16:09
linaAnd at least some of those actually include the UUID that is plumbed all the way to the UAPI if I remember correctly, so you can even correlate it with what mesa is doing ^^#asahi-gpu · 2022-12-27 16:09
linaThat has events like "TA started", "TA complete", "3D started", "3D complete" but also partial renders, event delivery, and things like that, all timestamped#asahi-gpu · 2022-12-27 16:08
linaFor performance, I really should just hook up the ktrace channel to perf and get you pretty logs