#asahi-gpu · 2021-03-21 01:23
dougalli find this branch the easiest way to build and get G13 code from a metallib: https://github.com/Thog/gpu/tree/metallib (you can modify macho_disasm.c to write the code to a file instead of calling agx_disassemble... but metallib code does compile a bit differently to non-library code, so something like dump_mappings is preferable for that)#asahi-gpu · 2021-03-21 01:23
dougalli find this branch the easiest way to build and get G13 code from a metallib: https://github.com/Thog/gpu/tree/metallib (you can modify macho_disasm.c to write the code to a file instead of calling agx_disassemble... but metallib code does compile a bit differently to non-library code, so something like dump_mappings is preferable for that)#asahi-gpu · 2021-03-21 01:19
dougall(to be clear you want g13 instructions, rather than llvm ir, right?)#asahi-gpu · 2021-03-21 01:19
dougall(to be clear you want g13 instructions, rather than llvm ir, right?)#asahi-gpu · 2021-03-18 05:28
dougallchrisf: sure - i'll try to fill it out sometime this week (in the mean time, it's really rattling around in the emulator, if that's of any use https://github.com/dougallj/applegpu/blob/30845306a9b685def1a580586dc0f08d008aee37/applegpu.py#L4042-L4220 )#asahi-gpu · 2021-02-16 01:38
dougallYeah, I get that - no pressure at all!#asahi-gpu · 2021-02-16 00:28
dougallAlso, I knew I had a reason to be suspicious of these loads and stores! Looks like they can do float<->int and sRGB<->RGB (most of the "Pack and Unpack Functions"). Hopefully that will explain most of the bits that were worrying me#asahi-gpu · 2021-02-16 00:27
dougallYeah, it just needs to hold together for long enough to replace the testbed with non-Metal code, and your 'demo' stuff feels close (I haven't looked at command stream stuff yet, though)#asahi-gpu · 2021-02-15 12:43
dougallHey - I cleaned up and pushed my hardware testing code, based on wrap.dylib. It's uncomfortably hacky, but it's been my most useful tool in verifying instruction behaviour so far. Happy to help if other people want to mess with it :)