Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions .github/workflows/job-clangformat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: update llvm to version 22
run: choco upgrade llvm

- name: Checking formatting
run: .\Scripts\ClangFormat.ps1 -SourceDirectory ${{ github.workspace }}/${{ inputs.srcDirectory }} -RunAsCheck 1
shell: pwsh
11 changes: 6 additions & 5 deletions .github/workflows/job-cmakebuild-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,17 @@ jobs:
- name: Register the Microsoft repository GPG keys
run: sudo dpkg -i packages-microsoft-prod.deb

- name: Install LLVM-20
- name: Install LLVM-22
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 20
sudo ./llvm.sh 22

- name: Update the list of packages after we added packages.microsoft.com
- name: Update the list of packages
run: sudo apt-get update
- name: Install development library
run: sudo apt-get install libasound2-dev libgl1-mesa-dev libpulse-dev libdbus-1-dev libx11-dev libxcursor-dev libxext-dev libxi-dev libxinerama-dev libxrandr-dev libxss-dev libxt-dev libxxf86vm-dev cmake apt-transport-https software-properties-common gcc g++ powershell clang-format-20 libwayland-dev libxkbcommon-dev dotnet-sdk-8.0

- name: Install Dependencies
run: sudo apt-get install libasound2-dev libgl1-mesa-dev libpulse-dev libdbus-1-dev libx11-dev libxcursor-dev libxext-dev libxi-dev libxinerama-dev libxrandr-dev libxss-dev libxt-dev libxxf86vm-dev cmake apt-transport-https software-properties-common gcc g++ powershell clang-format-22 glslang-tools libwayland-dev libxkbcommon-dev

- name: CMake Build
run: .\Scripts\BuildEngine.ps1 -Configurations ${{inputs.configuration}}
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/job-cmakebuild-macOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ jobs:
- name: Install NuGet CLI
run: brew install nuget

- name: Update LLVM
run: brew install llvm

- name: CMake Build
run: .\Scripts\BuildEngine.ps1 -Configurations ${{inputs.configuration}} -Architecture ${{inputs.architecture}} -RunClangFormat 0
shell: pwsh
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/job-cmakebuild-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,14 @@ on:
jobs:
cmake-build:
name: cmake-build-windows-${{ inputs.configuration }}
runs-on: windows-2022
runs-on: windows-2025
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: update llvm to version 22
run: choco upgrade llvm

- name: CMake Build
run: .\Scripts\BuildEngine.ps1 -Configurations ${{inputs.configuration}} -RunClangFormat 0
shell: pwsh
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/job-deploy-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
jobs:
deploy:
name: deploy-windows-x64-${{ inputs.configuration }}
runs-on: windows-2022
runs-on: windows-2025
steps:
- uses: actions/download-artifact@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/job-test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
jobs:
test:
name: test-windows-${{ inputs.configuration }}
runs-on: windows-2022
runs-on: windows-2025
steps:
- name: Download All Artifacts
uses: actions/download-artifact@v4
Expand Down
2 changes: 2 additions & 0 deletions Scripts/Shared.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,8 @@ function Find-ClangFormat () {
}
if ($IsLinux) {
'/usr/bin/clang-format'
'/usr/bin/clang-format-22'
'/usr/bin/clang-format-21'
'/usr/bin/clang-format-20'
}
'clang-format'
Expand Down
3 changes: 2 additions & 1 deletion ZEngine/ZEngine/Core/CoroutineScheduler.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ namespace ZEngine::Core

ReadyCallback Ready = nullptr;
ExecuteCallback Action = nullptr;

// clang-format off
operator bool() noexcept
{
return (Ready && Action);
}
// clang-format on
};

struct CoroutineScheduler
Expand Down
4 changes: 4 additions & 0 deletions ZEngine/ZEngine/Hardwares/VulkanDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,7 @@ namespace ZEngine::Hardwares
VkSemaphore semaphores[] = {signal_semaphore->GetHandle()};
VkCommandBuffer buffers[] = {command_buffer->GetHandle()};
VkSubmitInfo submit_info = {
// clang-format off
.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO,
.pNext = nullptr,
.waitSemaphoreCount = 0,
Expand All @@ -642,6 +643,7 @@ namespace ZEngine::Hardwares
.pCommandBuffers = buffers,
.signalSemaphoreCount = 0,
.pSignalSemaphores = 0,
//clang-format on
};

ZENGINE_VALIDATE_ASSERT(vkQueueSubmit(GetQueue(command_buffer->QueueType).Handle, 1, &submit_info, fence->GetHandle()) == VK_SUCCESS, "Failed to submit queue")
Expand Down Expand Up @@ -2582,10 +2584,12 @@ namespace ZEngine::Hardwares
uint32_t byte_per_pixel = Specifications::BytePerChannelMap[VALUE_FROM_SPEC_MAP(Specifications::ImageFormat::R8G8B8A8_SRGB)];

Specifications::TextureSpecification spec = {
// clang-format off
.Width = width,
.Height = height,
.BytePerPixel = byte_per_pixel,
.Format = Specifications::ImageFormat::R8G8B8A8_SRGB,
// clang-format on
};

auto tex_handle = CreateTexture(spec);
Expand Down
6 changes: 4 additions & 2 deletions ZEngine/ZEngine/Hardwares/VulkanDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,12 @@ namespace ZEngine::Hardwares
BufferType Type = BufferType::UNKNOWN;
VkBuffer Handle = VK_NULL_HANDLE;
VmaAllocation Allocation = nullptr;

// clang-format off
operator bool() const
{
return (Handle != VK_NULL_HANDLE);
}
// clang-format on
};

struct BufferImage
Expand All @@ -90,11 +91,12 @@ namespace ZEngine::Hardwares
VkImageView ViewHandle{VK_NULL_HANDLE};
VkSampler Sampler{VK_NULL_HANDLE};
VmaAllocation Allocation{nullptr};

// clang-format off
operator bool() const
{
return (Handle != VK_NULL_HANDLE);
}
// clang-format on
};

struct IGraphicBuffer
Expand Down
10 changes: 7 additions & 3 deletions ZEngine/ZEngine/Rendering/Renderers/RendererPasses.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ namespace ZEngine::Rendering::Renderers
.EnablePipelineDepthTest(true)
.UseShader("initial")
.Detach();
*output_pass = device->CreateRenderPass(pass_spec);
*output_pass = device->CreateRenderPass(pass_spec);
(*output_pass)->Bake();
}
}
Expand Down Expand Up @@ -90,8 +90,9 @@ namespace ZEngine::Rendering::Renderers

.UseShader("depth_prepass_scene")
.Detach();

// clang-format off
*output_pass = device->CreateRenderPass(pass_spec);
// clang-format on
(*output_pass)->Bake();
}

Expand Down Expand Up @@ -166,8 +167,9 @@ namespace ZEngine::Rendering::Renderers

.UseShader("skybox")
.Detach();

// clang-format off
*output_pass = device->CreateRenderPass(pass_spec);
// clang-format on
(*output_pass)->Bake();
}

Expand Down Expand Up @@ -255,7 +257,9 @@ namespace ZEngine::Rendering::Renderers
.EnablePipelineDepthTest(true)
.UseShader("infinite_grid")
.Detach();
// clang-format off
*output_pass = device->CreateRenderPass(pass_spec);
// clang-format on
(*output_pass)->Bake();
}

Expand Down
2 changes: 1 addition & 1 deletion repoConfiguration.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
},
"LLVM": {
"Version": "20.1.7",
"MaximumVersion": "20.2.0"
"MaximumVersion": "22.2.0"
}
}
}
Loading