mirror of
https://github.com/ziglang/zig.git
synced 2024-11-13 23:52:57 +00:00
add storage_buffer address space
This commit is contained in:
parent
688d7055e3
commit
d35dfc5a3f
@ -1573,7 +1573,7 @@ pub const Cpu = struct {
|
||||
.fs, .gs, .ss => arch == .x86_64 or arch == .x86,
|
||||
.global, .constant, .local, .shared => is_gpu,
|
||||
.param => is_nvptx,
|
||||
.input, .output, .uniform, .push_constant => is_spirv,
|
||||
.input, .output, .uniform, .push_constant, .storage_buffer => is_spirv,
|
||||
// TODO this should also check how many flash banks the cpu has
|
||||
.flash, .flash1, .flash2, .flash3, .flash4, .flash5 => arch == .avr,
|
||||
|
||||
|
@ -515,6 +515,7 @@ pub const AddressSpace = enum(u5) {
|
||||
output,
|
||||
uniform,
|
||||
push_constant,
|
||||
storage_buffer,
|
||||
|
||||
// AVR address spaces.
|
||||
flash,
|
||||
|
@ -37852,7 +37852,7 @@ pub fn analyzeAsAddressSpace(
|
||||
.gs, .fs, .ss => (arch == .x86 or arch == .x86_64) and ctx == .pointer,
|
||||
// TODO: check that .shared and .local are left uninitialized
|
||||
.param => is_nv,
|
||||
.input, .output, .uniform, .push_constant => is_spirv,
|
||||
.input, .output, .uniform, .push_constant, .storage_buffer => is_spirv,
|
||||
.global, .shared, .local => is_gpu,
|
||||
.constant => is_gpu and (ctx == .constant),
|
||||
// TODO this should also check how many flash banks the cpu has
|
||||
|
@ -1893,6 +1893,7 @@ const NavGen = struct {
|
||||
.input => .Input,
|
||||
.output => .Output,
|
||||
.uniform => .Uniform,
|
||||
.storage_buffer => .StorageBuffer,
|
||||
.gs,
|
||||
.fs,
|
||||
.ss,
|
||||
|
@ -458,7 +458,7 @@ pub fn arePointersLogical(target: std.Target, as: AddressSpace) bool {
|
||||
.global => false,
|
||||
// TODO: Allowed with VK_KHR_variable_pointers.
|
||||
.shared => true,
|
||||
.constant, .local, .input, .output, .uniform, .push_constant => true,
|
||||
.constant, .local, .input, .output, .uniform, .push_constant, .storage_buffer => true,
|
||||
else => unreachable,
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user