Mesa (main): pvr: Remove clang-format off comment from vk_format.h

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jun 7 14:02:37 UTC 2022


Module: Mesa
Branch: main
Commit: 4dd5f03edc991d9e70596ac88d857e3d87139206
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=4dd5f03edc991d9e70596ac88d857e3d87139206

Author: Rajnesh Kanwal <rajnesh.kanwal at imgtec.com>
Date:   Tue May 24 14:17:09 2022 +0100

pvr: Remove clang-format off comment from vk_format.h

This enables clang formatting for vk_format.h. This was disabled
as we were using tabs for indentation and vk_format.h uses three
spaces for indentation.

Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal at imgtec.com>
Reviewed-by: Frank Binns <frank.binns at imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16897>

---

 src/imagination/vulkan/vk_format.h | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/src/imagination/vulkan/vk_format.h b/src/imagination/vulkan/vk_format.h
index 2473ac112bc..4d4fbee5d0c 100644
--- a/src/imagination/vulkan/vk_format.h
+++ b/src/imagination/vulkan/vk_format.h
@@ -28,7 +28,6 @@
  * SOFTWARE.
  */
 
-/* clang-format off */
 #ifndef VK_FORMAT_H
 #define VK_FORMAT_H
 
@@ -40,8 +39,7 @@
 
 #include "util/u_endian.h"
 
-static inline bool
-vk_format_is_alpha_on_msb(VkFormat vk_format)
+static inline bool vk_format_is_alpha_on_msb(VkFormat vk_format)
 {
    const struct util_format_description *desc =
       vk_format_description(vk_format);
@@ -49,14 +47,14 @@ vk_format_is_alpha_on_msb(VkFormat vk_format)
    return (desc->colorspace == UTIL_FORMAT_COLORSPACE_RGB ||
            desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB) &&
 #if UTIL_ARCH_BIG_ENDIAN
-           desc->swizzle[3] == PIPE_SWIZZLE_X;
+          desc->swizzle[3] == PIPE_SWIZZLE_X;
 #else
-           desc->swizzle[3] == PIPE_SWIZZLE_W;
+          desc->swizzle[3] == PIPE_SWIZZLE_W;
 #endif
 }
 
-static inline uint
-vk_format_get_channel_width(VkFormat vk_format, uint32_t channel)
+static inline uint vk_format_get_channel_width(VkFormat vk_format,
+                                               uint32_t channel)
 {
    const struct util_format_description *desc =
       vk_format_description(vk_format);
@@ -64,8 +62,7 @@ vk_format_get_channel_width(VkFormat vk_format, uint32_t channel)
    return desc->channel[channel].size;
 }
 
-static inline bool
-vk_format_has_32bit_component(VkFormat vk_format)
+static inline bool vk_format_has_32bit_component(VkFormat vk_format)
 {
    const struct util_format_description *desc =
       vk_format_description(vk_format);
@@ -88,8 +85,7 @@ vk_format_get_component_bits(VkFormat vk_format,
                                          component);
 }
 
-static inline bool
-vk_format_is_normalized(VkFormat vk_format)
+static inline bool vk_format_is_normalized(VkFormat vk_format)
 {
    const struct util_format_description *desc =
       vk_format_description(vk_format);



More information about the mesa-commit mailing list