Commit Graph

419 Commits

Author SHA1 Message Date
Robin Voetter
9607e97fe9 example: really resolve swapchain memory leak this time 2022-02-08 12:36:38 +01:00
Robin Voetter
7b80166108 example: handle potential memory leak 2022-02-02 17:14:44 +01:00
Robin Voetter
0f496af7e9 Adapt to new ArgsIterator api 2022-02-02 17:14:33 +01:00
Robin Voetter
ec4b4a0d46 Merge pull request #39 from maxxnino/master
example: fix memory leak in swapchain.deinit
2022-01-30 05:17:30 +01:00
maxxnino
e9615a2ce2 example: fix memory leak in swapchain.deinit 2022-01-30 12:00:11 +09:00
Robin Voetter
a09cca0801 Merge pull request #38 from maxxnino/master
fix segfault when add more device extensions in example
2022-01-23 00:44:37 +01:00
maxxnino
86ba5f9980 fix segfault when add more device extensions in example 2022-01-22 14:34:12 +09: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
d7f499c949 ++y 2022-01-07 16:53:47 +01:00
Robin Voetter
4332a44c28 fix Renderer.isFlags for 64-bit flags 2022-01-02 12:38:28 +01:00
Robin Voetter
1e1af94949 Merge pull request #37 from maxxnino/master
Destroy correct semaphore when error
2022-01-02 12:27:13 +01:00
maxxnino
ac1eb6fa17 destroy correct semaphore when error 2022-01-02 14:26:24 +09:00
Robin Voetter
dc2015adc3 Merge pull request #36 from ashpil/master
Tweaks to shader build integration
2021-12-30 16:17:20 +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
Robin Voetter
b337356ecc Merge pull request #34 from InKryption/patch-1
Copy array of strings instead of assuming lifetime
2021-12-29 01:50:42 +01:00
InKryption
e4c0d63aaa Increase branch-quota to compensate preemptively 2021-12-28 13:55:39 +01:00
InKryption
10fe28eddc Remove debug assertion 2021-12-28 13:12:45 +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
Robin Voetter
eb4373bb7c Merge pull request #33 from antlilja/err_opt_order
Fix order of handling of optional error union type in generator
2021-12-24 23:38:57 +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
c169871f96 Clarify loader calling convention characteristics (implements #30) 2021-12-09 00:28:17 +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
Robin Voetter
e634a4b434 CI: Bump Vulkan SDK version 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
maxxnino
a3f4e6a400 use present_queue for present_queue 2021-11-21 23:41:46 +09:00
Robin Voetter
156843cb9a Merge pull request #28 from Aransentin/patch-1
Updated Vulkan XML registry master branch name
2021-11-11 20:37:32 +01:00
Jens Goldberg
9aab9f4480 Updated Vulkan XML registry master branch name
The Vulkan XML registry changed their name from "master" to "main". This bit me when I followed the link in the README, didn't read too carefully that it was X commits behind, and downloaded a pretty old and incompatible version of `vk.xml` by mistake.
2021-11-11 19:34:34 +00:00
Robin Voetter
c6b46172c8 example: Cheap fix to make the window resizable on wl 2021-11-08 14:06:00 +01:00
Robin Voetter
8862336b77 Make Vulkan enums always be 32-bit (fixes #26) 2021-11-08 13:43:41 +01:00
Robin Voetter
caf8e6be99 Merge pull request #25 from InKryption/patch-1
Replace `anytype` with explicit `[]const {s}Command`
2021-11-05 19:10:11 +01:00
InKryption
087cd02413 Update graphics_context.zig 2021-11-05 18:06:20 +00:00
InKryption
d9c1c79223 Replace anytype with explicit []const {s}Command 2021-11-05 17:45:15 +00:00
Robin Voetter
a6063cc89e Merge pull request #24 from InKryption/patch-1
Fix incorrect references to windows decls in render.zig
2021-11-03 23:06:55 +01: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
58787a9dc3 Add mach-glfw and mach-glfw-vulkan-example readme links 2021-10-31 16:50:35 +01:00
Robin Voetter
5a08cb8f9f Merge pull request #21 from slimsag/patch-1
examples: do not call glfwSwapBuffers
2021-10-31 16:26:23 +01:00
Stephen Gutekanst
55c2da886b examples: do not call glfwSwapBuffers
I am porting this example to [mach-glfw](github.com/hexops/mach-glfw), and noticed that no GLFW error handling callback is registered because in my port there are a lot of GLFW errors :)

`glfwSwapBuffers` here is emitting `GLFW_NO_WINDOW_CONTEXT` errors constantly, because calling it without a valid OpenGL context is illegal. It's not needed for Vulkan.
2021-10-31 00:57:21 -07: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