Commit Graph

217 Commits

Author SHA1 Message Date
Charles Giessen
99e92599c2 Add missing copy/move assignment operators to vkb::Result 2022-02-05 18:28:06 -07:00
Charles Giessen
eeffeff409 Make the list of device extensions to enable visible
Previously it was difficult to know which extensions were actually enabled.
If an app wanted to optionally enable certain extensions it was hard to know if
they got enabled.
2022-02-05 15:16:02 -07:00
Charles Giessen
bd6a2e4311 Fix crashing when calling GetPhysDevFeaturesKHR
vk-bootstrap would attempt to call vkGetPhysDevFeaturesKHR without enabling
the appropriate extension first.
2021-12-31 11:38:07 -07:00
Charles Giessen
6bf383778b Don't pass an instance in for pre-instance functions.
A recent loader change results in NULL being returned for pre-instance functions
if the instance handle passed into vkGetInstanceProcAddr isn't NULL. This was
reverted but going forward this change will require updating applications.
2021-12-08 15:49:44 -07:00
sean
8c8694f441 Add InstanceBuilder functions for setting the different versions directly 2021-10-16 17:25:28 -06:00
sean
fb8a48779d Only add physical device properties 2 extension if using Vulkan 1.0 2021-10-13 15:34:53 -06:00
Vibi Manx
5140be1d4d Only fields need to be memset. 2021-09-10 22:54:17 -06:00
Vibi Manx
ad394dce69 Replaced reinterpret cast with memcpy in GenericFeaturesPNextNode. 2021-09-10 22:54:17 -06:00
spnda
f5f9b54f38 Add user-defined conversion operators 2021-09-10 14:29:40 -06:00
Charles Giessen
8922a41bd4 Fix a few nits 2021-08-09 01:10:13 -06:00
Charles Giessen
0408041547 Add brief documentation on which window extensions are used 2021-07-18 15:01:51 -06:00
Cody Goodson
c05a277572 Added noexcept and NDEBUG guard. 2021-06-16 10:52:07 -06:00
Cody Goodson
c66158e87c Small cleanup.
- Replaced GenericFeaturesPNextNode's set function with a template constructor.
- Moved validation asserts for extension feature structs into source.
- Dispatch table now generates in UTF-8.
2021-06-16 10:52:07 -06:00
Charles Giessen
867376d01e Move debug callback into header and allow adding user pointer 2021-06-14 15:17:37 -07:00
Charles Giessen
244a44da51 Guard vkGetPhysicalDeviceFeatures2 behind instance version
Also make it so that instance extensions are queried in the instance only.
2021-06-10 10:06:14 -07:00
Charles Giessen
f422497cca Remove stray semicolon 2021-06-10 10:06:14 -07:00
Charles Giessen
05683f6b6b Call KHR version of get phys dev properties if necessary
Previously, vk-bootstrap didn't support calling vkGetPhyicalDeviceFeaturesKHR
on devices which support the extension. This makes vk-bootstrap more amenable
to 1.0 only hardware, like rasberry pi's.
2021-06-10 10:06:14 -07:00
Cody Goodson
f955777c8a Cleanup 2021-06-08 14:03:47 -07:00
Cody Goodson
f49032f804 Internal table change.
- Internal tables are now populated through internal vkGetDeviceProcAddr rather than through passed dispatch table
- Device now has its own internal table as well.
- Cleaned up get_proc_addr functions and removed internal functions that are now held in a types internal tables.
2021-06-08 14:03:47 -07:00
Cody Goodson
7bd3fcae56 Make const. 2021-06-08 14:03:47 -07:00
Cody Goodson
0f307e06e8 Removed commented out lines. 2021-06-08 14:03:47 -07:00
Cody Goodson
f5d3061043 Added optional dispatch table usage to swapchain. 2021-06-08 14:03:47 -07:00
Cody Goodson
87a63e942c Fixed a bug where user provided vkGetInstanceProcAddr pfn's were being ignored. Cleaned up un-needed locks. 2021-06-06 21:22:50 -07:00
Charles Giessen
b3fdd554b4 Add vkb::destroy_surface helper function 2021-06-06 13:25:08 -07:00
Cody Goodson
10d88ae840 Reverted back to dispatch table creation function in device type
- Added noexcept modifier to proxys
- Change name of header to VkBoostrapDispatch.h
2021-06-06 12:49:23 -07:00
Cody Goodson
2c0fe72ad9 Shorthand populated init 2021-06-06 12:49:23 -07:00
Cody Goodson
b963aeb94b Added populated function to gen and exception handling to vk.xml fetch. 2021-06-06 12:49:23 -07:00
Cody Goodson
a61e221d59 Trimmed branching in script and modified usage in core lib. 2021-06-06 12:49:23 -07:00
Cody Goodson
dd1df1396c Forgot to remove const ref 2021-06-06 12:49:23 -07:00
Cody Goodson
63d252e828 Rework complete. 2021-06-06 12:49:23 -07:00
Cody Goodson
cd0959f37e Make proxys const. 2021-06-06 12:49:23 -07:00
Cody Goodson
85b17b40e7 Removed unneeded private. 2021-06-06 12:49:23 -07:00
Cody Goodson
03258bfab2 Simplified parsing text modifiers in proxy generation and fixed extension function proxys not being generated. 2021-06-06 12:49:23 -07:00
Cody Goodson
f091c5a4a4 Forgot to flag as const 2021-06-06 12:49:23 -07:00
Cody Goodson
5c5b8dad34 Cleanup + license/info. 2021-06-06 12:49:23 -07:00
Cody Goodson
8dc3c2aeee Proxys added to autogen. Updated test. 2021-06-06 12:49:23 -07:00
Cody Goodson
2445eb0b28 Loading looks good, but requires passing Device still; 2021-06-06 12:49:23 -07:00
Cody Goodson
d8c6fe42b8 Handling extensions + incorporating DispatchTable into main src
- which means rewriting almost the entire script..
2021-06-06 12:49:23 -07:00
Cody Goodson
a0a0738299 Header generation is working
- No loading yet
2021-06-06 12:49:23 -07:00
Yves BOYAdjian
a014a5a030 Right test in SystemInfo constructor 2021-06-04 13:28:35 -06:00
Charles Giessen
ab60522c9b Format internal queue selection functions 2021-05-21 14:04:28 -06:00
Charles Giessen
70265d8b29 Assert in SwapchainBuilder on queue getting failure
This resolves the TODO about what to do if the queues couldn't be found.
2021-05-21 14:04:28 -06:00
Charles Giessen
84ba7a79ee Document constructors for SwapchainBuilder
Specifically done for the 3rd constructor which will query the necessary
queues when they are not provided
2021-05-21 14:04:28 -06:00
Charles Giessen
045b1e7b0f Add queue selection tests and refactor internal code a bit 2021-05-21 14:04:28 -06:00
Charles Giessen
75db58ae8b Refactor GenericFeaturesPNextNode 2021-04-18 14:42:35 -06:00
Charles Giessen
c607a65755 Remove memset, fix mismatched size comparison 2021-04-18 14:42:35 -06:00
Charles Giessen
7271cac30c Revert "Revert "Removed duplicate include.""
This reverts commit 0b2faf5659.
2021-04-18 14:42:35 -06:00
Charles Giessen
193c20491a Revert "Revert "Cleanup and warning for user provided VkPhysicalDeviceFeatures2.""
This reverts commit 38d150101b.
2021-04-18 14:42:35 -06:00
Charles Giessen
90875cfaf5 Revert "Revert "Cleanup and asserts for VkPhysicalDeviceFeatures2.""
This reverts commit db55cb8f27.
2021-04-18 14:42:35 -06:00
Charles Giessen
a0d1ce5b39 Revert "Revert "Simplified structures and plugged into existing logic.""
This reverts commit 2a352b5a25.
2021-04-18 14:42:35 -06:00
Charles Giessen
f4eb8fdffc Revert "Revert "Collapsed ExtensionFeatures and StructureContainer together into FeaturesContainer. After the purging of the function pointers all ExtensionFeatures was doing was just wrapping StructureContainers functions.""
This reverts commit 64aeed5855.
2021-04-18 14:42:35 -06:00
Charles Giessen
9c4317e324 Revert "Revert "Removes need for function pointers.""
This reverts commit e671170007.
2021-04-18 14:42:35 -06:00
Charles Giessen
63f06898f9 Revert "Revert "Assert for null sTypes.""
This reverts commit 7126555c3b.
2021-04-18 14:42:35 -06:00
Charles Giessen
3c38977084 Revert "Revert "Pass by value rather than ref.""
This reverts commit 441938d731.
2021-04-18 14:42:35 -06:00
Charles Giessen
5c85f3a796 Revert "Revert "Fixed Features11/12 break. Tests now pass.""
This reverts commit 299b36a3a4.
2021-04-18 14:42:35 -06:00
Charles Giessen
8a3c1ac6ed Revert "Revert "- Restored removed functions - Restored pNext chain to device (appends to the end of the ExtentionFeatures chain) - Style changes - Migrated ExtensionFeatures into detail""
This reverts commit 4bfc21f8be.
2021-04-18 14:42:35 -06:00
Charles Giessen
e8100dd16c Revert "Revert "Fix breaking bug with features not being populated from VkGetPhysicalDeviceFeatures2""
This reverts commit 77be102a13.
2021-04-18 14:42:35 -06:00
Charles Giessen
98a4ae7ea8 Revert "Revert "Added generic feature polling/matching/enabling.""
This reverts commit 523e76144d.
2021-04-18 14:42:35 -06:00
Charles Giessen
523e76144d Revert "Added generic feature polling/matching/enabling."
This reverts commit 0a397a33d5.
2021-04-18 14:09:56 -06:00
Charles Giessen
77be102a13 Revert "Fix breaking bug with features not being populated from VkGetPhysicalDeviceFeatures2"
This reverts commit 21e400cfcc.
2021-04-18 14:09:56 -06:00
Charles Giessen
4bfc21f8be Revert "- Restored removed functions - Restored pNext chain to device (appends to the end of the ExtentionFeatures chain) - Style changes - Migrated ExtensionFeatures into detail"
This reverts commit 0359ceb3fb.
2021-04-18 14:09:56 -06:00
Charles Giessen
299b36a3a4 Revert "Fixed Features11/12 break. Tests now pass."
This reverts commit 632a42f5cd.
2021-04-18 14:09:56 -06:00
Charles Giessen
441938d731 Revert "Pass by value rather than ref."
This reverts commit 3dc81e44df.
2021-04-18 14:09:56 -06:00
Charles Giessen
7126555c3b Revert "Assert for null sTypes."
This reverts commit 73e2b82dce.
2021-04-18 14:09:56 -06:00
Charles Giessen
e671170007 Revert "Removes need for function pointers."
This reverts commit 075be4900b.
2021-04-18 14:09:56 -06:00
Charles Giessen
64aeed5855 Revert "Collapsed ExtensionFeatures and StructureContainer together into FeaturesContainer. After the purging of the function pointers all ExtensionFeatures was doing was just wrapping StructureContainers functions."
This reverts commit 2f69fa52cb.
2021-04-18 14:09:56 -06:00
Charles Giessen
2a352b5a25 Revert "Simplified structures and plugged into existing logic."
This reverts commit 6ee81abdd3.
2021-04-18 14:09:56 -06:00
Charles Giessen
db55cb8f27 Revert "Cleanup and asserts for VkPhysicalDeviceFeatures2."
This reverts commit 5ac038b778.
2021-04-18 14:09:56 -06:00
Charles Giessen
38d150101b Revert "Cleanup and warning for user provided VkPhysicalDeviceFeatures2."
This reverts commit 91b3949339.
2021-04-18 14:09:56 -06:00
Charles Giessen
0b2faf5659 Revert "Removed duplicate include."
This reverts commit 6a9e0e2ee8.
2021-04-18 14:09:56 -06:00
Cody Goodson
6a9e0e2ee8 Removed duplicate include. 2021-04-18 14:04:27 -06:00
Cody Goodson
91b3949339 Cleanup and warning for user provided VkPhysicalDeviceFeatures2. 2021-04-18 14:04:27 -06:00
Cody Goodson
5ac038b778 Cleanup and asserts for VkPhysicalDeviceFeatures2. 2021-04-18 14:04:27 -06:00
Cody Goodson
6ee81abdd3 Simplified structures and plugged into existing logic. 2021-04-18 14:04:27 -06:00
Cody Goodson
2f69fa52cb Collapsed ExtensionFeatures and StructureContainer together into FeaturesContainer. After the purging of the function pointers all ExtensionFeatures was doing was just wrapping StructureContainers functions. 2021-04-18 14:04:27 -06:00
Cody Goodson
075be4900b Removes need for function pointers. 2021-04-18 14:04:27 -06:00
vibi-manx
73e2b82dce Assert for null sTypes. 2021-04-18 14:04:27 -06:00
vibi-manx
3dc81e44df Pass by value rather than ref. 2021-04-18 14:04:27 -06:00
vibi-manx
632a42f5cd Fixed Features11/12 break. Tests now pass. 2021-04-18 14:04:27 -06:00
vibi-manx
0359ceb3fb - Restored removed functions
- Restored pNext chain to device (appends to the end of the ExtentionFeatures chain)
- Style changes
- Migrated ExtensionFeatures into detail
2021-04-18 14:04:27 -06:00
dangerkangaroo
21e400cfcc Fix breaking bug with features not being populated from VkGetPhysicalDeviceFeatures2 2021-04-18 14:04:27 -06:00
dangerkangaroo
0a397a33d5 Added generic feature polling/matching/enabling. 2021-04-18 14:04:27 -06:00
dangerfen
ef02739a10 Added macro guard. 2021-04-07 19:26:59 -06:00
dangerfen
1b6e09a04a Fixes bug with 1.1/1.2 features not being appended to the pNext chain properly. 2021-04-07 19:26:59 -06:00
Mehmet Oguz Derin
903fdfe87b Compare against feature flags 2021-04-06 15:04:24 -06:00
Mehmet Oguz Derin
617123254a Compare against feature flags 2021-04-06 15:04:24 -06:00
Mehmet Oguz Derin
8d4ac0db50 Check usage flags when iterating desired formats 2021-04-06 15:04:24 -06:00
Charles Giessen
151c76d1cc Add selection by and enableing 1.1 and 1.2 features.
Users can now ask for physical devices which support a specific 1.1 and 1.2
feature. VkBootstrap will then add the selected features to the enable list
in device creation.
2021-03-29 13:23:27 -06:00
Charles Giessen
cf8df11a0a Change clang-format to not add spaces before parens 2021-02-18 13:26:43 -07:00
Charles Giessen
3ebe53bdfe Add full_error() function to Result for easier printing of errors
Comment the various error functions in Result
2021-02-18 13:26:43 -07:00
Charles Giessen
4120362762 Use uint32_t in Queues everywhere, add QUEUE_INDEX_MAX_VALUE as sentinel
This commit removes the many casts from int to uint and back, as -1 was used
as a sentinel value. Because thats confusing and leads to many casts
everywhere it was decided to add a sentinel value and compare everything
to that to determine if a queue index is valid or not.
2021-02-18 13:26:43 -07:00
Charles Giessen
daf244d180 Make SwapchainBuilder constructor take allocation callbacks from device 2021-02-18 13:26:43 -07:00
Charles Giessen
bfc0f06de0 Run clang format on src/VkBootstrap.h 2021-02-18 13:26:43 -07:00
Charles Giessen
bcc8e6f664 Add defaults in comments for SwapchainBuilder 2021-02-18 13:26:43 -07:00
Charles Giessen
c71a5b5fd8 Guard NOMINMAX
mingw64 defines it by default, this prevents multiple definition warnings/errors
2021-02-18 13:26:43 -07:00
Charles Giessen
c02642843c Fix crash due to vector initialization using wrong constructor
Because VkImageView is a uint64_t, not a strong type, the constructor
thinks the .size() is a value to initialize with, not a size.
2020-12-17 01:43:39 -07:00
Charles Giessen
af5409fcea Fix errors which caused win32 builds to fail
The debug_callback_messenger didn't use the VK_API macros and there
were a few places that compared VkHandles to nullptr which weren't liked.
2020-12-17 00:46:08 -07:00
Charles Giessen
325cdff399 Correct macOS surface extension.
The extension name is VK_EXT_metal_surface, not KHR
2020-11-20 16:33:22 -07:00
Charles Giessen
988c0ea4e4 Make swapchain builder find queues if none were provided 2020-10-26 13:17:52 -06:00
Charles Giessen
d314069e1a Fix linux surface extension bug, make destroy_debug_utils_messenger public
Making the destroy_messenger public allows code to store the handle directly and
delete it themselves instead of having to hold onto a vkb::Instance, which requires
including the header.
2020-10-21 15:32:10 -06:00