From 6c71e6fdd294d10f44c8a5007e02a0276589f191 Mon Sep 17 00:00:00 2001 From: Matthew Albrecht Date: Sat, 23 Jul 2022 11:06:11 -0700 Subject: [PATCH] Try to fix Windows CI --- .github/workflows/ci_build.yml | 13 ++++++------- Engine/Graphics/Graphics/Pipelines/Pipeline.hpp | 4 +++- .../Graphics/Graphics/Pipelines/PipelineCompute.cpp | 4 ---- .../Graphics/Graphics/Pipelines/PipelineCompute.hpp | 1 - .../Graphics/Pipelines/PipelineGraphics.cpp | 4 ---- .../Graphics/Pipelines/PipelineGraphics.hpp | 2 -- External/volk/volk.h | 4 ++-- 7 files changed, 11 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci_build.yml b/.github/workflows/ci_build.yml index 298e742ae..6a46fe4ad 100644 --- a/.github/workflows/ci_build.yml +++ b/.github/workflows/ci_build.yml @@ -19,10 +19,9 @@ jobs: - uses: actions/checkout@v2 with: submodules: recursive - - uses: lukka/get-cmake@v3.19.0 - name: Download Vulkan run: | - Invoke-WebRequest -Uri "https://sdk.lunarg.com/sdk/download/1.3.216.0/windows/VulkanSDK-1.3.216.0-Installer.exe" -OutFile vulkan-sdk.exe + Invoke-WebRequest -Uri "https://sdk.lunarg.com/sdk/download/1.2.189.0/windows/VulkanSDK-1.2.189.0-Installer.exe" -OutFile vulkan-sdk.exe $installer = Start-Process -FilePath vulkan-sdk.exe -Wait -PassThru -ArgumentList @("/S"); $installer.WaitForExit(); - name: Download OpenAL @@ -31,8 +30,8 @@ jobs: Expand-Archive -Path openal-soft.zip -DestinationPath C:\\ - name: Build env: - VULKAN_SDK: "C:\\VulkanSDK\\1.3.216.0" - OPENALDIR: "C:\\openal-soft-1.22.0-bin" + VULKAN_SDK: "C:\\VulkanSDK\\1.2.189.0" + OPENALDIR: "C:\\openal-soft-1.22.2-bin" shell: cmd run: | call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" @@ -81,7 +80,7 @@ jobs: run: echo "${{ runner.temp }}/msys64/mingw64/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append - name: Download Vulkan run: | - Invoke-WebRequest -Uri "https://sdk.lunarg.com/sdk/download/1.3.216.0/windows/VulkanSDK-1.3.216.0-Installer.exe" -OutFile vulkan-sdk.exe + Invoke-WebRequest -Uri "https://sdk.lunarg.com/sdk/download/1.2.189.0/windows/VulkanSDK-1.2.189.0-Installer.exe" -OutFile vulkan-sdk.exe $installer = Start-Process -FilePath vulkan-sdk.exe -Wait -PassThru -ArgumentList @("/S"); $installer.WaitForExit(); - name: Download OpenAL @@ -90,8 +89,8 @@ jobs: Expand-Archive -Path openal-soft.zip -DestinationPath C:\\ - name: Build env: - VULKAN_SDK: "C:\\VulkanSDK\\1.3.216.0" - OPENALDIR: "C:\\openal-soft-1.22.0-bin" + VULKAN_SDK: "C:\\VulkanSDK\\1.2.189.0" + OPENALDIR: "C:\\openal-soft-1.22.2-bin" shell: cmd run: | cmake --version diff --git a/Engine/Graphics/Graphics/Pipelines/Pipeline.hpp b/Engine/Graphics/Graphics/Pipelines/Pipeline.hpp index 821877fce..8e4b4c382 100644 --- a/Engine/Graphics/Graphics/Pipelines/Pipeline.hpp +++ b/Engine/Graphics/Graphics/Pipelines/Pipeline.hpp @@ -16,7 +16,9 @@ class ACID_GRAPHICS_EXPORT Pipeline { virtual ~Pipeline() = default; - virtual void BindPipeline(const CommandBuffer &commandBuffer) const = 0; + void BindPipeline(const CommandBuffer &commandBuffer) const { + vkCmdBindPipeline(commandBuffer, GetPipelineBindPoint(), GetPipeline()); + } virtual const Shader *GetShader() const = 0; virtual bool IsPushDescriptors() const = 0; diff --git a/Engine/Graphics/Graphics/Pipelines/PipelineCompute.cpp b/Engine/Graphics/Graphics/Pipelines/PipelineCompute.cpp index 0ffc1b403..d636c04ac 100644 --- a/Engine/Graphics/Graphics/Pipelines/PipelineCompute.cpp +++ b/Engine/Graphics/Graphics/Pipelines/PipelineCompute.cpp @@ -42,10 +42,6 @@ void PipelineCompute::CmdRender(const CommandBuffer &commandBuffer, const Vector vkCmdDispatch(commandBuffer, groupCountX, groupCountY, 1); } -void PipelineCompute::BindPipeline(const CommandBuffer &commandBuffer) const { - vkCmdBindPipeline(commandBuffer, GetPipelineBindPoint(), GetPipeline()); -} - void PipelineCompute::CreateShaderProgram() { std::stringstream defineBlock; for (const auto &[defineName, defineValue] : defines) diff --git a/Engine/Graphics/Graphics/Pipelines/PipelineCompute.hpp b/Engine/Graphics/Graphics/Pipelines/PipelineCompute.hpp index 189157ae9..34a60e42f 100644 --- a/Engine/Graphics/Graphics/Pipelines/PipelineCompute.hpp +++ b/Engine/Graphics/Graphics/Pipelines/PipelineCompute.hpp @@ -20,7 +20,6 @@ class ACID_GRAPHICS_EXPORT PipelineCompute : public Pipeline { ~PipelineCompute(); void CmdRender(const CommandBuffer &commandBuffer, const Vector2ui &extent) const; - void BindPipeline(const CommandBuffer &commandBuffer) const override; const std::filesystem::path &GetShaderStage() const { return shaderStage; } const std::vector &GetDefines() const { return defines; } diff --git a/Engine/Graphics/Graphics/Pipelines/PipelineGraphics.cpp b/Engine/Graphics/Graphics/Pipelines/PipelineGraphics.cpp index 8c7fa13ea..c9fbf8417 100644 --- a/Engine/Graphics/Graphics/Pipelines/PipelineGraphics.cpp +++ b/Engine/Graphics/Graphics/Pipelines/PipelineGraphics.cpp @@ -61,10 +61,6 @@ PipelineGraphics::~PipelineGraphics() { vkDestroyDescriptorSetLayout(*logicalDevice, descriptorSetLayout, nullptr); } -void PipelineGraphics::BindPipeline(const CommandBuffer &commandBuffer) const { - vkCmdBindPipeline(commandBuffer, GetPipelineBindPoint(), GetPipeline()); -} - const ImageDepth *PipelineGraphics::GetDepthStencil(const std::optional &stage) const { return Graphics::Get()->GetRenderStage(stage ? *stage : this->stage.first)->GetDepthStencil(); } diff --git a/Engine/Graphics/Graphics/Pipelines/PipelineGraphics.hpp b/Engine/Graphics/Graphics/Pipelines/PipelineGraphics.hpp index e70035075..2cf7ccd9c 100644 --- a/Engine/Graphics/Graphics/Pipelines/PipelineGraphics.hpp +++ b/Engine/Graphics/Graphics/Pipelines/PipelineGraphics.hpp @@ -46,8 +46,6 @@ class ACID_GRAPHICS_EXPORT PipelineGraphics : public Pipeline { VkCullModeFlags cullMode = VK_CULL_MODE_BACK_BIT, VkFrontFace frontFace = VK_FRONT_FACE_CLOCKWISE, bool pushDescriptors = false); ~PipelineGraphics(); - void BindPipeline(const CommandBuffer &commandBuffer) const override; - /** * Gets the depth stencil used in a stage. * @param stage The stage to get values from, if not provided the pipelines stage will be used. diff --git a/External/volk/volk.h b/External/volk/volk.h index f6b5a8a56..0c3c38ba6 100644 --- a/External/volk/volk.h +++ b/External/volk/volk.h @@ -65,7 +65,7 @@ extern "C" { #endif -struct VolkDeviceTable; +struct ACID_CONTEXT_EXPORT VolkDeviceTable; /** * Initialize library by loading Vulkan loader; call this function before creating the Vulkan instance. @@ -129,7 +129,7 @@ ACID_CONTEXT_EXPORT void volkLoadDeviceTable(struct VolkDeviceTable* table, VkDe /** * Device-specific function pointer table */ -struct VolkDeviceTable +struct ACID_CONTEXT_EXPORT VolkDeviceTable { /* VOLK_GENERATE_DEVICE_TABLE */ #if defined(VK_VERSION_1_0)