#asahi-gpu · 2023-01-18 18:49
jannaufirmware/agx/armfw_g14{c,g,s}.im4p 3 different agx firmwares#asahi-gpu · 2023-01-17 16:22
linaAlso this is all assuming I'm reading the shader asm correctly... I'm not exactly used to it ^^;;#asahi-gpu · 2023-01-17 16:22
linaThose are the only SRs it reads#asahi-gpu · 2023-01-17 16:20
alyssaplausible#asahi-gpu · 2023-01-17 16:19
linaAlso I'm pretty sure 20 is core ID#asahi-gpu · 2023-01-17 16:19
linaI only ever saw command 0xf, which is the one that runs some mystery instructions and terminates, and never saw 146/147 changing, but that would make sense if there is only one item in the FIFO here#asahi-gpu · 2023-01-17 16:18
lina146/147 is the save/restore context descriptor pointer, but then 144 seems to be a command FIFO, and after reading that it reads 146 again and (for some commands) treats it as an offset into a pointer which only makes any sense if reading 144 pops the FIFO and 146/147 are a data payload.#asahi-gpu · 2023-01-17 16:15
alyssawhat register #?#asahi-gpu · 2023-01-17 16:14
linaIt's funky, I think one of the special registers is actually a FIFO? The outer loop and the way it reads one register twice and adds together the values makes no sense otherwise.#asahi-gpu · 2023-01-17 16:13
linaThe main reason I wanted a higher level actual language is that it has to deal with data structures to some extent, and a big outer switch statement inside a loop, and it just feels pretty painful to write all that in NIR...#asahi-gpu · 2023-01-17 16:12
linaI'm more interested in what it's doing at a higher level and how to replace it#asahi-gpu · 2023-01-17 16:12
linadougall might want to look at the mystery instructions though#asahi-gpu · 2023-01-17 16:12
linaalyssa: I already looked through some of it, I'll probably cover it during tomorrow's stream ^^#asahi-gpu · 2023-01-17 16:00
alyssadougall: mentioned he was interested in r/e'ing that#asahi-gpu · 2023-01-17 15:59
alyssaAlso, I would just straight up use the blob first, and then once it's properly working look into reverse-engineering the fine details and replacing it.#asahi-gpu · 2023-01-17 15:58
alyssaI don't remember the blob being that big#asahi-gpu · 2023-01-17 15:57
alyssaNIR builder is probably still the sane way to go.#asahi-gpu · 2023-01-17 12:01
cwabbotthowever you'd still have to define your own SPIR-V extension somehow, not sure what the process for that is#asahi-gpu · 2023-01-17 12:00
cwabbottglslang is a lighter weight dependency and might be better for intrinsics because there's a SPIR-V intrinsics thing that allows you to insert SPIR-V more or less directly#asahi-gpu · 2023-01-17 11:59
cwabbottradv uses glslang to compile GLSL to SPIR-V, Intel uses OpenCL C because that's what the Windows driver is using and the kernels are shared between drivers#asahi-gpu · 2023-01-17 11:56
karolherbstYou can, in theory, use whatever language you want to compile to llvm and then to spir-v, but we have some internal tooling around for CL C and GLSL specifically#asahi-gpu · 2023-01-17 11:54
karolherbstlina: sooo... intel is using OpenCL C to implement ray traycing. They compile it to spir-v/nir and use that at runtime#asahi-gpu · 2023-01-17 07:09
linaFor the compute context save/restore/misc blob, the logic is complicated enough I don't want to be messing around with assembly/binary (or building it in raw NIR), but I need some way of inserting at the very least some special register loads and some still-mysterious instructions...#asahi-gpu · 2023-01-17 07:08
linaalyssa: Is there some way of compiling GLSL for an internal shader in mesa, and some reasonable way of adding intrinsics to it?#asahi-gpu · 2023-01-17 03:10
cr1901reads the driver survival guide#asahi-gpu · 2023-01-16 23:07
alyssaIt's not super intense but I'm not going to hand-hold it (since there's not much hardware specific and there's lots of prior art in Mesa to reference)#asahi-gpu · 2023-01-16 23:07
alyssaIf someone is looking for a good first task for the OpenGL driver -- https://gitlab.freedesktop.org/mesa/mesa/-/issues/8091#asahi-gpu · 2023-01-16 16:06
linayes#asahi-gpu · 2023-01-16 16:06
povikah, that's who develops powervr#asahi-gpu · 2023-01-16 16:05
povikand imaginationtech?#asahi-gpu · 2023-01-16 16:05
linaSome registers are still the same or very similar#asahi-gpu · 2023-01-16 16:05
linaAGX is a PowerVR descendant, forked quite a while ago#asahi-gpu · 2023-01-16 16:05
povikthis relates to AGX through some lineage?#asahi-gpu · 2023-01-16 16:03
linaalyssa: Oooooo that is good, their code drop was missing a ton of stuff. I'm sure we can dig out interesting things from here ^^#asahi-gpu · 2023-01-16 00:52
alyssahas official docs for piles of control registers#asahi-gpu · 2023-01-16 00:52
alyssahttps://developer.imaginationtech.com/open-source-gpu-driver/#asahi-gpu · 2023-01-16 00:52
alyssabut#asahi-gpu · 2023-01-16 00:52
alyssalina: I don't know if there's anything in this that applies to AGX and you couldn't already figure out from the code drop#asahi-gpu · 2023-01-15 18:34
dg_Error: PageSize configuation is wrong: configured with 4096, but got 16384#asahi-gpu · 2023-01-15 17:21
ella-0okay :3#asahi-gpu · 2023-01-15 17:17
alyssafor $DAY_JOB#asahi-gpu · 2023-01-15 17:17
alyssaJuly maybe#asahi-gpu · 2023-01-15 17:17
alyssaif you don't get to it I probably will in, like, June#asahi-gpu · 2023-01-15 17:17
alyssabut architecturally vk_meta should be able to support both #1 and #2 with some work#asahi-gpu · 2023-01-15 17:16
ella-0interesting#asahi-gpu · 2023-01-15 17:16
alyssaNVIDIA is #3 so NVK doesn't need meta shaders for this#asahi-gpu · 2023-01-15 17:16
alyssa3. hardware blitters that trivialize the problem#asahi-gpu · 2023-01-15 17:15
alyssa3 classes i guess#asahi-gpu · 2023-01-15 17:15
alyssaoh, uh#asahi-gpu · 2023-01-15 17:10
alyssaGL drivers won't even try and will just decompressed your image in this case.