UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
VulkanWindowsPlatform.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5// moved the setup from VulkanRHIPrivate.h to the platform headers
7#include "RHI.h"
8
9#define VK_USE_PLATFORM_WIN32_KHR 1
10#define VK_USE_PLATFORM_WIN32_KHX 1
11
12#define VULKAN_SHOULD_ENABLE_DRAW_MARKERS (UE_BUILD_DEBUG || UE_BUILD_DEVELOPMENT)
13#define VULKAN_USE_CREATE_WIN32_SURFACE 1
14#define VULKAN_DYNAMICALLYLOADED 1
15#define VULKAN_SHOULD_ENABLE_DESKTOP_HMD_SUPPORT 1
16#define VULKAN_SIGNAL_UNIMPLEMENTED() checkf(false, TEXT("Unimplemented vulkan functionality: %s"), StringCast<TCHAR>(__FUNCTION__).Get())
17#define VULKAN_SUPPORTS_SCALAR_BLOCK_LAYOUT 1
18#define VULKAN_SUPPORTS_RAY_TRACING_POSITION_FETCH 1
19
20#define UE_VK_API_VERSION VK_API_VERSION_1_1
21
22
23#if UE_BUILD_DEBUG || UE_BUILD_DEVELOPMENT
24# include "vk_enum_string_helper.h"
25# define VK_TYPE_TO_STRING(Type, Value) ANSI_TO_TCHAR(string_##Type(Value))
26# define VK_FLAGS_TO_STRING(Type, Value) ANSI_TO_TCHAR(string_##Type(Value).c_str())
27#endif
28
29// 32-bit windows has warnings on custom mem mgr callbacks
30#define VULKAN_SHOULD_USE_LLM (UE_BUILD_DEBUG || UE_BUILD_DEVELOPMENT) && !PLATFORM_32BITS
31
32#define ENUM_VK_ENTRYPOINTS_PLATFORM_BASE(EnumMacro)
33
34#define ENUM_VK_ENTRYPOINTS_PLATFORM_INSTANCE(EnumMacro) \
35 EnumMacro(PFN_vkCreateWin32SurfaceKHR, vkCreateWin32SurfaceKHR)
36
37#define ENUM_VK_ENTRYPOINTS_OPTIONAL_PLATFORM_INSTANCE(EnumMacro)
38
39// and now, include the GenericPlatform class
40#include "../VulkanGenericPlatform.h"
41
43
65
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
EGpuVendorId
Definition RHIDefinitions.h:1006
FVulkanWindowsPlatform FVulkanPlatform
Definition VulkanWindowsPlatform.h:66
FVulkanGenericPlatformWindowContext FVulkanPlatformWindowContext
Definition VulkanWindowsPlatform.h:42
Definition VulkanAndroidPlatform.h:52
Definition VulkanDevice.h:279
Definition VulkanGenericPlatform.h:28
Definition VulkanGenericPlatform.h:40
Definition VulkanWindowsPlatform.h:45
static void CreateSurface(FVulkanPlatformWindowContext &WindowContext, VkInstance Instance, VkSurfaceKHR *OutSurface)
Definition VulkanWindowsPlatform.cpp:183
static void GetDeviceLayers(TArray< const ANSICHAR * > &OutLayers)
Definition VulkanWindowsPlatform.h:54
static void GetDeviceExtensions(FVulkanDevice *Device, FVulkanDeviceExtensionArray &OutExtensions)
Definition VulkanWindowsPlatform.cpp:173
static void GetInstanceExtensions(FVulkanInstanceExtensionArray &OutExtensions)
Definition VulkanWindowsPlatform.cpp:166
static void GetInstanceLayers(TArray< const ANSICHAR * > &OutLayers)
Definition VulkanWindowsPlatform.h:52
static bool LoadVulkanInstanceFunctions(VkInstance inInstance)
Definition VulkanWindowsPlatform.cpp:102
static void FreeVulkanLibrary()
Definition VulkanWindowsPlatform.cpp:154
static bool SupportsDeviceLocalHostVisibleWithNoPenalty(EGpuVendorId VendorId)
Definition VulkanWindowsPlatform.cpp:192
static VkTimeDomainKHR GetTimeDomain()
Definition VulkanWindowsPlatform.h:60
static bool LoadVulkanLibrary()
Definition VulkanWindowsPlatform.cpp:32
Definition Array.h:670