summaryrefslogtreecommitdiff
path: root/tools/gfx/vulkan/vk-module.h
diff options
context:
space:
mode:
authorEllie Hermaszewska <ellieh@nvidia.com>2024-10-29 14:49:26 +0800
committerGitHub <noreply@github.com>2024-10-29 14:49:26 +0800
commitf65d756bff8d4c5cbc15bd0322a2ae8e6b896a21 (patch)
treeea1d61342cd29368e19135000ec2948813096205 /tools/gfx/vulkan/vk-module.h
parenta729c15e9dce9f5116a38afc66329ab2ca4cea54 (diff)
format
* format * Minor test fixes * enable checking cpp format in ci
Diffstat (limited to 'tools/gfx/vulkan/vk-module.h')
-rw-r--r--tools/gfx/vulkan/vk-module.h40
1 files changed, 20 insertions, 20 deletions
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