I think it's an elegant solution. SPIR-V requires this sort of type annotations, and a builtin like `@SpirvType()` is quite 'Zig idiomatic' and looks to me like the right way to do it since it doesn't "pollute" the language with a dozen new keywords.
In C/C++ and MSL that information would be provided via `[[ ... ]]` attributes (which may look even messier), and other shading languages usually have dedicated keywords (most readable, but it 'pollutes' the entire language for what in Zig would be a niche use case).
In C/C++ and MSL that information would be provided via `[[ ... ]]` attributes (which may look even messier), and other shading languages usually have dedicated keywords (most readable, but it 'pollutes' the entire language for what in Zig would be a niche use case).