Commit Graph

127 Commits

Author SHA1 Message Date
Sirius902
be2ebfbff4 Compile on Zig master 2024-02-06 10:35:37 -08:00
antlilja
e72a6bb2d0 Fix old casts (rename and remove type) in vk.zig 2024-01-18 16:21:32 +01:00
sammy j
57ad4d5e16 fixing up vulkan-zig for new build design 2024-01-02 18:28:11 -08:00
Robin Voetter
27d9b028eb fix invalid use of var 2023-11-21 19:56:00 +01:00
Robin Voetter
6d46195c99 make pointers which do not have an 'optional' attribute optional
Closes #109
2023-10-21 11:02:48 +02:00
Christofer Nolander
190a4a054d add leading dot for bit flags format 2023-08-23 22:17:05 +02:00
Christofer Nolander
2287412536 use format mixin for bit-flags 2023-08-23 22:12:17 +02:00
Christofer Nolander
5b99c4992a format bit flags as set
This changes to format output from:

    MyFlagType{ .first_bit = true, second_bit = false, _reserved_bit_0 = false, _reserved_bit_1 = false }

to the following:

    MyFlagType{ first_bit }

That is, we only show bits which are `true`.
2023-08-23 20:01:44 +02:00
tiawl
4bc0666679 Add logs for std.zig.Ast.parse() failure 2023-08-09 21:23:07 +02:00
Peter Lef
f172cbbd7d Minor readability change
To be consistent with the naming style in the previous loop.
2023-07-24 00:18:56 -04:00
Peter Lef
69402977bc Fix overwriting of pointer optionality 2023-07-24 00:18:16 -04:00
Peter Lef
c7d3723710 Nullable pointer parameters
For procedure parameters which are of pointer type: if the associated
`count` parameter is marked `optional` in the XML, this commit makes the
parameter pointer type nullable.
2023-07-10 10:59:11 -04:00
avokadoen
3094dc5e27 explicitly cast boolToInt in Wrapper
This resolves compile error with master zig
2023-05-26 13:17:57 +02:00
avokadoen
9bb8e7b1f7 expose shader hash in Shader struct 2023-05-23 21:16:22 +02:00
Robin Voetter
8b452b9edd generate wrapper for command aliases
Instead of generating a Zig alias for aliased commands, actual wrappers
are now generated. This should make sure that extension commands, such as
vkCmdBeginRenderingKHR, can still be used on older Vulkan implementations.
2023-04-17 20:09:30 +02:00
praschke
2a796113e8 Update for zig build changes
- Step now holds the builder and some manifest/cache helpers
- cleaned up proxy names and remaining uses of `std.build`
- removed vicious lie from README
2023-03-18 12:26:59 +00:00
Robin Voetter
070500f5e5 Update parser for VulkanSC changes
The update that added the VulkanSC changes to vk.xml broke vulkan-zig previously.
2023-03-04 01:24:30 +01:00
antlilja
07b13e976f Made vulkan-zig conform to new multi for syntax 2023-02-22 22:34:49 +01:00
InKryption
71403a013b remove configurable file name from GenerateStep & don't use path as part of cache hash 2023-02-18 01:59:40 +01:00
InKryption
ef75aa0fd6 Update to latest build system changes; use caching API in GenerateStep 2023-02-16 02:21:28 +01:00
avokadoen
b09e14a649 update build to use new build API 2023-02-08 20:23:21 +01:00
Robin Voetter
782d75ac4c Merge pull request #73 from ashpil/more-defaults
More defaults for struct fields
2023-02-05 20:33:16 +01:00
ashpil
0873a35392 provide defaults for struct fields vulkan considers optional 2023-02-05 13:33:13 -05:00
mlarouche
e9e4e0d77f Update to latest std lib changes regarding Zig parsing 2023-02-04 16:54:15 -05:00
Robin Voetter
2a631c4695 also generate command aliases (fixes #71) 2023-01-29 23:54:16 +01:00
Robin Voetter
08dc9f508c standardize names for step creation and obtaining packages
stdlib style is to use `create` for step creation and `getPackage`/`getSource`
to provide generated sources as package/file.
2022-12-30 00:43:29 +01:00
Aksel Hjerpbakk
2ef2905c3d rename StructField field_type to type
breaking zig commit: aac2d6b56f
2022-12-22 15:57:25 +01:00
Robin Voetter
a56d6e31a8 allocgate 2.0 2022-12-03 02:35:40 +01:00
Robin Voetter
be59386118 change pointer size fallback to many 2022-11-27 23:24:37 +01:00
a-day-old-bagel
5a64a8e0af updated platform enumeration for 0.11.0 2022-11-27 15:10:00 -07:00
Robin Voetter
75aa7e5556 Explicitly default pNext fields again
This undoes #5, as there are still some structs which do not properly
set this value.
2022-10-07 01:36:34 +02:00
Robin Voetter
cc95608912 add missing default foreign types, fix SECURITY_ATTRIBUTES foreign type 2022-10-07 01:36:21 +02:00
Robin Voetter
135fc51b3b make basetypes with no clear type foreign
This allows the user to override them to the proper type
2022-10-07 01:35:26 +02:00
Robin Voetter
a21db9e2b5 dont write default structure type if there is none 2022-10-07 01:34:49 +02:00
Robin Voetter
08a72b582d decay arrays to pointers in parameters (fixes #54) 2022-10-07 01:33:25 +02:00
Robin Voetter
09d2de4fb6 Add special cases for bit packed structs
This commit adds special cases for AccelerationStructureInstanceKHR and
VkAccelerationStructureSRTMotionInstanceNV. These types use bit-packed
fields which are not representable in the current version of the zig
stage 2 compiler. This might change when
https://github.com/ziglang/zig/issues/13009 is resolved.

Fixes #56
2022-10-07 00:21:15 +02:00
Robin Voetter
977b4ca5f4 remove unused unused variables 2022-09-24 00:34:46 +02:00
Robin Voetter
837893c637 clean up flags using new zig features 2022-08-20 12:10:56 +02:00
Robin Voetter
5af6ffe864 zig stage 2 compatibility 2022-08-20 11:31:36 +02:00
Robin Voetter
cc87740422 improve xml parser 2022-08-20 00:31:42 +02:00
Robin Voetter
f6f5f66f20 Add missing try in print argument (fixes #52) 2022-07-27 22:52:23 +02:00
InKryption
0b4b6f8acb Add back methods from cmd enums relating to function pointer types and names, namespaced under the command flag structs 2022-06-12 00:12:28 +02:00
InKryption
be31203f2e Add command flag mixin for flag computations. 2022-06-03 13:52:58 +02:00
InKryption
05deff877b Replace command enums with command flag structs 2022-06-03 03:44:03 +02:00
Aksel Hjerpbakk
7fdaece86c update to latest zig 2022-05-28 15:30:07 +02:00
Robin Voetter
2f2125046c clean up Dispatch construction a little 2022-03-17 00:16:03 +01:00
Robin Voetter
aac20d107a fix duplicate generation of 'Unknown' error on some commands 2022-03-16 22:57:25 +01:00
Robin Voetter
470615632d place bit flag align on use site instead of in struct declaration 2022-02-25 12:59:30 +01:00
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
e37b7a0f1b Merge pull request #35 from InKryption/duck-typing-made-easier
Duck typing verification made easier
2022-01-10 18:43:07 +01:00