Commit Graph

1003 Commits

Author SHA1 Message Date
Victor Chernyakin fe203f86d0
Optimize `to_string` functions for enums (#2096)
* Optimize `to_string` functions for enums

* Fix `-Wunused-parameter` warning
2025-03-06 17:30:20 +01:00
Andreas Süßenbach da9db0c8a0
Replace some more "vk::" by "VULKAN_HPP_NAMESPACE::" (#2095) 2025-03-06 17:19:37 +01:00
Andreas Süßenbach 325602c26a
Remove extension dependency inspection functions (temporarily) (#2094) 2025-03-06 17:17:32 +01:00
Andreas Süßenbach 8f9db1bad6
Minor cleanup work (#2090) 2025-02-24 18:02:40 +01:00
Andreas Süßenbach f03a052717
Add support for another command flavour, returning result and three values. (#2089) 2025-02-24 13:57:17 +01:00
Piers Daniell 0236fbad7d
Add additional type conversion operators to the struct classes to make it easier to interoperate with the Vulkan C API (#2087)
* 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.

* Minor fixes
2025-02-24 09:35:16 +01:00
Andreas Süßenbach 5f4583c500
Cleanup work on correctness checks (#2079) 2025-02-19 09:11:19 +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 4dc27d82a4
Move lengthy template texts into snippet files. (#2072) 2025-02-13 10:56:11 +01:00
Andreas Süßenbach 0ff63e9dc6
Throw on clang_format failure; fix comment (#2070) 2025-02-11 09:35:35 +01:00
LEE KYOUNGHEON 8672aa4aaa
Export std::{tuple_size,tuple_element} for vk::StructureChain. (#2060)
* Export std::{tuple_size,tuple_element} for vk::StructureChain.

* Add separator
2025-02-05 08:47:13 +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
Andreas Süßenbach ad9104d2b4
Add an error check for struct members with their array size at the wrong position. (#2059) 2025-02-03 17:29:23 +01:00
Andreas Süßenbach 9790cf00ed
Add support for one more value for attribute <bits> in format component. (#2044) 2025-01-15 08:29:52 +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 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
Andreas Süßenbach 265b317356
Extend enum value alias handling. (#2004) 2024-12-02 13:50:53 +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 ab4a7ced0f
Adjustments for update to 1.3.302 (#1999) 2024-11-27 09:56:57 +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 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
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
Andreas Süßenbach 64f5bbf55c
Allow the <feature>'s "name" to be a list of members (#1973) 2024-10-17 08:19:47 +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
Andreas Süßenbach 00dac1bd21
Add check on <syncstage> <syncsupport> "queues" being specified with at least one command. (#1968) 2024-10-08 13:25:37 +02:00
Andreas Süßenbach b8e4e70adf
Add "BOOL" as accepted value for attribute <numericFormat> for the <component> of a <format> (#1967) 2024-10-07 17:58:00 +02:00
Andreas Süßenbach 3b9d6cced3
Upgraded check on required feature name being member of the required struct from warning to error. (#1966) 2024-10-07 17:57:38 +02:00
Andreas Süßenbach 31aac24adb
Move correctness checks on syncstage and syncaccess to checkCorrectness (#1960) 2024-09-23 13:47:05 +02:00
Andreas Süßenbach e12c05d628
Add support for multiple top-level tags <types>, <commands>, and <extensions> (#1959) 2024-09-17 15:03:34 +02:00
Andreas Süßenbach 4e6e8d3fda
Add support for multiply aliased structs in <require>-<feature> tags. (#1958) 2024-09-05 17:44:31 +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
Andreas Süßenbach 0262bef5cd
Add support for new <feature> tags. (#1953) 2024-08-27 13:33:57 +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
Andreas Süßenbach b2c409dd31
Add IWYU pragmas to let code-completers use vulkan.hpp. (#1939) 2024-08-07 15:04:06 +02:00