Commit Graph

74 Commits

Author SHA1 Message Date
Charles Giessen
0c29d98362 cmake: Don't require vulkan in order to build
find_package is used to try to find the Vulkan-Headers, and if they aren't
present, it downloads them with fetch content. This way users don't need
vulkan 'installed' on their system, specifically for windows users.

It also changes the tests to load all the necessary function pointers, that
 way we don't need to find the vulkan loader to build the tests.
2021-03-02 09:11:23 -07:00
Charles Giessen
947afe55c0 Add default gotten queues test for swapchain builder 2020-10-26 13:21:59 -06:00
Charles Giessen
6e50441f41 Re-added swapchain constructors from individual handles.
Allows people to use Swapchain Builder withtout holding onto the vkb::Device
handle. Also made patch levels optional since they generally don't matter.
2020-10-21 13:25:48 -06:00
Charles Giessen
812ce2cf0a Dynamically load vulkan instead of statically link.
Make vk-bootstrap capable of loading the vulkan runtime and not need to
link against the library. This improves the usability of vk-bootstrap since
now you don't need the vulkan library on your system to build.

This commit also changes how SystemInfo works so as to allow the dynamic
vulkan loading.
2020-08-10 23:38:26 -06:00
Charles Giessen
bbe3971a04 Document proper swapchain recreation practice
Make the example not leak the old swapchain handle upon recreation.
vkb::destroy_swapchain doesn't null out the old handle.
2020-06-08 17:03:36 -06:00
Charles Giessen
8a053cadc3 Polished SwapchainBuilder. Redid swapchain recreation.
To recreate a swapchain now requires making a new SwapchainBuilder or
keeping the old one around. Removed the recreate function since its
purpose was unclear. Introduced set_old_swapchain to allow recyling the
old swapchain. Updated documentation and getting started guide.
2020-06-08 14:28:32 -06:00
Charles Giessen
a806c367f3 Added window titles for tests 2020-05-19 11:10:50 -06:00
Lesley Lai
df53490ede Error handling with std::error_code 2020-05-17 09:19:12 -06:00
Charles Giessen
1f462b42f3 Added many tests and fixed up api as a consequence
Added device::get_queue_families() to facilitate custom queue setups

get_swapchain_images() renamed to get_image(), made member function to
swapchain.
get_swapchain_image_views() renamed to get_image_views(), also moved to
member function of swapchain

fixed bug with headless instance not being correct

Stopped Catch2 from polluting the buildable targets
2020-04-18 21:24:59 -06:00
Lesley Lai
4483a5ee90 Migrate to Catch2 & CMake file structural change 2020-03-26 10:40:47 -06:00
Charles Giessen
4c91df1c12 Added a desired_api_version to InstanceBuilder and cleaned up the triangle example error handling.
Fixed several bugs in the PhysicalDeviceSelector code, causing erroneous failures.
2020-03-09 15:17:18 -06:00
Charles Giessen
1160b19a5c Rename set_api_version to required_api_version and make the PhysicalDeviceSelector use the provided value as the required minimum for devices 2020-03-08 00:59:58 -07:00
Charles Giessen
a4ab8e099d Renamed many InstanceBuilder functions, added SystemInfo struct.
SystemInfo will be the way for users to know what is and isn't available on their system.
Currently, it only has booleans for if validation layers and debug messenger are available,
but more could be added in the future.
2020-03-07 01:46:25 -07:00
Charles Giessen
6f0184bdbe Made compute and transfer queues have distinct and dedicated options. This means you can choose between
whether you select a compute/transfer queue that can alias and one that cannot.
It is due to some hardware having dedicated compute or dedicated transfer but not both.

Also added some todo's for what to test.
2020-02-18 19:45:22 -07:00
Charles Giessen
37656d311a Added documentation to InstanBuilder and PhysicalDevice Selector
Updated readme's example code and included better build instructions
2020-02-18 19:17:08 -07:00
Charles Giessen
7de79b81b1 Implemented missing instance functions, deleted surface in tests. 2020-02-18 17:21:22 -07:00
Charles Giessen
b171ced11e Fixed pNext chain setup function and added validation flags/enables to run_tests 2020-02-17 14:09:40 -07:00
Charles Giessen
cf8411ae78 Replaced std::string with const char *
Now checks extensions being valid on the instance.
2020-02-11 17:51:03 -07:00
Charles Giessen
3e7e283e3f Revised error handling to be sensible and consistent.
While more error values need to be fleshed out (one for every possible vulkan error)
it has all of the major issues handled.
2020-02-10 11:29:09 -07:00
Charles Giessen
8734ed18e0 moved triangle.cpp to its own folder, updated readme & license 2020-02-03 20:34:46 -07:00
Charles Giessen
39a3c37465 Fixed up swapchain, added an example based on vulkan-tutorial
Now there is a concise example of the library in use all the way to presenting.

Needs to be rewritten to remove exceptions, but for first pass its good enough.
2020-02-03 16:23:47 -07:00
Charles Giessen
37bc741658 Moved all source code into 2 files
This will make it easier to include in other projects.

Revamped how pNext chains work to no longer cause crashes.
2020-01-31 15:23:22 -07:00
Charles Giessen
155677ec0f Added glfw as git submodule + Catch2
Made the physical device, device, and swapchain builders take the required
parameters as constructor arugments.

Made tests optional using a cmake bool
2020-01-30 01:47:41 -07:00
Charles Giessen
d9ca075c86 First commit of Vk-Bootstrap
Library contains barebones implementations for simplified
	Instance creation
	Physical Device selection
	Device creation
	Swapchain Creation/Recreation

Much of the repo is WIP, and there is little to no testing.
Also, while a single header file is desired for the future, currently
it is structured more like a normal project with .cpp files
2020-01-30 01:20:18 -07:00