Skip to content

Commit

Permalink
Small cosmetic changes
Browse files Browse the repository at this point in the history
Const correctness
Add braces for readability
Clang format comment
  • Loading branch information
darksylinc committed Oct 2, 2024
1 parent e8b3856 commit 4ab51f1
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions RenderSystems/Vulkan/src/OgreVulkanRenderSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
{
Expand All @@ -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 ) )
Expand All @@ -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 ) )
Expand Down

0 comments on commit 4ab51f1

Please sign in to comment.