mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
spirv: deny global OpVariable in inline asm
This feature requires to be integrated with the mechanism that orders the global variables, and that is not yet in place.
This commit is contained in:
parent
1de2d2ee1c
commit
fe0fb93fa0
1 changed files with 6 additions and 2 deletions
|
|
@ -444,8 +444,12 @@ fn processGenericInstruction(self: *Assembler) !?AsmValue {
|
|||
.OpExecutionMode, .OpExecutionModeId => &self.spv.sections.execution_modes,
|
||||
.OpVariable => switch (@intToEnum(spec.StorageClass, operands[2].value)) {
|
||||
.Function => &self.func.prologue,
|
||||
// TODO: Emit a decl dependency
|
||||
else => &self.spv.sections.types_globals_constants,
|
||||
else => {
|
||||
// This is currently disabled because global variables are required to be
|
||||
// emitted in the proper order, and this should be honored in inline assembly
|
||||
// as well.
|
||||
return self.todo("global variables", .{});
|
||||
},
|
||||
},
|
||||
// Default case - to be worked out further.
|
||||
else => &self.func.body,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue