From 4ab51f15c7d6b03b1597edfdc65898a18320ec36 Mon Sep 17 00:00:00 2001 From: "Matias N. Goldberg" Date: Tue, 1 Oct 2024 21:53:57 -0300 Subject: [PATCH] Small cosmetic changes Const correctness Add braces for readability Clang format comment --- .../Vulkan/src/OgreVulkanRenderSystem.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/RenderSystems/Vulkan/src/OgreVulkanRenderSystem.cpp b/RenderSystems/Vulkan/src/OgreVulkanRenderSystem.cpp index 38b8aff68c..2a85abb1ca 100644 --- a/RenderSystems/Vulkan/src/OgreVulkanRenderSystem.cpp +++ b/RenderSystems/Vulkan/src/OgreVulkanRenderSystem.cpp @@ -3902,7 +3902,7 @@ namespace Ogre else { // MSAA. - VkSampleCountFlags supportedSampleCounts = (VK_SAMPLE_COUNT_64_BIT << 1) - 1; + VkSampleCountFlags supportedSampleCounts = ( VK_SAMPLE_COUNT_64_BIT << 1 ) - 1; if( format == PFG_NULL ) { @@ -3911,12 +3911,14 @@ namespace Ogre supportedSampleCounts = deviceLimits.framebufferNoAttachmentsSampleCounts; } else if( textureFlags & TextureFlags::Uav ) + { supportedSampleCounts &= deviceLimits.storageImageSampleCounts; + } else { - bool isDepth = PixelFormatGpuUtils::isDepth( format ); - bool isStencil = PixelFormatGpuUtils::isStencil( format ); - bool isInteger = PixelFormatGpuUtils::isInteger( format ); + const bool isDepth = PixelFormatGpuUtils::isDepth( format ); + const bool isStencil = PixelFormatGpuUtils::isStencil( format ); + const bool isInteger = PixelFormatGpuUtils::isInteger( format ); if( textureFlags & ( TextureFlags::NotTexture | TextureFlags::RenderToTexture | TextureFlags::RenderWindowSpecific ) ) @@ -3928,8 +3930,12 @@ namespace Ogre supportedSampleCounts &= deviceLimits.framebufferDepthSampleCounts; if( isStencil || ( textureFlags & TextureFlags::RenderWindowSpecific ) ) supportedSampleCounts &= deviceLimits.framebufferStencilSampleCounts; - if( isInteger ) // TODO: Query Vulkan 1.2 / extensions to get framebufferIntegerColorSampleCounts. + if( isInteger ) + { + // TODO: Query Vulkan 1.2 / extensions to get + // framebufferIntegerColorSampleCounts. supportedSampleCounts &= VK_SAMPLE_COUNT_1_BIT; + } } if( 0 == ( textureFlags & TextureFlags::NotTexture ) )