vk: delete instead of ref-count EmptyTexture (#7711)

This commit is contained in:
Powei Feng
2024-03-26 13:35:50 -07:00
committed by GitHub
parent 2f359b73a4
commit d70f2e1b81
+1 -3
View File
@@ -249,9 +249,6 @@ VulkanDriver::VulkanDriver(VulkanPlatform* platform, VulkanContext const& contex
mEmptyTexture = createEmptyTexture(mPlatform->getDevice(), mPlatform->getPhysicalDevice(),
mContext, mAllocator, &mCommands, mStagePool);
// Use resource manager to ref-count placeholder resources.
mResourceManager.acquire(mEmptyTexture);
mPipelineCache.setDummyTexture(mEmptyTexture->getPrimaryImageView());
}
@@ -317,6 +314,7 @@ void VulkanDriver::terminate() {
// are about to be destroyed.
mCommands.terminate();
delete mEmptyTexture;
mResourceManager.clear();
mTimestamps.reset();