Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
31e5bc8
Queue selection unit test vkutils function
Dec 24, 2023
83aeadb
queue selection got working
Dec 24, 2023
87f622f
buffer barrier
Dec 24, 2023
4844ba4
Release and acquire resource on queue test passing
Dec 26, 2023
b37cc0f
fix compilation
Dec 26, 2023
500cf04
Merge branch 'Queue-selection-feature' of https://github.com/WildFoxS…
Dec 26, 2023
796bc2d
Bug fix deleting pip layout would not condider caching also for set l…
Jan 8, 2024
9d1307a
Missing error case
Jan 8, 2024
4d75113
moved tinygltf to fetch content instead of submodule
Jan 13, 2024
35e6f7f
improved minimized window surface functions
Jan 17, 2024
cad079c
reduced cmake version
Feb 5, 2024
b6e0ded
Avoid sdk and use headers from submodule
Feb 6, 2024
18e2ea5
temporary avoid nearest filter for default sampler for crisper UI unt…
Feb 8, 2024
01f3809
removed useless code
Feb 13, 2024
61ad6ff
added missing function to copy buffers
Feb 20, 2024
d6aec34
fix dangling fbo and added buffer offset/range to descriptor update
Feb 21, 2024
f8cc22e
added missing check
Mar 7, 2024
0c0b0f4
release zeromemory vector of structs
Mar 9, 2024
61c165e
added glslang compile shader function and renamed fury check with fur…
Mar 28, 2024
cb35572
fixed bug getIntermediate always on vertex shader
Mar 29, 2024
33c5ad1
fixed additive blend mode
Apr 2, 2024
c4b182c
added error mgr when compiling shader
Apr 2, 2024
4eb6720
restore blend mode
Apr 2, 2024
27f3d53
additive blend mode does not write to alpha
Apr 3, 2024
ddc305a
increased useless rebindings and increased overall performance
Apr 11, 2024
6ff6c38
Disable validation layers in debug mode
Apr 12, 2024
a5c7273
modified UpdateDescriptorSet do not take set Index as param but is no…
Apr 12, 2024
84d9a12
added assert
May 9, 2024
0c05143
optimization
May 14, 2024
b002040
Fix linux build
stanislavzuru Jun 3, 2024
344f721
fixed some warning on windows
stanislavzuru Jun 4, 2024
b227951
Naming fix on linux
Jun 8, 2024
fc21659
changed include order for linux compilation
stanislavzuru Jun 8, 2024
845336f
Linux fixes
Jun 8, 2024
7c16e3c
Added dynamic functions removed EDepthTest for ECompareOp
stanislavzuru Jun 18, 2024
3a4591a
Set line width, render pass creation now take into account stencil
stanislavzuru Jun 21, 2024
b00e9f5
Merge branch 'Queue-selection-feature' of https://github.com/WildFoxS…
stanislavzuru Jun 21, 2024
33cbfb3
Incresed resources limit and added info when running out of resources
stanislavzuru Jun 25, 2024
3043e19
Bug fix - not destroying descriptor pools and also destroying the sam…
stanislavzuru Jul 3, 2024
bd5932b
destroy sampler function
stanislavzuru Jul 3, 2024
ed2062e
Destroying debug checks
stanislavzuru Jul 3, 2024
ba8e452
Bug fix not destroying vk pipeline layout
stanislavzuru Jul 3, 2024
1a0af9e
bump vma
stanislavzuru Jul 12, 2024
fca7237
bump volk
stanislavzuru Jul 12, 2024
44b9fb3
added logs and commented unneded checks
stanislavzuru Jul 12, 2024
8190bbf
Added compute commands
stanislavzuru Jul 16, 2024
9cd7772
improvements
stanislavzuru Jul 22, 2024
6cc2d47
Fixed destroying depth rt cause dangling framebuffer
stanislavzuru Jul 22, 2024
3a69cf2
comment
stanislavzuru Jul 24, 2024
7e07baa
bugfix recreating fbo every frame
stanislavzuru Jul 24, 2024
9a7a3f8
fixed wrong log
stanislavzuru Jul 24, 2024
54ebcde
Added command to image to image copy
stanislavzuru Jul 29, 2024
8b32736
added mip map count to copyImage function
stanislavzuru Jul 30, 2024
befc328
Compute shaders, sampler params, storage images, anisotropy getter
stanislavzuru Aug 12, 2024
496fed6
Implemented push constants
stanislavzuru Aug 14, 2024
116a15a
Tracking bound pipeline in command buffer
stanislavzuru Sep 22, 2024
b20a43c
Added ssbo support to descriptor sets
Nov 26, 2024
93bdc63
Fixed warning on correct behaviour
Nov 27, 2024
b38acc4
Removed warning for dynamic state enabled for pipeline
stanislavzuru Dec 9, 2024
251a7b5
Fix missing compute shader module destruction
Jan 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@
[submodule "thirdparty/gli"]
path = thirdparty/gli
url = https://github.com/g-truc/gli.git
[submodule "thirdparty/tinygltf"]
path = thirdparty/tinygltf
url = https://github.com/syoyo/tinygltf.git
[submodule "thirdparty/stb"]
path = thirdparty/stb
url = https://github.com/nothings/stb.git
[submodule "thirdparty/Vulkan-Headers"]
path = thirdparty/Vulkan-Headers
url = https://github.com/KhronosGroup/Vulkan-Headers.git
[submodule "thirdparty/glslang"]
path = thirdparty/glslang
url = https://github.com/KhronosGroup/glslang.git
49 changes: 38 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.26.4)
cmake_minimum_required(VERSION 3.12)
project(FoxFury CXX)

set(CMAKE_CXX_STANDARD 20)
Expand All @@ -20,16 +20,48 @@ add_library(${PROJECT_NAME} STATIC
"include/main.cpp"
)

option(BUILD_TESTS "Build tests" OFF)
option(BUILD_EXAMPLES "Build examples" OFF)


## Vulkan headers
add_subdirectory("thirdparty/Vulkan-Headers")
## Volk
include_directories("thirdparty/Vulkan-Headers/include")
add_subdirectory("thirdparty/volk")
## VMA
add_subdirectory("thirdparty/VulkanMemoryAllocator")
## Glsl lang
set(ENABLE_OPT 0)#disable optimizations for HLSL
set(BUILD_SHARED_LIBS 0)
add_subdirectory("thirdparty/glslang")

if(BUILD_EXAMPLES)
## GLFW
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "GLFW_BUILD_EXAMPLES" FORCE)
set(GLFW_BUILD_TESTS OFF CACHE BOOL "GLFW_BUILD_TESTS" FORCE)
add_subdirectory("thirdparty/glfw")
# GLM
add_subdirectory("thirdparty/glm")
# GLI
set(GLI_TEST_ENABLED OFF CACHE BOOL "" FORCE)
add_subdirectory("thirdparty/gli")
set(TINYGLTF_HEADER_ONLY ON CACHE INTERNAL "" FORCE)
set(TINYGLTF_INSTALL OFF CACHE INTERNAL "" FORCE)
add_subdirectory("thirdparty/tinygltf")
# TINYGLTF
set(TINYGLTF_HEADER_ONLY ON CACHE BOOL "" FORCE)
set(TINYGLTF_INSTALL OFF CACHE BOOL "" FORCE)
# Fetch tinygltf from GitHub
include(FetchContent) # once in the project to include the module
FetchContent_Declare(
tinygltf
GIT_REPOSITORY https://github.com/syoyo/tinygltf.git
GIT_TAG v2.8.19
)

target_link_libraries(${PROJECT_NAME} PRIVATE volk VulkanMemoryAllocator)
# Fetch the content and add it to your CMake project
FetchContent_MakeAvailable(tinygltf)
endif()

target_link_libraries(${PROJECT_NAME} Vulkan-Headers volk VulkanMemoryAllocator GenericCodeGen OSDependent MachineIndependent glslang glslang-default-resource-limits)

# Set custom output directories - to have same behaviour accross different compilers
# On linux with make it doesn't work, no debug or release folders
Expand Down Expand Up @@ -98,11 +130,6 @@ target_sources(${PROJECT_NAME} PRIVATE
"${SRC_DIR}/backend/vulkan/VulkanDevice13.cpp"
)



option(BUILD_TESTS "Build tests" ON)
option(BUILD_EXAMPLES "Build examples" ON)

if(BUILD_EXAMPLES)
set(LIB_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/include")
FILE(REAL_PATH "thirdparty/stb" STB_INCLUDE_DIR)
Expand All @@ -115,4 +142,4 @@ endif()

if(BUILD_TESTS)
add_subdirectory("tests")
endif()
endif()
12 changes: 9 additions & 3 deletions examples/App.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,17 @@ App::App()
throw std::runtime_error("Failed to CreateSwapchain");
}
}

// Create graphics queue
{
_graphicsQueue = _ctx->FindQueue(Fox::EQueueType::QUEUE_GRAPHICS);
}

// Create per frame data
for (uint32_t i = 0; i < MAX_FRAMES; i++)
{
_frameData[i].Fence = _ctx->CreateFence(true); // already signaled
_frameData[i].CmdPool = _ctx->CreateCommandPool();
_frameData[i].CmdPool = _ctx->CreateCommandPool(_graphicsQueue);
_frameData[i].Cmd = _ctx->CreateCommandBuffer(_frameData[i].CmdPool);
_frameData[i].ImageAvailableSemaphore = _ctx->CreateGpuSemaphore();
_frameData[i].WorkFinishedSemaphore = _ctx->CreateGpuSemaphore();
Expand Down Expand Up @@ -124,8 +130,8 @@ App::Run()
Draw(data.Cmd, w, h);

_ctx->ResetFence(data.Fence);
_ctx->QueueSubmit({ data.ImageAvailableSemaphore }, { data.WorkFinishedSemaphore }, { data.Cmd }, data.Fence);
_ctx->QueueSubmit(_graphicsQueue, { data.ImageAvailableSemaphore }, { data.WorkFinishedSemaphore }, { data.Cmd }, data.Fence);

_ctx->QueuePresent(_swapchain, _swapchainImageIndex, { data.WorkFinishedSemaphore });
_ctx->QueuePresent(_graphicsQueue, _swapchain, _swapchainImageIndex, { data.WorkFinishedSemaphore });
}
}
2 changes: 1 addition & 1 deletion examples/App.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class App
Fox::EFormat format = Fox::EFormat::B8G8R8A8_UNORM;
uint32_t _swapchain{};
uint32_t _swapchainImageIndex{};

uint32_t _graphicsQueue{};
struct PerFrameData
{
uint32_t Fence{};
Expand Down
18 changes: 0 additions & 18 deletions examples/DepthBuffer/CMakeLists.txt

This file was deleted.

Loading