Improve vulkan resource freeing
and some minor improvements to the Renderer, now taking in an AssetRef<Pipeline> as parameter.
This commit is contained in:
@@ -11,7 +11,10 @@ namespace Copium
|
||||
|
||||
Sampler::~Sampler()
|
||||
{
|
||||
vkDestroySampler(Vulkan::GetDevice(), sampler, nullptr);
|
||||
VkSampler samplerCpy = sampler;
|
||||
Vulkan::GetDevice().QueueIdleCommand([samplerCpy]() {
|
||||
vkDestroySampler(Vulkan::GetDevice(), samplerCpy, nullptr);
|
||||
});
|
||||
}
|
||||
|
||||
void Sampler::InitializeSampler(const SamplerCreator& samplerCreator)
|
||||
|
||||
Reference in New Issue
Block a user