Commit Graph

370 Commits

Author SHA1 Message Date
Charles Giessen
09a220f026 Add deprecation notice to "desired" requests
The ability to request that some physical device or swapchain has certain features
but not require said features leads to confusion due to users having to manually
check if any desired request succeeded or not. Thus, this feature is being
deprecated, with eventual removal in the future.
2023-10-13 11:28:21 -06:00
charles-lunarg
6be9ef9f46 Update to latest Vulkan-Headers 2023-10-09 18:46:37 -06:00
Charles Giessen
be0df09b3a Update CMake minimum to 3.15
The Vulkan-Headers has a minimum of 3.15, and there is no great reason
to stay on such an old CMake version.
2023-10-09 13:24:09 -06:00
Charles Giessen
1ab85e9e55 Run tests in CI scripts
Make use of CTest to manage running tests, and configure the project to
allow Catch2 to work with CTest
2023-10-09 13:24:09 -06:00
Nicholaus Clark
834960e58f Fix API of CustomQueueDescription 2023-10-09 11:52:18 -06:00
Charles Giessen
d759d3d575 Add VulkanMock for isolating tests from system
Allows the tests to set the exact values vk-bootstrap will receieve
rather than require a real vulkan driver to be present on the system.

This is done by creating a `vulkan-1.dll` on windows that implements
all of the API functions, and on linux/macOS intercepts `dlsym` to
make it return the mock's functions.
2023-10-03 14:26:25 -06:00
Charles Giessen
5e351fcdf8
Update run_autogen.yml to use main branch
Forgot to update this when changing the repo default from master to main.
2023-10-02 19:19:59 -06:00
Charles Giessen
f6006041c6 Mark vk-bootstrap as static & cleanup CMake
Marks the main vk-bootstrap library as a static library.

Removes unnecessary code, adds a language & description to the project
field.
2023-09-24 18:55:32 -06:00
Charles Giessen
83ef1035bf Add the Instance dispatch table
While not designed to be called by the user, it is common for other libraries to need
function pointers, including instance level functions.
2023-09-24 18:45:20 -06:00
Charles Giessen
fd71b1dd82 Use spaces instead of tabs
Modify the .clang-format to format with spaces for indention instead of tabs
2023-09-19 16:13:11 -06:00
Charles Giessen
04ec13b48d Update to latest headers & fix errors & cleanup generation script
VulkanSC was added to vk.xml and broke the generation script. This was an
easy fix, just needed to specify which API the version information should
use. Still, took the time to cleanup the code by running pylint and fixing
anything it warned about.
2023-09-19 15:52:27 -06:00
David Dubois
61f77612c7 Remove cringe whitespace 2023-02-28 16:57:17 -07:00
David Dubois
a4d4e0690e Remove new method, change debug utils enabling logic 2023-02-28 16:57:17 -07:00
David Dubois
82b7a0ed01 Provide a way to disable the debug callback 2023-02-28 16:57:17 -07:00
David Dubois
683d014241 Provide a way to disable the debug callback 2023-02-28 16:57:17 -07:00
charles-lunarg
2d7315eadf Update to latest Vulkan-Headers 2023-02-15 10:30:57 -07:00
Dani Camba
125652c9c6 fixed copypasted description of the option 2023-02-15 10:29:42 -07:00
Dani Camba
a5036f2368 add cmake options to hide warnings if is not main project 2023-02-15 10:29:42 -07:00
Charles Giessen
8e61b2d81c Make Vulkan 1.1 Headers required
Previously, the code tried to make it possible to use vk-bootstrap with
Vulkan 1.0 headers. This makes the code complicated and left several paths
completly untested. Making Vulkan 1.1 headers allows for simpler code.

Note: This does NOT make a Vulkan 1.1 capable driver required to use
vk-bootstrap. This only requires that the headers used to build
vk-bootstrap are 1.1 or above.
2023-01-12 16:07:43 -07:00
Charles Giessen
932b7794ac Refactor how GetPhysDevFeats2 works
Cleaned up the logic for handling when to use the core, the KHR, and when
not to use vkGetPhysicalDeviceFeatures2. This should make the logic easier
to follow with better names, and handle a few cases that were wrong, like
not caring if the extension is enabled by vulkan 1.1 is not.
2023-01-12 16:07:43 -07:00
Charles Giessen
0c459dca6f Add new error condition for DeviceBuilder
If an application uses add_required_extension_features but also adds
a VkPhysicalDeviceFeatures2 to the pNext chain of VkDeviceCreateInfo,
this will now result in an error. The reason is that Vk-Bootstrap is
perfectly capable of adding VkPhysicalDeviceFeatures to the pNext
chain itself but only if the user didn't already add their own.
2023-01-12 16:07:43 -07:00
Charles Giessen
9b3e648141 Tests: add missing swapchain destruction
In the swapchain recreation tests, the tests forgot to clean up the old
swapchains.
2023-01-12 16:07:43 -07:00
Charles Giessen
b36ede0f36 Handle multiple required extensions in generator
The XML added requirements which had multiple extensions be required.
This broke the existing autogen because it assumed there would only
be one extension required at a time. The fix is easy, split the
requirement string into a list then add it to the list of requirements.
2023-01-12 16:02:46 -07:00
charles-lunarg
833d07f5f9 Update to latest Vulkan-Headers 2023-01-12 15:57:05 -07:00
rogmatic
4462c56349 Fix graphics/present queue assignment
Fixed SwapchainBuilder second constructor, which had 'info.graphics_queue_index = present.value()' and 'info.present_queue_index = graphics.value()'.
2023-01-09 11:39:37 -07:00
Charles Giessen
b4b177170e Revert "Update to latest Vulkan-Headers"
This reverts commit 679bc1970f.
2022-12-28 16:27:03 -07:00
charles-lunarg
679bc1970f Update to latest Vulkan-Headers 2022-12-28 16:22:08 -07:00
charles-lunarg
75ec283c37 Update to latest Vulkan-Headers 2022-11-08 11:02:57 -07:00
charles-lunarg
f46d329586 Update to latest Vulkan-Headers 2022-11-03 10:48:52 -06:00
Odilon Vatonne
6d0c3763cc Remove unused phys_dev parameter 2022-10-28 15:33:33 -06:00
Odilon Vatonne
262ba0a857 Move situational code to lambda at call site and remove unused parameter warning 2022-10-28 15:33:33 -06:00
Odilon Vatonne
d90ca8755f Remove format feature flag handling from SwapchainBuilder and more code comments
- format feature flags should not be used, as set_image_usage_flags is a better alternative
- split format search in two phases (desired / best)
- explain usage of is_unextended_present_mode for basic validation
2022-10-28 15:33:33 -06:00
Odilon Vatonne
73295fed0b Revert behavior change with desired formats not being available 2022-10-28 15:33:33 -06:00
Odilon Vatonne
b9a98c61b3 Check image usage in SwapchainBuilder and stricter format feature verifications 2022-10-28 15:33:33 -06:00
charles-lunarg
300b2abb49 Update to latest Vulkan-Headers 2022-10-28 15:19:24 -06:00
brgalo
9545ed222e :: instead of . required
my first issue, just ran into this while trying it out myself

Is this the correct way to do this?
2022-10-28 15:19:09 -06:00
Matthew Early
c16de53814 fix if 2022-10-13 11:19:39 -06:00
Charles Giessen
706ffb6355 Change deafult composite alpha for Android
Android typically only supports the INHERIT bit. Easiest way to accomodate this
is to #ifdef ANDROID to use the INHERIT bit.
2022-10-10 09:55:35 -06:00
Charles Giessen
01de71738c Pass Image Usage flags into Swapchain
This allows the image views to be created with the same usage flags as
the swapchain. This necessitated passing in version information down
the object creation chain because to add the usage flags requires 1.1
to be enabled.
2022-10-08 13:12:02 -06:00
Charles Giessen
14e5a557f7 Format error to_string functions
Use CASE_TO_STRING macro to make the to_string functions simpler.
2022-10-08 13:12:02 -06:00
Charles Giessen
ab52ad97a8 Move Result & Error out of the detail namespace
Since its a part of the public interface, it means applications using vk-bootstrap
will inevitably need to use the types in error handling paths.
2022-10-08 13:12:02 -06:00
charles-lunarg
789a24edb7 Update to latest Vulkan-Headers 2022-10-04 21:19:32 -06:00
charles-lunarg
5b15f6e881 Update to latest Vulkan-Headers 2022-09-15 11:48:34 -06:00
Charles Giessen
4ae9513ff9 Dont enable tests if building standalone
Previously, tests would always be enabled if the repo was the top
level project, which isn't desireable for users. This alters the logic
to, by default, only enabling tests when its a top level project, but
still allowing users to *not* enable tests by setting VK_BOOTSTRAP_TEST
to off.
2022-08-30 10:42:35 -06:00
charles-lunarg
be26f7d464 Update to latest Vulkan-Headers 2022-08-30 10:19:25 -06:00
David Dubois
1fea63645a Properly handle forward-declared structs 2022-08-28 12:13:08 -06:00
Matthew Pohlmann
00cf404e7b Fix typo 2022-07-28 13:48:15 -06:00
Matthew Pohlmann
8d9aea9987 Swapchain stores the VkColorSpaceKHR actually used when creating swapchains so users can query the final value 2022-07-28 13:48:15 -06:00
charles-lunarg
f8573e117c Update to latest Vulkan-Headers 2022-07-28 13:47:43 -06:00
charles-lunarg
3b29e6423f Update to latest Vulkan-Headers 2022-07-21 14:00:38 -06:00