Commit Graph

92 Commits

Author SHA1 Message Date
Andreas Süßenbach 9747e68285
Restrict template argument Dispatch to only take evaluate the newly introduced type trait isDispatchLoader with value == true. (#2360)
Set Version Tag / set-version-tag (push) Has been cancelled Details
2025-11-12 18:21:31 +01:00
Jan Kuhlmann 7c480ca5aa
C++Module: Fix GCC error and replace `std.compat` with `std` (#2353)
* iunclude vulkan.h before the import

* replace std.compat with std
2025-11-12 13:49:10 +01:00
Andreas Süßenbach 15f4b3024f
Fix default values of function arguments when VULKAN_HPP_NO_DEFAULT_DISPATCHER is defined. (#2356) 2025-11-12 10:08:57 +01:00
Jan Kuhlmann 1491456a64
use assert macros (#2352)
Set Version Tag / set-version-tag (push) Waiting to run Details
2025-11-11 14:56:14 +01:00
Andreas Süßenbach 36b276f0a2
Replace using free by using a std::vector (#2344) 2025-11-10 14:29:35 +01:00
Jan Kuhlmann b4d30a5fb5
CI: Added runner for Windows with Clang and Ninja (#2342)
* add windows ci testing clang and ninja

* attempt to use multi-config builds on msvc ci

* install deps for windows ci

* temporarily disable ci portions

* try clang-cl

* test x64 only

* try x64 for clang-cl

* specify clang-cl as C compiler

* attempt clang-cl with dep install

* ignore unused variable warning in sample02

* need to specify c compiler as glfw install is not being found

* try to ignore warning in standard clang fashion

* syntax fix

* cast procaddress to void* before final func type cast

* added more windows clang warning suppressions

* disable normal windows ci

* suppress warnings in raii samples

* suppress more warnings for tests

* more unused var suppressions for tests

* disable preinstall of deps in clang to prevent _ITERATOR_DEBUG_LEVEL mismatch

* suppress unused var warnings triggered in release mode

* add warning suppression to flags test

* fixed strided array proxy test

* fix structure chain test

* fix extension inspection test

* reenable all ci workflows
2025-11-10 14:29:09 +01:00
Sharadh Rajaraman e511715fce
Do not `export import std` as a macro (#2340)
Set Version Tag / set-version-tag (push) Has been cancelled Details
* Do not export-import `std` as a macro

* Move warning expansion to macros file, and create a macro for it
- Also remove macro for `std.compat` and hardcode it
2025-11-06 10:59:34 +01:00
Andreas Süßenbach 4bc2057ad8
Cleanup on default assignment macros. (#2335) 2025-10-30 15:37:07 +01:00
Sharadh Rajaraman ed449ac36f
Simplify named module handling and macros (#2303)
* Remove `VULKAN_HPP_ENABLE_STD_MODULE` macro; unconditionally use `import std;`

* Emit compile-time warning about experimental state for module

* Refactor `#include` guard to use `VULKAN_HPP_CXX_MODULE` for all headers

* Group global namespace exports into block

* Simplify CMake setup for modules

- Raise minimum version to 3.22 (this is what we have in CI)
- Remove duplicated options
- Set up a single option that depends on magic `__CMAKE::CXX23` target; defaults to OFF unless magic UUID set (or future CMake version supports)

* Rebase changes

* Guard C++ module warning with compile-time flag

* Fix macro guard for experimental warning

* Force `<vulkan/vulkan_hpp_macros.hpp>` at the top of includes list
2025-10-09 21:04:11 +02:00
Ilya Doroshenko 4ff98ef7a8
#1894 Added macro guard for optional default deleter constructors assignments. (#2296) 2025-09-29 17:22:14 +02:00
Jan Kuhlmann 2c17c62600
added another guard for VULKAN_HPP_ENABLE_STD_MODULE (#2300) 2025-09-29 10:58:54 +02:00
Jan Kuhlmann f522d73454
C++Module: Fixing import std on enum header and using `export import std` when appropriate (#2283)
* fix std import on enum header

* remove duplicate contents in cppm

* moved dynamic enabling of std module into macro header

* do not automatically enable import std

* automatic opt-out approach for export import std

* added opt-out option VULKAN_HPP_NO_STD_MODULE

* add VULKAN_HPP_NO_STD_MODULE to CI workflows

* added VULKAN_HPP_NO_STD_MODULE flag to the readme

* set VULKAN_HPP_NO_STD_MODULE to OFF by default

* added import_std exclusion to ubuntu-ext CI
2025-09-25 09:02:03 +02:00
dv-001 e418dd91fb
Fix: Correct IWYU pragmas (#2288) 2025-09-17 13:43:30 +02:00
Jan Kuhlmann df7099a77e
added explicit cstdlib for vulkan module with std (#2269) 2025-09-03 09:20:01 +02:00
Andreas Süßenbach 6cfec828f6
Refactor file generation functions (#2256)
* Refactor file generation functions

* Rebased on main.
2025-08-18 08:31:15 +02:00
Andreas Süßenbach 7beac182b2
Remove the superfluous operator<=> for handles. (#2247) 2025-08-11 13:37:09 +02:00
Andreas Süßenbach 6bd3b4652c
Introduce defines VULKAN_HPP_DISPATCH_LOADER_[DYNAMIC|STATIC]_TYPE (#2244) 2025-08-11 13:36:46 +02:00
Andreas Süßenbach 32bd2b7ab7
Adjust order for loading vulkan library by the DynamicLoader for MacOS. (#2231) 2025-07-30 17:19:43 +02:00
Andreas Süßenbach d16c62670b
Mark deprecated struct members as deprecated. (#2230) 2025-07-30 09:36:58 +02:00
Andreas Süßenbach 7dfe7d3ad9
Extend support of VULKAN_HPP_NO_EXCEPTIONS in the raii-namespace (#2226) 2025-07-22 13:48:50 +02:00
Andreas Süßenbach da67e807a8
Remove redundant occurrences of VULKAN_HPP_NAMESPACE:: and VULKAN_HPP_RAII_NAMESPACE:: in vulkan_raii.hpp (#2213) 2025-07-14 16:26:20 +02:00
Andreas Süßenbach 2010d85fb4
Remove redundant occurrences of VULKAN_HPP_NAMESPACE:: in vulkan_shared.hpp (#2207) 2025-07-03 10:29:37 +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 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 54cc539ab5
Add functions vk::isColor() and vk::getAllFormats() (#2166) 2025-05-14 08:41:20 +02:00
btmxh 715aab1337
Fix undefined `assert` when using `std` module (#2165)
* Fix undefined `assert` when using `std` module

Fix #2164

* Move include `<cassert>` to before `<string.h>
2025-05-14 08:40:11 +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 3f281b80b4
Add documentation of new format trait functions (#2144) 2025-04-30 08:35:45 +02:00
Andreas Süßenbach 66da6f2b87
Introduce new format traits functions (#2143) 2025-04-23 10:54:17 +02:00
Andreas Süßenbach ee361cf520
Add BitsType to vk::Flags to get from vk::*Flags to vk::*FlagBits at compile-time (#2139) 2025-04-17 18:11:15 +02:00
Andreas Süßenbach fda93ae3fb
Include cassert unconditionally (#2134) 2025-04-10 13:56:09 +02:00
Andreas Süßenbach a428958b7f
Check language feature macro for existence before using it (#2133) 2025-04-10 10:49:25 +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 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
Jan Kuhlmann be9459f9c3
properly export VkGeometryInstanceFlagsKHR symbol (#2085) 2025-02-24 11:08:07 +01: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
Andreas Süßenbach 4dc27d82a4
Move lengthy template texts into snippet files. (#2072) 2025-02-13 10:56:11 +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
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
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