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
SPIR-V lists all the inputs and outputs for each entry point. The question is whether it's a good idea to represent this somehow in the IR. See gpuweb/gpuweb#592 for WGSL discussion.
Pros for specifying:
match SPIR-V
easier to translate from IR to anything, since we know the interface
Cons for specifying:
more verbose and redundant
incomplete - stuff like uniform or storage buffers are also technically the interface, so we still need to go and scan the uses of the globals
Another thought I had is that it doesn't make sense to specify that interface per entry point. It seems like it would make more sense to have for the function.
The text was updated successfully, but these errors were encountered:
Saying that, it sounds like having the interface in the IR would be useful (i.e. to avoid deriving that over and over each time a module is used). We just need to tweak it a bit. First, by moving it into the Function. Second, instead of listing inputs and outputs, we'd have a Map<Token<GlobalVariable>, GlobalUse>, where:
I think this is a good idea. Because now, we have to iterate the Globals for far more than necessary. If I understand your proposal correctly, that means that we in theory have to iterate once to know what Globals are used for what purpose. I think that is a good idea.
SPIR-V lists all the inputs and outputs for each entry point. The question is whether it's a good idea to represent this somehow in the IR. See gpuweb/gpuweb#592 for WGSL discussion.
Pros for specifying:
Cons for specifying:
Another thought I had is that it doesn't make sense to specify that interface per entry point. It seems like it would make more sense to have for the function.
The text was updated successfully, but these errors were encountered: