Skip to content

Commit

Permalink
gpu: Fix VMA memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
TonyBarbour authored and jeremyg-lunarg committed Dec 13, 2022
1 parent 39902fe commit e2ea083
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions layers/gpu_validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1288,6 +1288,7 @@ void GpuAssisted::PostCallRecordCmdBindDescriptorSets(VkCommandBuffer commandBuf
ValidationStateTracker::PostCallRecordCmdBindDescriptorSets(commandBuffer, pipelineBindPoint, layout, firstSet,
descriptorSetCount, pDescriptorSets, dynamicOffsetCount,
pDynamicOffsets);
if (aborted) return;
auto cb_node = GetWrite<gpuav_state::CommandBuffer>(commandBuffer);
if (!cb_node) {
ReportSetupProblem(device, "Unrecognized command buffer");
Expand Down Expand Up @@ -2267,9 +2268,6 @@ void gpuav_state::CommandBuffer::Reset() {
CMD_BUFFER_STATE::Reset();
auto gpuav = static_cast<GpuAssisted *>(dev_data);
// Free the device memory and descriptor set(s) associated with a command buffer.
if (gpuav->aborted) {
return;
}
for (auto &buffer_info : per_draw_buffer_list) {
gpuav->DestroyBuffer(buffer_info);
}
Expand Down

0 comments on commit e2ea083

Please sign in to comment.