Skip to content

Commit

Permalink
eliminate vulkan validation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
cuteday committed Jul 26, 2024
1 parent ea4cf27 commit 8022b37
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 2 additions & 6 deletions src/core/window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1079,9 +1079,6 @@ bool DeviceManager::createSwapChain() {

const bool enableSwapChainSharing = queues.size() > 1;

auto nextDesc = vk::SwapchainPresentScalingCreateInfoEXT().setScalingBehavior(
vk::PresentScalingFlagBitsEXT::eOneToOne);

auto desc =
vk::SwapchainCreateInfoKHR()
.setSurface(mWindowSurface)
Expand All @@ -1099,10 +1096,9 @@ bool DeviceManager::createSwapChain() {
.setPreTransform(vk::SurfaceTransformFlagBitsKHR::eIdentity)
.setCompositeAlpha(vk::CompositeAlphaFlagBitsKHR::eOpaque)
.setPresentMode(mDeviceParams.vsyncEnabled ? vk::PresentModeKHR::eFifo
: vk::PresentModeKHR::eImmediate)
: vk::PresentModeKHR::eImmediate)
.setClipped(true)
.setOldSwapchain(nullptr)
.setPNext(&nextDesc);
.setOldSwapchain(nullptr);

const vk::Result res = mVulkanDevice.createSwapchainKHR(&desc, nullptr, &mSwapChain);
if (res != vk::Result::eSuccess) {
Expand Down
2 changes: 1 addition & 1 deletion src/core/window.h
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ class DeviceManager {
VK_EXT_DEBUG_MARKER_EXTENSION_NAME,
VK_KHR_TIMELINE_SEMAPHORE_EXTENSION_NAME,
VK_EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME,
VK_KHR_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME,
VK_EXT_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME,
VK_NV_MESH_SHADER_EXTENSION_NAME,
VK_KHR_FRAGMENT_SHADING_RATE_EXTENSION_NAME,
},
Expand Down

0 comments on commit 8022b37

Please sign in to comment.