aboutsummaryrefslogtreecommitdiff
path: root/layers/vk_layer_utils.cpp
diff options
context:
space:
mode:
authorMark Lobodzinski <mark@lunarg.com>2017-01-25 10:01:11 -0700
committerMark Lobodzinski <mark@lunarg.com>2017-01-25 10:24:10 -0700
commit41aa9b17c4484ce888b90d9b09af4227eb950f67 (patch)
tree832dc3f1257af84f28064d1b6c315dea52810cab /layers/vk_layer_utils.cpp
parent3522f640f85867cbceb768a42881829d7258a743 (diff)
downloadusermoji-41aa9b17c4484ce888b90d9b09af4227eb950f67.tar.xz
layers: Protect format table from autoformatting
Change-Id: I0dbb2ab1c8f8179fe3d1fe575258051e56104f7d
Diffstat (limited to 'layers/vk_layer_utils.cpp')
-rw-r--r--layers/vk_layer_utils.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/layers/vk_layer_utils.cpp b/layers/vk_layer_utils.cpp
index 8d912d71..c82d2042 100644
--- a/layers/vk_layer_utils.cpp
+++ b/layers/vk_layer_utils.cpp
@@ -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));