layers: Protect format table from autoformatting
authorMark Lobodzinski <mark@lunarg.com>
Wed, 25 Jan 2017 17:01:11 +0000 (10:01 -0700)
committerMark Lobodzinski <mark@lunarg.com>
Wed, 25 Jan 2017 17:24:10 +0000 (10:24 -0700)
Change-Id: I0dbb2ab1c8f8179fe3d1fe575258051e56104f7d

layers/vk_layer_utils.cpp

index 8d912d7..c82d204 100644 (file)
@@ -32,6 +32,9 @@ struct VULKAN_FORMAT_INFO {
     VkFormatCompatibilityClass format_class;
 };
 
+// Disable auto-formatting for this large table
+// clang-format off
+
 // Set up data structure with number of bytes and number of channels for each Vulkan format
 const std::map<VkFormat, VULKAN_FORMAT_INFO> vk_format_table = {
     {VK_FORMAT_UNDEFINED,                   {0, 0, VK_FORMAT_COMPATIBILITY_CLASS_NONE_BIT }},
@@ -229,6 +232,9 @@ const std::map<VkFormat, VULKAN_FORMAT_INFO> vk_format_table = {
     {VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG,  {8, 4, VK_FORMAT_COMPATIBILITY_CLASS_ASTC_12X10_BIT}},
 };
 
+// Renable formatting
+// clang-format on
+
 // Return true if format is a depth or stencil format
 VK_LAYER_EXPORT bool vk_format_is_depth_or_stencil(VkFormat format) {
     return (vk_format_is_depth_and_stencil(format) || vk_format_is_depth_only(format) || vk_format_is_stencil_only(format));