Compare commits

..

60 Commits

Author SHA1 Message Date
kbz_8 4a9ec8107d fixing readme 2026-03-23 20:33:25 +01:00
kbz_8 d88f5c8188 adding surface creation 2026-03-23 20:32:37 +01:00
kbz_8 311135e8a9 adding image copy utils
Windows / build (ubuntu-latest) (push) Failing after 1m26s
Windows / build (macos-x86_64) (push) Has been cancelled
Windows / build (windows-x86_64) (push) Has been cancelled
2026-02-03 09:43:25 +01:00
kbz_8 1146a99c53 fixing CI
Windows / build (windows-x86_64) (push) Failing after 2s
Windows / build (ubuntu-latest) (push) Failing after 2m38s
Windows / build (macos-x86_64) (push) Failing after 2m53s
2026-01-18 16:11:29 +01:00
kbz_8 7998ef448e fixing CI
Windows / build (windows-x86_64) (push) Failing after 3s
Windows / build (macos-x86_64) (push) Failing after 2m47s
Windows / build (ubuntu-latest) (push) Failing after 4m10s
2026-01-18 16:04:37 +01:00
kbz_8 d0521c19d9 fixing CI
Windows / build (windows-x86_64) (push) Failing after 3s
Windows / build (ubuntu-latest) (push) Failing after 1m57s
Windows / build (macos-x86_64) (push) Has been cancelled
2026-01-18 16:01:41 +01:00
kbz_8 4e3c2f9983 fixing CI
Windows / build (windows-x86_64) (push) Failing after 2s
Windows / build (ubuntu-latest) (push) Failing after 14s
Windows / build (macos-x86_64) (push) Has been cancelled
2026-01-18 16:00:35 +01:00
kbz_8 394d2dc358 adding windows CI
Windows / build (windows-x86_64) (push) Failing after 19s
Windows / build (ubuntu-latest) (push) Failing after 1m31s
Windows / build (macos-x86_64) (push) Failing after 3m10s
2026-01-18 15:55:18 +01:00
kbz_8 e64ba6870b fixing compilation
Linux / build (x86_64, ubuntu-latest) (push) Successful in 50s
MacOS / build (macos-x86_64) (push) Successful in 27s
2026-01-11 12:43:13 +01:00
kbz_8 3a9592bbd3 fixing CI
MacOS / build (macos-x86_64) (push) Failing after 38s
Linux / build (x86_64, ubuntu-latest) (push) Failing after 52s
2026-01-11 12:34:34 +01:00
kbz_8 422560a028 fixing ci name
Linux / build (x86_64, ubuntu-latest) (push) Has been cancelled
MacOS / build (x86_64, macOS-latest) (push) Has been cancelled
2026-01-11 12:33:38 +01:00
kbz_8 87620b6e0c fixing warning, adding CIs
Linux / build (x86_64, macOS-latest) (push) Has been cancelled
Linux / build (x86_64, ubuntu-latest) (push) Has been cancelled
2026-01-11 12:32:58 +01:00
kbz_8 98b845f876 adding kvfFindMemoryType function 2025-11-23 00:52:26 +01:00
kbz_8 f633db3070 fixing bug in kvfDestroyBuffer 2025-11-20 17:04:38 +01:00
kbz_8 e69f907a96 fixing verbalize message 2025-11-18 14:18:14 +01:00
kbz_8 afc4f50a20 fix 2025-11-12 19:21:41 +01:00
kbz_8 39f52a959b fix 2025-11-12 19:18:34 +01:00
kbz_8 22ae3e0351 Merge branch 'master' of github.com:Kbz-8/KVF 2025-11-12 19:17:01 +01:00
kbz_8 ef6941c47f adding create instance pnextr 2025-11-12 19:16:54 +01:00
kbz_8 99647be837 fixing swiftshaders physical device selection 2025-10-23 08:25:42 +02:00
kbz_8 f229c15bad yes 2025-06-27 11:52:29 +02:00
kbz_8 e73b4f3a14 Merge branch 'master' of github.com:Kbz-8/KVF 2025-01-21 22:33:55 +01:00
kbz_8 9d70f19cac adding optional SRGB support to swapchain creation 2025-01-21 22:33:45 +01:00
kbz_8 61e2da6bc8 update 2025-01-11 23:40:13 +01:00
kbz_8 228d12085a update 2025-01-11 23:37:35 +01:00
kbz_8 5c0c63a03b adding allocation callback in vulkan 2024-12-13 20:31:58 +01:00
kbz_8 7b26a00ae3 Merge branch 'master' of github.com:Kbz-8/KVF 2024-12-04 14:08:14 +01:00
kbz_8 027d066cbf fixing bugs 2024-12-04 14:07:55 +01:00
kbz_8 c583cbb829 Update README.md 2024-10-30 19:36:09 +01:00
kbz_8 a54821aea0 adding support for creating swapchain from older one 2024-10-05 19:34:51 +02:00
kbz_8 f7b4850b56 adding support for custom vulkan function pointers 2024-09-23 11:25:46 +02:00
kbz_8 c08c3d6bd1 adding support for custom vulkan function pointers 2024-09-20 16:15:10 +02:00
kbz_8 8654cf72d8 fixing queues management in devices creations 2024-09-13 09:24:00 +02:00
kbz_8 64565bbff4 fixing define option to disable all KHR functions 2024-09-12 23:38:46 +02:00
kbz_8 6333bc667c adding define option to disable all KHR functions 2024-09-12 23:33:34 +02:00
kbz_8 1a734cd185 fixing bug in kvfCreateInstance with Validation Layers on 2024-09-11 07:07:02 +02:00
kbz_8 156345ca11 fixing C++ issue with structs initialization 2024-09-09 18:49:14 +02:00
kbz_8 c55619d14d fixing C++ issue with structs initialization 2024-09-09 18:44:25 +02:00
kbz_8 6feb886b73 adding debug validation layers to instance creation 2024-09-09 18:23:13 +02:00
kbz_8 19be22ebda fixing issue with physical device pickup 2024-09-09 02:05:05 +02:00
kbz_8 d273a23618 fixing issue with logical device creation 2024-09-08 22:13:35 +02:00
kbz_8 214e2e1862 fixing issue with logical device creation 2024-09-08 22:12:32 +02:00
kbz_8 6c0ed3f244 adding security asserts in queues getter 2024-09-08 21:40:16 +02:00
kbz_8 1205002094 adding functions to find queue families from custom physical device 2024-09-08 21:07:07 +02:00
kbz_8 5a257b7ae3 adding functions to create device with custom physical device 2024-09-08 20:54:52 +02:00
kbz_8 396ff9cedd fixing compilation 2024-09-08 00:13:57 +02:00
kbz_8 df70fc67b2 improving logical device creation 2024-09-07 23:46:29 +02:00
kbz_8 7f106fdd7f fixing readme 2024-08-26 15:34:20 +02:00
kbz_8 fb371ac5bf adding screenshot to readme 2024-08-26 15:33:09 +02:00
kbz_8 4c3d180799 updating README 2024-08-26 15:27:14 +02:00
kbz_8 22012d6d24 removing garbage file 2024-08-26 15:23:17 +02:00
kbz_8 f109407049 fixing bugs, adding a lot of features 2024-08-26 15:22:57 +02:00
kbz_8 0992e92d38 yes 2024-07-13 05:04:42 +02:00
kbz_8 23a123437b adding swapchain support 2023-03-02 16:21:50 +01:00
kbz_8 e299d56058 starting swapchain implementation 2023-03-02 14:36:23 +01:00
kbz_8 63989790d2 adding fence, semaphore, device and validation layers support 2023-03-02 02:40:17 +01:00
kbz_8 3ab869923f yes 2023-03-01 20:41:21 +01:00
kbz_8 4cd1e43950 adding devices and family queues support 2023-03-01 19:17:19 +01:00
kbz_8 5920c7b965 adding instance and device helpers 2023-03-01 17:51:18 +01:00
kbz_8 1d40d2cd2a first commit 2023-03-01 15:52:45 +01:00
6 changed files with 1484 additions and 480 deletions
+2
View File
@@ -2,3 +2,5 @@
*.swp *.swp
*.swx *.swx
sandbox/test sandbox/test
sandbox/build/
sandbox/.xmake/
+9 -4
View File
@@ -45,7 +45,7 @@ int main(void)
// Swapchain creation // Swapchain creation
VkExtent2D extent; VkExtent2D extent;
SDL_Vulkan_GetDrawableSize(win, (int*)&extent.width, (int*)&extent.height); SDL_Vulkan_GetDrawableSize(win, (int*)&extent.width, (int*)&extent.height);
VkSwapchainKHR swapchain = kvfCreateSwapchainKHR(device, ph_device, surface, extent, true); VkSwapchainKHR swapchain = kvfCreateSwapchainKHR(device, ph_device, surface, extent, VK_NULL_HANDLE, true, true);
// Swapchain images acquisition // Swapchain images acquisition
uint32_t swapchain_images_count = kvfGetSwapchainImagesCount(swapchain); uint32_t swapchain_images_count = kvfGetSwapchainImagesCount(swapchain);
@@ -55,8 +55,8 @@ int main(void)
for(uint32_t i = 0; i < swapchain_images_count; i++) for(uint32_t i = 0; i < swapchain_images_count; i++)
{ {
VkCommandBuffer cmd = kvfCreateCommandBuffer(device); VkCommandBuffer cmd = kvfCreateCommandBuffer(device);
kvfTransitionImageLayout(device, swapchain_images[i], cmd, kvfGetSwapchainImagesFormat(swapchain), VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_PRESENT_SRC_KHR, true); kvfTransitionImageLayout(device, swapchain_images[i], KVF_IMAGE_COLOR, cmd, kvfGetSwapchainImagesFormat(swapchain), VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_PRESENT_SRC_KHR, true);
swapchain_images_views[i] = kvfCreateImageView(device, swapchain_images[i], kvfGetSwapchainImagesFormat(swapchain), VK_IMAGE_VIEW_TYPE_2D, VK_IMAGE_ASPECT_COLOR_BIT); swapchain_images_views[i] = kvfCreateImageView(device, swapchain_images[i], kvfGetSwapchainImagesFormat(swapchain), VK_IMAGE_VIEW_TYPE_2D, VK_IMAGE_ASPECT_COLOR_BIT, 1);
} }
// Sync objects creation // Sync objects creation
@@ -85,10 +85,11 @@ int main(void)
kvfGPipelineBuilderSetCullMode(builder, VK_CULL_MODE_NONE, VK_FRONT_FACE_CLOCKWISE); kvfGPipelineBuilderSetCullMode(builder, VK_CULL_MODE_NONE, VK_FRONT_FACE_CLOCKWISE);
kvfGPipelineBuilderAddShaderStage(builder, VK_SHADER_STAGE_VERTEX_BIT, vertex_shader_module, "main"); kvfGPipelineBuilderAddShaderStage(builder, VK_SHADER_STAGE_VERTEX_BIT, vertex_shader_module, "main");
kvfGPipelineBuilderAddShaderStage(builder, VK_SHADER_STAGE_FRAGMENT_BIT, fragment_shader_module, "main"); kvfGPipelineBuilderAddShaderStage(builder, VK_SHADER_STAGE_FRAGMENT_BIT, fragment_shader_module, "main");
kvfGPipelineBuilderSetMultisampling(builder , VK_SAMPLE_COUNT_1_BIT);
kvfGPipelineBuilderDisableDepthTest(builder); kvfGPipelineBuilderDisableDepthTest(builder);
kvfGPipelineBuilderDisableBlending(builder); kvfGPipelineBuilderDisableBlending(builder);
VkPipeline pipeline = kvfCreateGraphicsPipeline(device, pipeline_layout, builder, renderpass); VkPipeline pipeline = kvfCreateGraphicsPipeline(device, VK_NULL_HANDLE, pipeline_layout, builder, renderpass);
kvfDestroyGPipelineBuilder(builder); kvfDestroyGPipelineBuilder(builder);
kvfDestroyShaderModule(device, vertex_shader_module); kvfDestroyShaderModule(device, vertex_shader_module);
@@ -152,3 +153,7 @@ int main(void)
} }
``` ```
<p align="center">
<img src="https://github.com/Kbz-8/KVF/blob/46aa29be4facef398aeab0b7e82bff84aab683ce/sandbox/screenshot.png" alt="drawing" width="500"/>
</p>
+1285 -289
View File
File diff suppressed because it is too large Load Diff
+5 -4
View File
@@ -80,7 +80,7 @@ int main(void)
// Swapchain creation // Swapchain creation
VkExtent2D extent; VkExtent2D extent;
SDL_Vulkan_GetDrawableSize(win, (int*)&extent.width, (int*)&extent.height); SDL_Vulkan_GetDrawableSize(win, (int*)&extent.width, (int*)&extent.height);
VkSwapchainKHR swapchain = kvfCreateSwapchainKHR(device, ph_device, surface, extent, true); VkSwapchainKHR swapchain = kvfCreateSwapchainKHR(device, ph_device, surface, extent, VK_NULL_HANDLE, true, true);
// Swapchain images acquisition // Swapchain images acquisition
uint32_t swapchain_images_count = kvfGetSwapchainImagesCount(swapchain); uint32_t swapchain_images_count = kvfGetSwapchainImagesCount(swapchain);
@@ -90,8 +90,8 @@ int main(void)
for(uint32_t i = 0; i < swapchain_images_count; i++) for(uint32_t i = 0; i < swapchain_images_count; i++)
{ {
VkCommandBuffer cmd = kvfCreateCommandBuffer(device); VkCommandBuffer cmd = kvfCreateCommandBuffer(device);
kvfTransitionImageLayout(device, swapchain_images[i], cmd, kvfGetSwapchainImagesFormat(swapchain), VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_PRESENT_SRC_KHR, true); kvfTransitionImageLayout(device, swapchain_images[i], KVF_IMAGE_COLOR, cmd, kvfGetSwapchainImagesFormat(swapchain), VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_PRESENT_SRC_KHR, true);
swapchain_images_views[i] = kvfCreateImageView(device, swapchain_images[i], kvfGetSwapchainImagesFormat(swapchain), VK_IMAGE_VIEW_TYPE_2D, VK_IMAGE_ASPECT_COLOR_BIT); swapchain_images_views[i] = kvfCreateImageView(device, swapchain_images[i], kvfGetSwapchainImagesFormat(swapchain), VK_IMAGE_VIEW_TYPE_2D, VK_IMAGE_ASPECT_COLOR_BIT, 1);
} }
// Sync objects creation // Sync objects creation
@@ -118,12 +118,13 @@ int main(void)
kvfGPipelineBuilderSetInputTopology(builder, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST); kvfGPipelineBuilderSetInputTopology(builder, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST);
kvfGPipelineBuilderSetPolygonMode(builder, VK_POLYGON_MODE_FILL, 1.0f); kvfGPipelineBuilderSetPolygonMode(builder, VK_POLYGON_MODE_FILL, 1.0f);
kvfGPipelineBuilderSetCullMode(builder, VK_CULL_MODE_NONE, VK_FRONT_FACE_CLOCKWISE); kvfGPipelineBuilderSetCullMode(builder, VK_CULL_MODE_NONE, VK_FRONT_FACE_CLOCKWISE);
kvfGPipelineBuilderSetMultisampling(builder, VK_SAMPLE_COUNT_1_BIT);
kvfGPipelineBuilderAddShaderStage(builder, VK_SHADER_STAGE_VERTEX_BIT, vertex_shader_module, "main"); kvfGPipelineBuilderAddShaderStage(builder, VK_SHADER_STAGE_VERTEX_BIT, vertex_shader_module, "main");
kvfGPipelineBuilderAddShaderStage(builder, VK_SHADER_STAGE_FRAGMENT_BIT, fragment_shader_module, "main"); kvfGPipelineBuilderAddShaderStage(builder, VK_SHADER_STAGE_FRAGMENT_BIT, fragment_shader_module, "main");
kvfGPipelineBuilderDisableDepthTest(builder); kvfGPipelineBuilderDisableDepthTest(builder);
kvfGPipelineBuilderDisableBlending(builder); kvfGPipelineBuilderDisableBlending(builder);
VkPipeline pipeline = kvfCreateGraphicsPipeline(device, pipeline_layout, builder, renderpass); VkPipeline pipeline = kvfCreateGraphicsPipeline(device, VK_NULL_HANDLE, pipeline_layout, builder, renderpass);
kvfDestroyGPipelineBuilder(builder); kvfDestroyGPipelineBuilder(builder);
kvfDestroyShaderModule(device, vertex_shader_module); kvfDestroyShaderModule(device, vertex_shader_module);
Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB