Commit Graph

1102 Commits

Author SHA1 Message Date
Andreas Süßenbach daeae97daf
Remove redundant occurrences of VULKAN_HPP_NAMESPACE:: in vulkan_to_string.hpp (#2211) 2025-07-08 12:46:22 +02:00
Andreas Süßenbach 68baf3c00f
Remove redundant occurrences of VULKAN_HPP_NAMESPACE:: in vulkan_structs.hpp (#2210) 2025-07-07 17:09:33 +02:00
LEE KYOUNGHEON de8730fd22
Use ref qualifier for RAII handles to prevent creating reference to a temporary. (#2159)
* Use ref qualifier to prevent creating reference to a temporary.

* Return const rvalue reference.
2025-07-02 18:05:25 +02:00
Andreas Süßenbach fe0190241c
Remove redundant occurrences of VULKAN_HPP_NAMESPACE:: in vulkan_handles.hpp (#2206) 2025-07-02 15:07:55 +02:00
Andreas Süßenbach 3444a16cfb
Remove redundant occurrences of VULKAN_HPP_NAMESPACE:: in vulkan_funcs.hpp and other headers (#2205) 2025-07-01 17:24:19 +02:00
Andreas Süßenbach 32f2957efc
Remove redundant occurrences of VULKAN_HPP_NAMESPACE:: in vulkan_format_traits.hpp (#2200) 2025-06-26 13:40:36 +02:00
Andreas Süßenbach d6a9738739
Correct check on exported command. (#2199) 2025-06-26 13:39:05 +02:00
Andreas Süßenbach 4a6293e749
Restrict check on exports of a command to version greater/equal to 319. (#2197) 2025-06-26 08:06:30 +02:00
Andreas Süßenbach 1c6215ddfd
Remove redundant occurrences of VULKAN_HPP_NAMESPACE:: in vulkan_enums.hpp. (#2195) 2025-06-25 11:10:19 +02:00
Andreas Süßenbach 05f5b9a060
Handle new command attribute "export". (#2194) 2025-06-24 18:35:26 +02:00
Andreas Süßenbach dfed90530b
Cleanup work on compare operators (#2169)
* Cleanup work on compare operators

* Use defaulted spaceship operators for handles if available, otherwise use set of explicit comparison operators.
2025-06-24 08:31:14 +02:00
Andreas Süßenbach c143eb293c
Remove redundant occurrences of VULKAN_HPP_NAMESPACE:: in vulkan.hpp. (#2191) 2025-06-18 13:32:51 +02:00
Andreas Süßenbach 3514683079
Filter multiply spec'ed handles for SharedHandles (#2190) 2025-06-16 18:02:05 +02:00
Andreas Süßenbach 01c4ae2211
Filter multiply spec'ed handles on hash generation (#2189) 2025-06-16 15:31:51 +02:00
Andreas Süßenbach 8ee3f2fabd
Filter out multiply spec'ed handles for UniqueHandles types. (#2188) 2025-06-16 12:21:35 +02:00
Andreas Süßenbach 87eaf785f8
Filter multiple required types for function debugReportObjectType (#2184) 2025-06-12 23:12:20 +02:00
Andreas Süßenbach ae6f3c1184
Include missing header type_traits to vulkan_enums.hpp (#2180) 2025-06-12 15:43:51 +02:00
Andreas Süßenbach 81b2f2f950
Add support for newly introduced attributes. (#2177) 2025-06-12 10:33:41 +02:00
Kévin Petit 64b72c4612
Add support for VK_ARM_tensors (#2175)
- Add two new structures to the multipleLenStructs list


Change-Id: I5fea56734eced9c96dd5bbcc4057d72260497969

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2025-06-12 08:18:28 +02:00
Andreas Süßenbach 54cc539ab5
Add functions vk::isColor() and vk::getAllFormats() (#2166) 2025-05-14 08:41:20 +02:00
Jan Kuhlmann 9e748f985b
C++20 Module: Exporting PFN_* symbols (#2158)
* exporting PFN_* symbols in cppm

* changed fnc signature and removed unnecessary assignment

* forgot one

* moved exports to bottom of cppm
2025-05-13 11:28:32 +02:00
Andreas Süßenbach 91109e1e2f
Add new functions getColorFormats, hasRedComponent, hasGreenComponent, hasBlueComponent, and hasAlphaComponent to vulkan_format_traits.hpp (#2163) 2025-05-12 16:54:37 +02:00
Andreas Süßenbach 02b78071f1
Refactor format traits generation (#2160) 2025-05-07 16:24:40 +02:00
Andreas Süßenbach 2cadbd617e
Read new feature and extension element "deprecate" (#2155) 2025-05-06 12:14:00 +02:00
Andreas Süßenbach 448026b9c5
Relax check for attribute "deprecated" of type category "define". (#2152) 2025-05-05 11:15:03 +02:00
Andreas Süßenbach 87f930b684
For a RAII factory function generating an aliased handle, generate the aliasing handle instead (#2150) 2025-04-30 16:00:02 +02:00
Andreas Süßenbach 38bdc9400f
Refactor a number of checking functions (#2149) 2025-04-30 09:07:39 +02:00
Jan Kuhlmann ee121fe6a4
C++20 Module: Fixing dynamic dispatch on Windows MSVC (#2146)
* export defaultDispatchLoaderDynamic symbol

* improved default dispatcher symbol export

* fixed formatting
2025-04-30 08:37:32 +02:00
Andreas Süßenbach a804eaa9b2
Add missing alias classes for raii-handle wrappers (#2148) 2025-04-29 13:41:12 +02:00
Andreas Süßenbach 6dc0a4e2cf
Fix handle type detection for raii factory return statement generation (#2147) 2025-04-29 09:53:10 +02:00
Andreas Süßenbach 66da6f2b87
Introduce new format traits functions (#2143) 2025-04-23 10:54:17 +02:00
Andreas Süßenbach bdf1304837
Add some special handling for command vkExportMetalObjectsEXT (#2142) 2025-04-22 11:49:46 +02:00
Andreas Süßenbach 16915b3fa4
Add using WrappedType to FlagTraits<*FlagBits> to generically get from vk::*FlagBits to Vk*FlagBits at compile-time. (#2138) 2025-04-17 10:39:11 +02:00
Andreas Süßenbach bdc97d096b
Add support for two new command flavours. (#2135) 2025-04-15 22:09:02 +02:00
asuessenbach 387ae87201 Fix generation of end of extension replacements test functions 2025-04-07 12:45:18 +02:00
Andreas Süßenbach 450a047750
Extend depends handling of extensions to allow multiple sets of dependencies for the very same vulkan version. (#2126) 2025-04-03 20:21:11 +02:00
Andreas Süßenbach 63eff3a2e0
Re-introduce extension dependencies inspection (#2124)
* Re-introduce extension dependencies inspection.
2025-04-03 09:06:58 +02:00
Andreas Süßenbach 566e770a3b
Ignore tag on identifying no deleter functions (#2121) 2025-04-01 12:33:59 +02:00
Andreas Süßenbach 6f7fcdfbc7
Simplified member name generation for raii handles (#2120) 2025-03-31 15:51:25 +02:00
Andreas Süßenbach abe7295190
Add support for a new type of commands. (#2119) 2025-03-31 10:51:30 +02:00
Andreas Süßenbach 97e60d04f3
Add support for a new class of commands. (#2118) 2025-03-26 15:00:42 +01:00
Andreas Süßenbach c86d00a898
Minor cleanup work. (#2117) 2025-03-26 08:37:18 +01:00
Andreas Süßenbach e3ea28320d
Fix correctness checks for syncaccess and syncstage (#2115)
+ fix generation of structures used in a structure
2025-03-25 13:24:00 +01:00
Andreas Süßenbach 8fa7cf094d
Extend set of separators for required dependencies check. (#2106) 2025-03-18 09:53:31 +01:00
Andreas Süßenbach 4266ef3040
Move handling and checking of "len" members of a struct to after all members are read (#2102) 2025-03-13 23:40:28 +01:00
Andreas Süßenbach b19b7d7afb
Make the vk::to_string functions constexpr with C++20 and above. (#2101) 2025-03-13 13:44:44 +01:00
Andreas Süßenbach 538fa5d529
Minor cleanup work. (#2098) 2025-03-11 19:48:59 +01:00
Jan Kuhlmann fd13995952
temporarily remove extension dependency inspection (#2099) 2025-03-11 16:59:02 +01:00
Andreas Süßenbach 2c6d6c29b8
Remove the parallel file generation due to too many file access issues on CI builds. (#2100) 2025-03-11 16:55:02 +01:00
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
Andreas Süßenbach fde7e0fc84
Remove deprecation message on promoted extensions. (#1938) 2024-08-07 12:09:39 +02:00