[Fix] (MG_Backend/DirectVulkan): add untreated aspect member in TextureResource move ctor

This commit is contained in:
2026-03-06 15:45:19 +08:00
parent 641f54e1b7
commit 8097c0d7b1
@@ -48,9 +48,10 @@ public:
std::swap(this->extent, that.extent);
std::swap(this->mipLevels, that.mipLevels);
std::swap(this->format, that.format);
std::swap(this->aspect, that.aspect);
}
~TextureResource() {
void Reset() {
if (view != VK_NULL_HANDLE) {
vkDestroyImageView(s_device, view, nullptr);
}
@@ -64,6 +65,11 @@ public:
extent = {0, 0};
mipLevels = 1;
format = VK_FORMAT_UNDEFINED;
aspect = VK_IMAGE_ASPECT_NONE;
}
~TextureResource() {
Reset();
}
static inline VkDevice s_device = VK_NULL_HANDLE;