mirror of
https://github.com/ziglang/zig.git
synced 2026-02-12 04:17:49 +00:00
spirv: allow global, constant address spaces
These should actually just work fine in SPIR-V. They are mapped to CrossWorkgroup and UniformConstant respectively.
This commit is contained in:
parent
fe0fb93fa0
commit
45b5f46770
@ -1317,11 +1317,22 @@ pub const DeclGen = struct {
|
||||
|
||||
fn spvStorageClass(as: std.builtin.AddressSpace) StorageClass {
|
||||
return switch (as) {
|
||||
.generic => .Generic, // TODO: Disallow?
|
||||
.gs, .fs, .ss => unreachable,
|
||||
.generic => .Generic,
|
||||
.shared => .Workgroup,
|
||||
.local => .Private,
|
||||
.global, .param, .constant, .flash, .flash1, .flash2, .flash3, .flash4, .flash5 => unreachable,
|
||||
.global => .CrossWorkgroup,
|
||||
.constant => .UniformConstant,
|
||||
.gs,
|
||||
.fs,
|
||||
.ss,
|
||||
.param,
|
||||
.flash,
|
||||
.flash1,
|
||||
.flash2,
|
||||
.flash3,
|
||||
.flash4,
|
||||
.flash5,
|
||||
=> unreachable,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user