[Fix] (MG_Backend/DirectVulkan): fixing Vulkan backend initialization

This commit is contained in:
2026-03-01 22:39:30 +08:00
parent 43f2043478
commit 6f8c76f06c
6 changed files with 71 additions and 17 deletions
@@ -36,8 +36,9 @@ public:
VkExtent2D extent = {0, 0};
Uint32 mipLevels = 1;
VkFormat format = VK_FORMAT_UNDEFINED;
VkImageAspectFlags aspect = VK_IMAGE_ASPECT_NONE;
TextureResource() {}
TextureResource() = default;
TextureResource(const TextureResource&) = delete;
TextureResource(TextureResource&& that) noexcept {
std::swap(this->image, that.image);
@@ -100,6 +101,7 @@ private:
Uint32& outMipLevelCount);
static Uint32 GetUploadMipLevelCount(const MG_State::GLState::TextureObjectMipmap& texture, TextureUploadTarget target);
static VkFormat GetVkFormat(TextureInternalFormat format);
static VkImageAspectFlags GetAspectMaskForFormat(VkFormat format);
VkDevice m_device = VK_NULL_HANDLE;
VkPhysicalDevice m_physicalDevice = VK_NULL_HANDLE;