From f65d756bff8d4c5cbc15bd0322a2ae8e6b896a21 Mon Sep 17 00:00:00 2001 From: Ellie Hermaszewska Date: Tue, 29 Oct 2024 14:49:26 +0800 Subject: format * format * Minor test fixes * enable checking cpp format in ci --- tools/gfx/vulkan/vk-module.h | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'tools/gfx/vulkan/vk-module.h') diff --git a/tools/gfx/vulkan/vk-module.h b/tools/gfx/vulkan/vk-module.h index 062c953f6..4ee04dbc8 100644 --- a/tools/gfx/vulkan/vk-module.h +++ b/tools/gfx/vulkan/vk-module.h @@ -1,18 +1,17 @@ // vk-module.h #pragma once -#include "slang.h" - #include "slang-com-helper.h" +#include "slang.h" #if SLANG_WINDOWS_FAMILY -# define VK_USE_PLATFORM_WIN32_KHR 1 +#define VK_USE_PLATFORM_WIN32_KHR 1 #elif SLANG_APPLE_FAMILY -# define VK_USE_PLATFORM_METAL_EXT 1 +#define VK_USE_PLATFORM_METAL_EXT 1 #else -# if SLANG_ENABLE_XLIB -# define VK_USE_PLATFORM_XLIB_KHR 1 -# endif +#if SLANG_ENABLE_XLIB +#define VK_USE_PLATFORM_XLIB_KHR 1 +#endif #endif #define VK_NO_PROTOTYPES @@ -21,36 +20,37 @@ // Undef xlib macros #ifdef Always -# undef Always +#undef Always #endif #ifdef None -# undef None +#undef None #endif -namespace gfx { +namespace gfx +{ struct VulkanModule { - /// true if has been initialized + /// true if has been initialized SLANG_FORCE_INLINE bool isInitialized() const { return m_module != nullptr; } - /// Get a function by name + /// Get a function by name PFN_vkVoidFunction getFunction(const char* name) const; - /// true if using a software Vulkan implementation. + /// true if using a software Vulkan implementation. bool isSoftware() const { return m_isSoftware; } - /// Initialize + /// Initialize Slang::Result init(bool useSoftwareImpl); - /// Destroy + /// Destroy void destroy(); - /// Dtor + /// Dtor ~VulkanModule() { destroy(); } - protected: - void* m_module = nullptr; - bool m_isSoftware = false; +protected: + void* m_module = nullptr; + bool m_isSoftware = false; }; -} // renderer_test +} // namespace gfx -- cgit v1.2.3