Adds a new hwtestbed based around patching metal binary archives with custom shader code. This avoids the need to update it for every macOS update. The only time it would need changes is if Apple changes the how the compiler assigns buffers to uniform registers or changes the format of binary archives.
It's also pipe-based (aside from supplying the actual file due to how the Metal api is laid out), and pretty fast (I've never run the original due to macOS version mismatches, so I don't know how fast it was, but the new one completes tests in 18s with ~90% cpu time in python), so I've removed the caching stuff
Also adds a tool to test random shader code on the command line:
Amazing! tbh I don't remember how long it took either, but I'd guess that's at least a 60x speed up. And, well, it should actually work, so that's nice too :)
Adds a new hwtestbed based around patching metal binary archives with custom shader code. This avoids the need to update it for every macOS update. The only time it would need changes is if Apple changes the how the compiler assigns buffers to uniform registers or changes the format of binary archives.
It's also pipe-based (aside from supplying the actual file due to how the Metal api is laid out), and pretty fast (I've never run the original due to macOS version mismatches, so I don't know how fast it was, but the new one completes tests in 18s with ~90% cpu time in python), so I've removed the caching stuff
Also adds a tool to test random shader code on the command line:
(And yes it seems there is a reason Apple runs four separate
simd_shuffle
s with differing bits on the bottom when you usemetal::simd_shuffle
)