diff --git a/src/video_core/CMakeLists.txt b/src/video_core/CMakeLists.txt index 33e507e69e..a12680d350 100644 --- a/src/video_core/CMakeLists.txt +++ b/src/video_core/CMakeLists.txt @@ -101,6 +101,13 @@ add_library(video_core STATIC video_core.h ) +if (ENABLE_VULKAN) + target_sources(video_core PRIVATE renderer_vulkan/declarations.h) + + target_include_directories(video_core PRIVATE ../../externals/Vulkan-Headers/include) + target_compile_definitions(video_core PRIVATE HAS_VULKAN) +endif() + create_target_directory_groups(video_core) target_link_libraries(video_core PUBLIC common core) diff --git a/src/video_core/renderer_vulkan/declarations.h b/src/video_core/renderer_vulkan/declarations.h new file mode 100644 index 0000000000..ba25b5bc70 --- /dev/null +++ b/src/video_core/renderer_vulkan/declarations.h @@ -0,0 +1,45 @@ +// Copyright 2019 yuzu Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +#include + +namespace Vulkan { + +// vulkan.hpp unique handlers use DispatchLoaderStatic +template +using UniqueHandle = vk::UniqueHandle; + +using UniqueAccelerationStructureNV = UniqueHandle; +using UniqueBuffer = UniqueHandle; +using UniqueBufferView = UniqueHandle; +using UniqueCommandBuffer = UniqueHandle; +using UniqueCommandPool = UniqueHandle; +using UniqueDescriptorPool = UniqueHandle; +using UniqueDescriptorSet = UniqueHandle; +using UniqueDescriptorSetLayout = UniqueHandle; +using UniqueDescriptorUpdateTemplate = UniqueHandle; +using UniqueDevice = UniqueHandle; +using UniqueDeviceMemory = UniqueHandle; +using UniqueEvent = UniqueHandle; +using UniqueFence = UniqueHandle; +using UniqueFramebuffer = UniqueHandle; +using UniqueImage = UniqueHandle; +using UniqueImageView = UniqueHandle; +using UniqueIndirectCommandsLayoutNVX = UniqueHandle; +using UniqueObjectTableNVX = UniqueHandle; +using UniquePipeline = UniqueHandle; +using UniquePipelineCache = UniqueHandle; +using UniquePipelineLayout = UniqueHandle; +using UniqueQueryPool = UniqueHandle; +using UniqueRenderPass = UniqueHandle; +using UniqueSampler = UniqueHandle; +using UniqueSamplerYcbcrConversion = UniqueHandle; +using UniqueSemaphore = UniqueHandle; +using UniqueShaderModule = UniqueHandle; +using UniqueSwapchainKHR = UniqueHandle; +using UniqueValidationCacheEXT = UniqueHandle; + +} // namespace Vulkan