Skip to content

Commit a076519

Browse files
authored
Merge pull request #261 from thesusian/patch-1
Fixed getMaxUsableSampleCount() formatting
2 parents 8c71f7b + 30ca7a4 commit a076519

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

code/29_multisampling.cpp

+14-14
Original file line numberDiff line numberDiff line change
@@ -976,20 +976,20 @@ class HelloTriangleApplication {
976976
endSingleTimeCommands(commandBuffer);
977977
}
978978

979-
VkSampleCountFlagBits getMaxUsableSampleCount() {
980-
VkPhysicalDeviceProperties physicalDeviceProperties;
981-
vkGetPhysicalDeviceProperties(physicalDevice, &physicalDeviceProperties);
982-
983-
VkSampleCountFlags counts = physicalDeviceProperties.limits.framebufferColorSampleCounts & physicalDeviceProperties.limits.framebufferDepthSampleCounts;
984-
if (counts & VK_SAMPLE_COUNT_64_BIT) { return VK_SAMPLE_COUNT_64_BIT; }
985-
if (counts & VK_SAMPLE_COUNT_32_BIT) { return VK_SAMPLE_COUNT_32_BIT; }
986-
if (counts & VK_SAMPLE_COUNT_16_BIT) { return VK_SAMPLE_COUNT_16_BIT; }
987-
if (counts & VK_SAMPLE_COUNT_8_BIT) { return VK_SAMPLE_COUNT_8_BIT; }
988-
if (counts & VK_SAMPLE_COUNT_4_BIT) { return VK_SAMPLE_COUNT_4_BIT; }
989-
if (counts & VK_SAMPLE_COUNT_2_BIT) { return VK_SAMPLE_COUNT_2_BIT; }
990-
991-
return VK_SAMPLE_COUNT_1_BIT;
992-
}
979+
VkSampleCountFlagBits getMaxUsableSampleCount() {
980+
VkPhysicalDeviceProperties physicalDeviceProperties;
981+
vkGetPhysicalDeviceProperties(physicalDevice, &physicalDeviceProperties);
982+
983+
VkSampleCountFlags counts = physicalDeviceProperties.limits.framebufferColorSampleCounts & physicalDeviceProperties.limits.framebufferDepthSampleCounts;
984+
if (counts & VK_SAMPLE_COUNT_64_BIT) { return VK_SAMPLE_COUNT_64_BIT; }
985+
if (counts & VK_SAMPLE_COUNT_32_BIT) { return VK_SAMPLE_COUNT_32_BIT; }
986+
if (counts & VK_SAMPLE_COUNT_16_BIT) { return VK_SAMPLE_COUNT_16_BIT; }
987+
if (counts & VK_SAMPLE_COUNT_8_BIT) { return VK_SAMPLE_COUNT_8_BIT; }
988+
if (counts & VK_SAMPLE_COUNT_4_BIT) { return VK_SAMPLE_COUNT_4_BIT; }
989+
if (counts & VK_SAMPLE_COUNT_2_BIT) { return VK_SAMPLE_COUNT_2_BIT; }
990+
991+
return VK_SAMPLE_COUNT_1_BIT;
992+
}
993993

994994
void createTextureImageView() {
995995
textureImageView = createImageView(textureImage, VK_FORMAT_R8G8B8A8_SRGB, VK_IMAGE_ASPECT_COLOR_BIT, mipLevels);

0 commit comments

Comments
 (0)