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.
Repository navigation
This repository was archived by the owner on Oct 31, 2025. It is now read-only.
Issue to discuss how to handle pointer address spaces.
spir-v has the concept of Storage Classes which are declared both on pointer types, as well as load/store instructions. We need to somehow carry through the correct pointer type and emit the correct metadata:
Some thoughts off the top of my head:
Conservative option: declare some intrinsic structs:
(where poking at x is an incredibly unsafe operation that requires knowledge of how the backend works, this will be in the spirv-std library, not user code)
So the question is, what do we call all these structs? do we copy the names directly from the spirv spec, or do we try to make something that's a little easier to type and understand?
the list of storage classes is here, I'd like to give rusty names to all of them.
This design issue has been open for a while, and no comments have been made, so closing this by assuming that the current design is what we want to go with.
Activity
khyperia commentedon Sep 18, 2020
It looks like we're going with a format similar to:
(where poking at
xis an incredibly unsafe operation that requires knowledge of how the backend works, this will be in the spirv-std library, not user code)So the question is, what do we call all these structs? do we copy the names directly from the spirv spec, or do we try to make something that's a little easier to type and understand?
the list of storage classes is here, I'd like to give rusty names to all of them.
rust-gpu/rustc_codegen_spirv/src/symbols.rs
Lines 19 to 38 in 9697c22
Also, how do we load/store from them? If methods, what do we call the load/store methods?
[-]Handling pointer address spaces[/-][+]Address space struct design[/+]khyperia commentedon Nov 12, 2020
This design issue has been open for a while, and no comments have been made, so closing this by assuming that the current design is what we want to go with.