Fix descriptor pool fragmentation (#2949)
This commit is contained in:
@@ -201,7 +201,7 @@ void Texture2D::uploadSubRegion(const void* pixelData,
|
||||
|
||||
enqueueCommands(commandBuffer);
|
||||
|
||||
context.enqueueDeletion([buffAlloc = std::move(bufferAllocation)](const auto&) mutable { buffAlloc.reset(); });
|
||||
context.enqueueDeletion([buffAlloc = std::move(bufferAllocation)](auto&) mutable { buffAlloc.reset(); });
|
||||
|
||||
context.renderingStats().numTextureUpdates++;
|
||||
}
|
||||
@@ -391,7 +391,7 @@ void Texture2D::createSampler() {
|
||||
|
||||
void Texture2D::destroyTexture() {
|
||||
if (imageAllocation) {
|
||||
context.enqueueDeletion([allocation = std::move(imageAllocation)](const auto&) mutable { allocation.reset(); });
|
||||
context.enqueueDeletion([allocation = std::move(imageAllocation)](auto&) mutable { allocation.reset(); });
|
||||
|
||||
imageLayout = vk::ImageLayout::eUndefined;
|
||||
}
|
||||
@@ -399,7 +399,7 @@ void Texture2D::destroyTexture() {
|
||||
|
||||
void Texture2D::destroySampler() {
|
||||
if (sampler) {
|
||||
context.enqueueDeletion([sampler_ = std::move(sampler)](const auto& context_) mutable {
|
||||
context.enqueueDeletion([sampler_ = std::move(sampler)](auto& context_) mutable {
|
||||
context_.getBackend().getDevice()->destroySampler(sampler_);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user