You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 31, 2025. It is now read-only.
Instead of having explicit pointer-wrapping types in spirv-std like Input<T>, instead, have the compiler not emit storage classes at all (using Generic as a placeholder or something, even though that's not what Generic storage class means). Then, in the linker, do a whole-program-analysis and propagate storage classes throughout the program. Essentially, treat any place where a pointer type appears as a "generic type parameter" except it's a "generic storage class parameter", then do monomorphization (so duplicating functions that are called with multiple storage classes, etc.).
This would solve many problems:
Constants could be emitted to OpVariables of Private storage class, and pointers to them could be passed to functions.
OpTypeRuntimeArray would be able to be supported really easily, as the current Input<T> system requires loading a value of T, but with OpTypeRuntimeArray, T is unsized. Rust's normal rules around this work great, if it were &T, you could write obj.the_unsized_array[5] and it'd generate the right code with the right storage classes.