authorgravatar for robin@voetter.nlRobin Voetter <robin@voetter.nl> 2022-11-25 23:58:21+01:00
committergravatar for robin@voetter.nlRobin Voetter <robin@voetter.nl> 2023-04-09 01:51:48+02:00
logdf5577c28bf1cc26f8bcf21ed1201e31987ac009
treee4a91df07f36ba60a5ca0f1ce72a5e043fdd5637
parentba60d456b45bd391ec25195c800d61ab14de7985
signaturelock-open Commit is signed but in an unrecognized format.

spirv: allow more calling conventions

This allows the Zig calling convention and makes way for a Kernel calling convention in the future. Any future checks on calling conventions should be placed in Sema.zig.

1 files changed, 1 insertions(+), 3 deletions(-)

src/codegen/spirv.zig+1-3
......@@ -491,9 +491,7 @@ pub const DeclGen = struct {
491491 break :blk try self.spv.resolveType(SpvType.initPayload(&payload.base));
492492 },
493493 .Fn => blk: {
494 // We only support C-calling-convention functions for now, no varargs.
495 if (ty.fnCallingConvention() != .C)
496 return self.fail("Unsupported calling convention for SPIR-V", .{});
494 // TODO: Put this somewhere in Sema.zig
497495 if (ty.fnIsVarArgs())
498496 return self.fail("VarArgs functions are unsupported for SPIR-V", .{});
499497