#asahi-gpu · 2022-09-08 13:25
linaYes!#asahi-gpu · 2022-09-08 13:24
linaThe three pipelines the kernel sees they TA, 3D, and CP, and they map to VDM, PDM, CDM#asahi-gpu · 2022-09-08 13:23
linaTA yes, ISP/TSP I don't know#asahi-gpu · 2022-09-08 13:22
lina(Which is sgx... I guess because maybe that was the first PowerVR GPU Apple used?)#asahi-gpu · 2022-09-08 13:22
linaAh right, sorry, I keep thinking of the device tree node#asahi-gpu · 2022-09-08 13:21
linaDefinitely not an Apple AArch64 core running RTKit...#asahi-gpu · 2022-09-08 13:21
linaThe kernel side is completely different since Apple have their own in-house firmware managing the GPU, that we have to interact with#asahi-gpu · 2022-09-08 13:20
linaAh, the architecture is a direct descendant of SGX, but Apple replaced many bits. Alyssa is doing the userspace part, the shaders are completely different but the draw state stuff is apparently similar?#asahi-gpu · 2022-09-08 13:19
linaHi!#asahi-gpu · 2022-08-31 02:00
linaEither way, "mostly working but artifacts" is good enough to start with ^^#asahi-gpu · 2022-08-31 01:59
linaI think it will be immediately obvious what changed once we run a trace on t6000. It might even just be some of the constants that mesa passes to the kernel (which don't apply to my driver right now, those get set in there)#asahi-gpu · 2022-08-29 17:39
linaThe Rust side supports conditional fields based on GPU type, but the Python side does not, so if you end up needing that the Ver() thing will need that#asahi-gpu · 2022-08-29 17:38
linaphire: It's just t8103! t6000 definitely needs different initdata, but I *hope* the structures are otherwise the same. Feel free to give it a shot!#asahi-gpu · 2022-08-17 03:43
linaAnd they can work with IDE integration too (though it's broken on mine right now, but I'm pretty sure that can be fixed, it just doesn't get loaded), which a perl preprocessor can't...#asahi-gpu · 2022-08-17 03:41
linaAlso, for what it's worth, proc macros do work well with debuggers (the token span information is preserved)#asahi-gpu · 2022-08-17 03:41
linaThe RfL folks are uneasy about using too many proc macros, but it kind of is necessary here, and I think they would agree once they see what I'm doing...#asahi-gpu · 2022-08-17 03:40
linaphire: That's only half the story, the other half is just being able to juggle all these firmware structures safely#asahi-gpu · 2022-08-16 15:36
linaIdeally someone would do what alyssa did for 3D, and make it all work on the macOS kernel driver first, at least to some extent. Then we can hook up the kernel side.#asahi-gpu · 2022-08-16 15:36
linaBut it shouldn't be that hard to support the dedicated compute queue, I just don't have any reason to do it / test code to use with it right now.#asahi-gpu · 2022-08-16 15:35
linaIf it's going through the 3D queue, the same trick would work on AGX without kernel driver changes I think (Apple introduced compute instantiations from render batches AIUI), but you still need someone to hook up all the userspace plumbing to make it all work...#asahi-gpu · 2022-08-16 15:33
linaI might've missed something#asahi-gpu · 2022-08-16 15:33
linadaniels: Huh, last week I was looking at the kernel driver and I think the compute queue was not used? Or is that going through the 3D ones?#asahi-gpu · 2022-08-16 14:41
linaIt's not especially hard or anything as far as I know, but it's something someone needs to explicitly pick up#asahi-gpu · 2022-08-16 14:40
linaNot even Panfrost has compute yet...#asahi-gpu · 2022-08-16 14:39
linaCompute needs someone to care about it... I could work on adding kernel support, but without someone to first work on the OpenCL side in Mesa, that's not very useful ^^;#asahi-gpu · 2022-08-16 14:22
linaBy the way, for those who missed it, I'm going to stream starting the actual GPU driver tomorrow ^^#asahi-gpu · 2022-08-16 13:23
linaAnd easy to benchmark, so it can also answer some questions about Rust vs. C performance#asahi-gpu · 2022-08-16 13:23
linaIt's a pretty good PCIe guinea pig driver#asahi-gpu · 2022-08-16 13:23
linaYes, the folks writing the NVMe driver are working on PCIe and DMA abstractions too as a side effect#asahi-gpu · 2022-08-16 11:37
linaYeah, the first large driver, though people are working on reasonably nontrivial drivers like NVMe too.#asahi-gpu · 2022-08-16 11:36
linaI hope the DRM folks like the idea ^^;#asahi-gpu · 2022-08-16 11:36
linaThanks!#asahi-gpu · 2022-08-16 11:36
linaSpend an hour or so to get fancy color-coded nested GPU structure diff displays, that sort of thing...#asahi-gpu · 2022-08-16 11:35
linaYeah, hah. Though on the flipside, you can do some really crazy things with the object model. It was perfect for prototyping the GPU driver for that reason.#asahi-gpu · 2022-08-16 11:33
linaThat was a bit of a revelation, because in C that would've taken much more code, and in Python it would've been way too slow...#asahi-gpu · 2022-08-16 11:33
linaWhen I was using D it was a bit scary, because I was writing algorithms the same way I'd write them in Python for experiments, even poorly optimized textbook O(n^2) stuff... and then the app kept running at 60 FPS.#asahi-gpu · 2022-08-16 11:32
linaPython is actually pretty good at moving bulk data around, but the moment you need an inner loop, it does kind of fall apart...#asahi-gpu · 2022-08-16 11:28
linaI think it's going to be my go-to language for things that I'd write in Python but I need better performance for#asahi-gpu · 2022-08-16 11:27
linaI ending up learning D to work on Inochi2D and I kind of like it...#asahi-gpu · 2022-08-10 16:49
linaProbably at least some Rust!#asahi-gpu · 2022-06-20 14:18
linaI'd also be open to starting work in C and then starting to sneak Rust in once it goes upstream, if that isn't ready in time.#asahi-gpu · 2022-06-20 14:09
linaSo then it depends on what state Rust is in by then, and how I feel about it.#asahi-gpu · 2022-06-20 14:09
linaSo I would say mid august-september for a sensible timeline for actually starting to work on a real driver. And then, if I'm right about how I'm doing things, it should go very quickly since we'll understand this GPU enough.#asahi-gpu · 2022-06-20 14:08
linaRealistically though, I'm going to be off a couple weeks next month, and there is still work to be done figuring out how this thing works before I'm comfortable starting to hack on a real driver, especially a C driver (C is definitely more painful to refactor than Rust)#asahi-gpu · 2022-06-20 14:06
linaWe're definitely not going to gate the driver on hopes and dreams of Rust getting upstreamed, that's a hard dependency for taking that path.#asahi-gpu · 2022-06-20 14:06
linaIt doesn't, but nor does Rust if it's already upstream#asahi-gpu · 2022-06-20 14:05
linaThe kernel does a terrible job at that in all the exceptional cases, just try yanking a Thunderbolt cable and seeing how many different NULL derefs you manage to hit...#asahi-gpu · 2022-06-20 14:05
linaOOP C isn't that bad, but object lifetime management in C *is* bad.#asahi-gpu · 2022-06-20 14:04
linaAnd besides, with the UABI to work out before it can go upstream, it's not like writing it in C would get us there quickly anyway... and all that time spent working out the UABI is also time to figure out Rust things (if, and only if, Rust support is already in by the time we start, of course)#asahi-gpu · 2022-06-20 14:02
linaI'm not saying it's the right choice, but I'm saying I don't want to dismiss it from the get-go