Commit Graph

896 Commits

Author SHA1 Message Date
Piers Daniell bcc014018b Minor fixes 2025-02-21 14:27:15 -07:00
Piers Daniell 041a276730 Add type conversion operators to the structs
This improves compatibility with the Vulkan C API so applications can
easily use the vulkan_structs.hpp classes with the C API seamlessly.
2025-02-21 14:15:12 -07:00
Jan Kuhlmann 03f07338be
Suppress clang warning `-Wcast-function-type` for shared destroy (#2078)
* supress clang warning for shared destroy

* ignore demoted to -Wcast-function-type

* ignore warning only for clang13 and up

* only pop warning if previously pushed
2025-02-19 09:05:30 +01:00
Jan Kuhlmann 85036c964c
C++20 module: Hide to_string behind VULKAN_HPP_NO_TO_STRING (#2077)
* hide to_string behind VULKAN_HPP_NO_TO_STRING

* adjusted generated cppm
2025-02-18 08:20:17 +01:00
Yilong Li 9dbf676cdb
vulkan_handles: Remove the redundant semicolon after ctor definition (#2073)
Semicolons after in-class function definitions are redundant, and may
trigger the "-Wextra-semi" warning of compilers, for example:

* gcc: https://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Dialect-Options.html#index-Wextra-semi
* clang: https://clang.llvm.org/docs/DiagnosticsReference.html#wextra-semi

This change removes the redundant semicolon in the code generator and
the generated hpp file.

Bug: https://fxbug.dev/378964821
2025-02-17 14:36:07 +01:00
Andreas Süßenbach 3ec3e1c8d1
Add support for clang_format options version 17 (#2063) 2025-02-06 13:20:09 +01:00
Andreas Süßenbach 3f2fe22281
Add support for clang_format options version 16. (#2062) 2025-02-05 13:44:36 +01:00
Andreas Süßenbach d9c7a3b836
Add links into https://registry.khronos.org/vulkan/specs/latest/man/html for relevant data types (#2061) 2025-02-04 11:13:58 +01:00
github-actions[bot] 6b05ffe121
Update Vulkan-Headers to v1.4.307 (#2058)
Co-authored-by: GitHub <noreply@github.com>
2025-02-03 11:44:22 +01:00
github-actions[bot] bc11a75f32
Update Vulkan-Headers to v1.4.306 (#2055)
Co-authored-by: GitHub <noreply@github.com>
2025-01-27 10:21:23 +01:00
Andreas Süßenbach 6578bfcc88
Update Vulkan-Headers to v1.4.305 (#2049) 2025-01-21 10:53:23 +01:00
Andreas Süßenbach 03c775461b
Use VULKAN_HPP_NO_CONSTRUCTORS and VULKAN_HPP_NO_SETTERS as documented in the readme. (#2041) 2025-01-09 15:45:43 +01:00
Andreas Süßenbach 8ca59e086c
Update Vulkan-Headers to v1.4.304 (#2039) 2025-01-09 12:33:24 +01:00
Andreas Süßenbach ed47b1d9ad
Remove special assertion on eFreeDescriptorSet in function Device::createDescriptorPool (#2038) 2025-01-08 19:47:53 +01:00
Andreas Süßenbach 752778463e
Parallelize the generation of the files. (#2035) 2025-01-08 11:53:08 +01:00
Andreas Süßenbach 264d35b58c
Introduce vk::PFN_VoidFunction as a replacement of PFN_vkVoidFunction (#2033) 2025-01-06 18:04:33 +01:00
Andreas Süßenbach d5f49e5a7b
Change using WIN32 to _WIN32 (#2032) 2025-01-06 14:20:22 +01:00
Andreas Süßenbach 0d89df69b3
Export the C-type VkGeometryInstanceFlagsKHR in vulkan.cppm. (#2023) 2025-01-06 10:16:51 +01:00
Andreas Süßenbach 1055cb5e78
Add funcpointer types to vulkan.cppm. (#2022) 2024-12-12 15:20:37 +01:00
Andreas Süßenbach d5a18dc87e
Introduce vk-version of the funcpointers (#2020) 2024-12-12 09:46:53 +01:00
Andreas Süßenbach 07cdcb909d
Adjust namespace of compare operators on vk-handles. (#2013) 2024-12-11 09:33:07 +01:00
Andreas Süßenbach 22a2be853c
Export detail::getDispatchLoaderStatic in vulkan.cppm (#2008) 2024-12-11 09:28:49 +01:00
Andreas Süßenbach bdd57b78fa
Include vulkan_to_string.hpp in vulkan.cppm (#2017) 2024-12-10 17:46:29 +01:00
Andreas Süßenbach a29adc0147
Include vulkan.hpp, instead of vulkan_enums.hpp in vulkan_to_string.hpp. (#2016) 2024-12-10 17:44:47 +01:00
Andreas Süßenbach c2c49478e9
Re-add compare operators of vk-handles, needed for 32bit builds. (#2010) 2024-12-06 09:56:10 +01:00
github-actions[bot] 20ecea9574
Update Vulkan-Headers to v1.4.303 (#2006)
Co-authored-by: GitHub <noreply@github.com>
2024-12-04 10:30:35 +01:00
Andreas Süßenbach 265b317356
Extend enum value alias handling. (#2004) 2024-12-02 13:50:53 +01:00
Andreas Süßenbach 1e92bf4fcd
Add inclusion of new encode file to VideoHppGenerator, add compile test for video. (#2002) 2024-12-02 08:51:02 +01:00
Andreas Süßenbach 06b91cfdc2
Add comparison operators for vk::raii handles, remove them for vk handles (#2001) 2024-11-28 08:50:43 +01:00
Andreas Süßenbach cdfa83ab79
Add specializations of std::hash for all the structs and handles in the vk-namespace. (#1994) 2024-11-26 11:08:49 +01:00
Andreas Süßenbach d433715af0
Extend cases when vk::detail::DispatchLoaderStatic is defined. (#1995) 2024-11-14 12:19:22 +01:00
Andreas Süßenbach a4d53f4a22
Move extension inspection template to a snippet file. (#1992) 2024-11-11 11:41:24 +01:00
Andreas Süßenbach 43f7a18b02
Adjust loading procedure of the vk::detail::DynamicLoader on MacOS (#1991) 2024-11-05 19:52:08 +01:00
github-actions[bot] 6902b578be
Update Vulkan-Headers to v1.3.301 (#1990)
Co-authored-by: GitHub <noreply@github.com>
2024-11-05 11:47:23 +01:00
Andreas Süßenbach 6e5489fcd9
Move all the management helper classes for SharedHandles and UniqueHandles into namespace detail. (#1984) 2024-10-30 08:14:48 +01:00
Andreas Süßenbach ed3cf7ac51
Move all the dispatcher related classes into namespace detail (#1983) 2024-10-29 08:13:51 +01:00
github-actions[bot] 24dee1ce75
Update Vulkan-Headers to v1.3.300 (#1981)
Co-authored-by: GitHub <noreply@github.com>
2024-10-28 12:45:25 +01:00
Andreas Süßenbach e80b3fae8a
Restrict commands taking an allocator as template argument to allocators of the correct data type (#1980) 2024-10-24 16:29:00 +02:00
Andreas Süßenbach eecf79d57f
Add some special handling debug code for vk::raii::DescriptorPool (#1978) 2024-10-24 08:18:43 +02:00
github-actions[bot] 8444972909
Update Vulkan-Headers to v1.3.299 (#1974)
Co-authored-by: GitHub <noreply@github.com>
2024-10-21 14:58:14 +02:00
github-actions[bot] 8592ed9743
Update Vulkan-Headers to v1.3.298 (#1971)
Co-authored-by: GitHub <noreply@github.com>
2024-10-14 12:32:50 +02:00
Andreas Süßenbach 56fdc0b070
Generate only the standard version for commands that would require vector-operations inside a struct. (#1970) 2024-10-09 16:06:13 +02:00
GitHub 26cf5590cb Update Vulkan-Headers to v1.3.297 2024-10-05 21:26:32 +02:00
Sharadh Rajaraman 6abd3f42a8
Use `import std;` guarded by macro (#1932)
* Initial build and tests setup

* Enable the `CppStdModule` test

* Snippets and generator changes

* Generated files changes

* Enable std module with macro

* Unconditionally use `import std` with C++23

* Add support for external `import std` control with `VULKAN_HPP_ENABLE_STD_MODULE`

- Rewrite `includes.hpp` and `macros.hpp`
- Unconditionally set `VULKAN_HPP_ENABLE_STD_MODULE` for `vulkan.cppm` to bug-fix
- Generated necessary files again

* Top-level CMake changes

* Reorganise logic, and propagate external macro correctly

* RAII: vulkan_hpp before ifdef

* Define `VK_USE_64_BIT_PTR_DEFINES` in `vulkan_hpp_macros.hpp`

* Generate the `VK_USE_64_BIT_PTR_DEFINES` clause from the XML instead of hardcoding it

* Refactored handling for `VK_USE_64_BIT_PTR_DEFINES`

- Updated condition to positive test for `#ifndef VK_USE_64_BIT_PTR_DEFINES` in `completeMacro`

* Added `#include <string.h>` to resolve `strnlen` missing in the module

* Use only `std.compat`

* FIx after rebase
2024-09-05 08:48:19 +02:00
Andreas Süßenbach fbb62163a0
Mark deprecated enum values as deprecated (#1955) 2024-09-03 08:53:36 +02:00
github-actions[bot] 2fcbcfbefe
Update Vulkan-Headers to v1.3.295 (#1954)
Co-authored-by: GitHub <noreply@github.com>
2024-09-02 12:39:56 +02:00
Andreas Süßenbach 98ea600e1f
Removed special handling for enumerating commands with complex size information via a struct, generating just the standard function in such cases (#1952) 2024-08-26 16:21:45 +02:00
github-actions[bot] bd70384cd4
Update Vulkan-Headers to v1.3.294 (#1951)
Co-authored-by: GitHub <noreply@github.com>
2024-08-26 16:06:58 +02:00
Andreas Süßenbach ecd4b59328
Remove move-constructor and deleted move-assignment of vk::StructureChain. (#1949) 2024-08-26 09:45:57 +02:00
Andreas Süßenbach d86b49ca04
Update Vulkan-Headers to v1.3.293 (#1944) 2024-08-19 16:23:55 +02:00