Re:Ubershaders: A Ridiculous Solution to an Impossible Probl...
by mandarax8 on Saturday May 18, 2024 @03:28AM
(#40397101)
> The GPU ISAs are known (e.g. the PTX compiler for NVidia is open source and has a backend in LLVM)
PTX is only and IR afaik, kinda like SPIRV. It also goes through another compiler in the driver so doesn't really help here
The GPU ISAs are known (e.g. the PTX compiler for NVidia is open source and has a backend in LLVM). The main problem is that the GPU ISA changes with every GPU hardware generation and manufacturer, so if you want to support Nvidia 3xxx + 4xxx + AMD VLIW + AMD GCN + ... you have to use the common demoninator GLSL/HLSL/SPIR-V/whatever.
> why they didn’t emulate Flipper at a low enough level to use the precompiled shaders directly.
They did. Originally the GPU emulator was done in the CPU, and in 2017, the GPU emulator itself was moved into a shader ("ubershader").
The console game itself does not include shaders in text format like many PC games do.