Commit Graph

182 Commits

Author SHA1 Message Date
Robin Voetter
3781fe779c render error sets for all functions returning VkResult
> VK_ERROR_UNKNOWN will be returned by an implementation when an unexpected
> error occurs that cannot be attributed to valid behavior of the application
> and implementation. Under these conditions, it may be returned from any
> command returning a VkResult.

Fixes #42
2022-02-22 13:29:55 +01:00
Robin Voetter
0f496af7e9 Adapt to new ArgsIterator api 2022-02-02 17:14:33 +01:00
Robin Voetter
e37b7a0f1b Merge pull request #35 from InKryption/duck-typing-made-easier
Duck typing verification made easier
2022-01-10 18:43:07 +01:00
Robin Voetter
4332a44c28 fix Renderer.isFlags for 64-bit flags 2022-01-02 12:38:28 +01:00
ashpil
809537f536 appends .spv to glslc compiled filename 2021-12-29 21:49:52 +03:00
ashpil
e2268a7eb4 makes shader build comment output directory user-specifiable 2021-12-29 21:45:12 +03:00
InKryption
e4c0d63aaa Increase branch-quota to compensate preemptively 2021-12-28 13:55:39 +01:00
InKryption
fd4302f848 Make duck-typing easier
* Use flag struct based on command enum to enable commands
* Include cmds argument as public declaration inside Wrapper structs
* Include Dispatch type as public declaration inside Wrapper structs
2021-12-28 12:52:52 +01:00
InKryption
2c9aa3655d Copy array of strings instead of assuming lifetime
Current setup works fine if passed static memory like '&.{ "glslc" }', but produces errors of various types (segmentation faults, access denied, file doesn't exist, etc) if passed a dynamically allocated slice, such as a slice containing the result of a call to `Builder.pathJoin`, a la `b.pathJoin(&.{ b.env_map.get("VULKAN_SDK").?, "bin", "glslc" })`.
2021-12-27 23:17:07 +01:00
antlilja
9034c90184 Fix order of handling of optional error union type
std.process.args().next(...) returns an optional error union type, the
potential error has to be handled before the optional can be unwrapped.
2021-12-24 23:29:31 +01:00
Robin Voetter
bf0d0bc43b Rename c_void to anyopaque (ziglang/zig/#10316) 2021-12-20 02:15:00 +01:00
Robin Voetter
0fffe145ed also pass the parameter in this test 2021-12-17 20:15:31 +01:00
Robin Voetter
7c2d1d466b parse pointers in function pointer declarations always as optional 2021-12-17 20:13:19 +01:00
Robin Voetter
d9a57859c6 Add non-failing dispatch load function 2021-12-09 00:28:17 +01:00
Robin Voetter
d1e949a434 Don't remove pointers on in_pointer parameters.
Previously pointers were removed here to facilitate using anonymous struct
literals. Now that Zig supports &.{, these are no longer required, and they
can be pointers again.

Note that there are still some problems in the Zig stage1 compiler, see
https://github.com/ziglang/zig/issues/7627 for example.
2021-12-09 00:28:17 +01:00
Robin Voetter
2952901939 Don't generate Khronos copyright 2021-12-09 00:28:17 +01:00
Robin Voetter
cc9ebf50bb Remove superficial GlobalScope declaration 2021-12-09 00:28:17 +01:00
Robin Voetter
797ae8af88 Adapt to latest Zig master
See ziglang/zig/pull/10055
2021-12-09 00:28:17 +01:00
Clement Rey
c036464d21 use Allocator.dupe instead of std.mem.dupe 2021-12-09 00:28:17 +01:00
Robin Voetter
8862336b77 Make Vulkan enums always be 32-bit (fixes #26) 2021-11-08 13:43:41 +01:00
InKryption
d9c1c79223 Replace anytype with explicit []const {s}Command 2021-11-05 17:45:15 +00:00
InKryption
596672d631 Fix HWND reference 2021-11-03 22:04:52 +00:00
InKryption
941a940122 Fix other references to std.os.windows decls.
I noticed these are also incorrectly referencing windows decls inside std.os.
2021-11-03 21:40:23 +00:00
InKryption
5afeb68873 Change 'std.os.HINSTANCE' to 'std.os.windows.HINSTANCE'
I got a compile error for this after playing around and doing 'vk.InstanceWrapper(std.enums.values(vk.InstanceCommand))', where the compiler thusly complained that there is no declaration for `HINSTANCE` inside `std.os`.
2021-11-03 21:26:49 +00:00
Robin Voetter
90d81c1a04 Make command enums lower camel case to reflect command function name style 2021-10-25 14:34:26 +02:00
Robin Voetter
5f9c17de9a Make sure there are no errors after parsing generated Zig 2021-09-07 03:40:24 +02:00
Robin Voetter
907adb6d91 Add undefined/true/false/null keywords
Stage 2 treats these as identifiers now, but in stage 1 they still
require @"" syntax. See commit
05cf44933d
2021-09-02 16:17:43 +02:00
Robin Voetter
07e530719b Update std.mem.split usage to new API 2021-08-14 01:07:08 +02:00
Robin Voetter
89e16f69a8 Fix some allocation bugs, replace everything by arena (#18) 2021-08-14 00:57:26 +02:00
ashpil
c788b09e78 adds defaults for previously undetected feature struct 2021-08-06 21:43:00 -04:00
ashpil
871d4e7251 implements default for feature structs 2021-07-08 21:31:41 -04:00
Robin Voetter
ecf3ba4a39 Adapt to Zig master 2021-07-06 10:44:08 +02:00
Robin Voetter
27c8d4862c Render error set constant for wrappers 2021-07-02 22:18:37 +02:00
Robin Voetter
844c1564d7 CI: Upload vk.zig as artifact 2021-07-02 19:51:14 +02:00
ashpil
722ddfdb6b camel -> snake for command enums + fixes 2021-06-26 23:43:59 -04:00
ashpil
e36930ad5d less verbose interface via @Type 2021-06-25 09:28:52 -04:00
Robin Voetter
79d901a3e0 Fix a whole bunch of issues exposed by ziglang/zig#9191
This also includes a workaround for the fact that @"type" refers to the builtin
and not to a variable called "type". See ziglang/zig#2897.
2021-06-24 02:11:36 +02:00
Robin Voetter
de0a048f45 Fix another vk.xml moment 2021-06-14 20:49:09 +02:00
Robin Voetter
511211f038 zig fmt **.zig
This also replaces @byteOffsetOf with @offsetOf.
2021-06-13 15:15:42 +02:00
Robin Voetter
6f965fead0 Update to new build API 2021-06-12 13:44:48 +02:00
Robin Voetter
4b4ef38c93 Fix incorrect alignment of Flags64 type packed structs 2021-06-08 00:28:03 +02:00
Robin Voetter
beaa5bb0a5 Adapt to changed hashmap API 2021-06-05 13:42:30 +02:00
Robin Voetter
e0101accda CallingConvention and Target live in std, not in builtin 2021-05-21 12:55:14 +02:00
Robin Voetter
1ebdd7f063 Adapt to Zig changes: Handle errors of testing functions 2021-05-11 14:23:29 +02:00
Robin Voetter
5375c873d9 Vulkan 1.2.175 compatibility 2021-04-13 19:52:06 +02:00
Robin Voetter
711bc08211 Stop fixing up bitmasks.
This seems to not be required anymore.
2021-04-08 13:02:07 +02:00
Robin Voetter
80d338e984 Stop fixing up tags.
This seems to not be needed anymore.
2021-04-08 12:48:35 +02:00
Robin Voetter
fc7c823293 Stop filtering out promoted extensions (Fixes #10)
This seems to not be needed anymore.
2021-04-08 12:47:25 +02:00
Robin Voetter
1e7b5edb10 Allow F as floating-point suffix 2021-03-30 13:08:34 +02:00
Robin Voetter
938359c6c9 Fix parse error 2021-03-30 12:53:32 +02:00