Fixing some descriptor binding stuff, made it work

This commit is contained in:
Dynamitos
2024-05-18 21:23:59 +02:00
parent 60d2164987
commit 838bd69fa7
18 changed files with 171 additions and 174 deletions
+21
View File
@@ -117,3 +117,24 @@ void DestructionManager::notifyCommandComplete()
}
}
}
SamplerHandle::SamplerHandle(PGraphics graphics, VkSamplerCreateInfo createInfo)
: CommandBoundResource(graphics)
{
vkCreateSampler(graphics->getDevice(), &createInfo, nullptr, &sampler);
}
SamplerHandle::~SamplerHandle()
{
vkDestroySampler(graphics->getDevice(), sampler, nullptr);
}
Sampler::Sampler(PGraphics graphics, VkSamplerCreateInfo createInfo)
: graphics(graphics)
, handle(new SamplerHandle(graphics, createInfo))
{}
Sampler::~Sampler()
{
graphics->getDestructionManager()->queueResourceForDestruction(std::move(handle));
}