aboutsummaryrefslogtreecommitdiff
path: root/src/codegen/spirv.zig
diff options
context:
space:
mode:
authorRobin Voetter <robin@voetter.nl>2023-04-08 14:55:39 +0200
committerRobin Voetter <robin@voetter.nl>2023-04-09 01:51:54 +0200
commite389f524c9a09719ea2f6b684c0bf6f3fe4c3c9b (patch)
tree8cde9fe9ea079375e1beb32542cd29a7124eabd6 /src/codegen/spirv.zig
parentf12beb857ad7868396a4246b8f62f83f625c0978 (diff)
downloadzig-e389f524c9a09719ea2f6b684c0bf6f3fe4c3c9b.tar.gz
zig-e389f524c9a09719ea2f6b684c0bf6f3fe4c3c9b.zip
spirv: export functions with .Kernel callconv as entry point
Exported functions which have the .Kernel calling convention are now exported as entry point. This also works with @export.
Diffstat (limited to 'src/codegen/spirv.zig')
-rw-r--r--src/codegen/spirv.zig1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/codegen/spirv.zig b/src/codegen/spirv.zig
index f813c393cd..aebe16a10a 100644
--- a/src/codegen/spirv.zig
+++ b/src/codegen/spirv.zig
@@ -1456,6 +1456,7 @@ pub const DeclGen = struct {
.name = fqn,
});
+ // Temporarily generate a test kernel declaration if this is a test function.
if (self.module.test_functions.contains(self.decl_index)) {
try self.generateTestEntryPoint(fqn, spv_decl_index);
}