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
2 changes: 1 addition & 1 deletion .github/workflows/build-nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
arch: arm64
name: Linux
runs-on: ${{ matrix.os }}
container: ghcr.io/scp-fs2open/linux_build:sha-1ff82e8
container: ghcr.io/scp-fs2open/linux_build:sha-71099c9
steps:
- uses: actions/checkout@v1
name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
name: Linux
needs: create_release # Don't run this job until create_release is done and successful
runs-on: ${{ matrix.os }}
container: ghcr.io/scp-fs2open/linux_build:sha-1ff82e8
container: ghcr.io/scp-fs2open/linux_build:sha-71099c9
steps:
- uses: actions/checkout@v1
# checks-out your repository under $GITHUB_WORKSPACE, so your workflow can access it.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
configuration: [FastDebug, Release]
name: Linux
runs-on: ubuntu-latest
container: ghcr.io/scp-fs2open/linux_build:sha-1ff82e8
container: ghcr.io/scp-fs2open/linux_build:sha-71099c9
steps:
- uses: actions/checkout@v1
name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cache-master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
cmake_options: -DFSO_BUILD_WITH_OPENGL=OFF -DFSO_BUILD_WITH_VULKAN=OFF
name: Linux
runs-on: ubuntu-latest
container: ghcr.io/scp-fs2open/linux_build:sha-1ff82e8
container: ghcr.io/scp-fs2open/linux_build:sha-71099c9
steps:
- uses: actions/checkout@v1
name: Checkout
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/test-pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,15 @@ jobs:
- configuration: Release
compiler: gcc-13
cmake_options: -DFSO_BUILD_WITH_OPENGL=OFF -DFSO_BUILD_WITH_VULKAN=OFF
- configuration: Debug
compiler: gcc-13
cmake_options: -DFSO_BUILD_WITH_OPENGL=OFF -DFSO_BUILD_WITH_VULKAN=ON
- configuration: Release
compiler: gcc-13
cmake_options: -DFSO_BUILD_WITH_OPENGL=OFF -DFSO_BUILD_WITH_VULKAN=ON
name: Linux
runs-on: ubuntu-latest
container: ghcr.io/scp-fs2open/linux_build:sha-1ff82e8
container: ghcr.io/scp-fs2open/linux_build:sha-71099c9
steps:
- uses: actions/checkout@v1
name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/weekly-coverity-scan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
name: Build FSO With Coverity Wrapper
if: github.repository == 'scp-fs2open/fs2open.github.com'
runs-on: ${{ matrix.config.os }}
container: ghcr.io/scp-fs2open/linux_build:sha-1ff82e8
container: ghcr.io/scp-fs2open/linux_build:sha-71099c9
strategy:
fail-fast: false
matrix:
Expand Down
5 changes: 5 additions & 0 deletions ci/linux/clang_tidy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,13 @@ fi
# branch
BASE_COMMIT=$(git merge-base $1 $2)

# Note: Manually passing in the Vulkan flags that are normally provided by cmake (but are not so, here), to ensure
# that the source files are checked with the actual configuration used.
echo "Running clang-tidy on changed files"
git diff -U0 --no-color "$BASE_COMMIT..$2" | \
$HERE/clang-tidy-diff.py -path "$(pwd)/build" -p1 \
-extra-arg="-DWITH_VULKAN" \
-extra-arg="-DVULKAN_HPP_DISPATCH_LOADER_DYNAMIC=1" \
-extra-arg="-DVK_NO_PROTOTYPES" \
-regex '(code(?!((\/graphics\/shaders\/compiled)|(\/globalincs\/windebug)))|freespace2|qtfred|test|build|tools)\/.*\.(cpp|h)' \
-clang-tidy-binary /usr/bin/clang-tidy-16 -j$(nproc) -export-fixes "$(pwd)/clang-fixes.yaml"
14 changes: 11 additions & 3 deletions code/graphics/vulkan/RenderFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ void RenderFrame::waitForFinish()
return;
}

m_device.waitForFences(m_frameInFlightFence.get(), true, std::numeric_limits<uint64_t>::max());
// waitForFences can theoretically return a timeout, but as this passes the maximum uint64_t value in microseconds,
// this won't happen in practice, and the result can be ignored.
(void)m_device.waitForFences(m_frameInFlightFence.get(), true, std::numeric_limits<uint64_t>::max());
m_device.resetFences(m_frameInFlightFence.get());

// That frame is now definitely not in flight anymore so we can call the functions that depend on that
Expand All @@ -41,11 +43,14 @@ uint32_t RenderFrame::acquireSwapchainImage()
Assertion(!m_inFlight, "Cannot acquire swapchain image when frame is still in flight.");

uint32_t imageIndex;
m_device.acquireNextImageKHR(m_swapChain,
vk::Result res = m_device.acquireNextImageKHR(m_swapChain,
std::numeric_limits<uint64_t>::max(),
m_imageAvailableSemaphore.get(),
nullptr,
&imageIndex);
// TODO: This should handle at least VK_SUBOPTIMAL_KHR, which means that the swap chain is no longer
// optimal and should be recreated.
(void)res;

m_swapChainIdx = imageIndex;

Expand Down Expand Up @@ -85,7 +90,10 @@ void RenderFrame::submitAndPresent(const std::vector<vk::CommandBuffer>& cmdBuff
presentInfo.pImageIndices = &m_swapChainIdx;
presentInfo.pResults = nullptr;

m_presentQueue.presentKHR(presentInfo);
vk::Result res = m_presentQueue.presentKHR(presentInfo);
// TODO: This should handle at least VK_SUBOPTIMAL_KHR, which means that the swap chain is no longer
// optimal and should be recreated.
(void)res;
}

} // namespace vulkan
Expand Down
3 changes: 2 additions & 1 deletion code/graphics/vulkan/VulkanRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,8 @@ bool VulkanRenderer::createSwapChain(const PhysicalDeviceValues& deviceValues)

m_swapChain = m_device->createSwapchainKHRUnique(createInfo);

m_swapChainImages = m_device->getSwapchainImagesKHR(m_swapChain.get());
std::vector<vk::Image> swapChainImages = m_device->getSwapchainImagesKHR(m_swapChain.get());
m_swapChainImages = SCP_vector<vk::Image>(swapChainImages.begin(), swapChainImages.end());
m_swapChainImageFormat = surfaceFormat.format;
m_swapChainExtent = createInfo.imageExtent;

Expand Down
Loading