Earlier quoted context omitted.
This is fairly common in many console emulators, see: - PS3 (Nvidia RSX): https://github.com/RPCS3/rpcs3/blob/master/rpcs3/Emu/RSX/rsx... - PS4 (AMD GCN): https://github.com/AlexAltea/orbital-qemu/blob/master/hw/ps4... The hardware is known ahead of time, so console platforms take advantage of that: GPU drivers allocate a context and hand it over to userspace which can do nearly anything it wants with it (abstraction…
Fascinating, and still an impressive technical lift especially for hobby projects without full time funding.
A similar thing was actually done in n64 world for RSP emulation, another proto-gpu device with it's own highly configurable microcode. First it was emulated in CPU with AngryLion, and someone else I think made it all run in compute shaders on the GPU, meaning you can FINALLY play nearly every n64 game accurately rendered, upscaled rendering if you want, and no slowdowns or bugs or glitches from more rare techniques, like the spy gadget in perfect dark.