Skip to content

Commit e2ea083

Browse files
TonyBarbourjeremyg-lunarg
authored andcommitted
gpu: Fix VMA memory leak
1 parent 39902fe commit e2ea083

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

layers/gpu_validation.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1288,6 +1288,7 @@ void GpuAssisted::PostCallRecordCmdBindDescriptorSets(VkCommandBuffer commandBuf
12881288
ValidationStateTracker::PostCallRecordCmdBindDescriptorSets(commandBuffer, pipelineBindPoint, layout, firstSet,
12891289
descriptorSetCount, pDescriptorSets, dynamicOffsetCount,
12901290
pDynamicOffsets);
1291+
if (aborted) return;
12911292
auto cb_node = GetWrite<gpuav_state::CommandBuffer>(commandBuffer);
12921293
if (!cb_node) {
12931294
ReportSetupProblem(device, "Unrecognized command buffer");
@@ -2267,9 +2268,6 @@ void gpuav_state::CommandBuffer::Reset() {
22672268
CMD_BUFFER_STATE::Reset();
22682269
auto gpuav = static_cast<GpuAssisted *>(dev_data);
22692270
// Free the device memory and descriptor set(s) associated with a command buffer.
2270-
if (gpuav->aborted) {
2271-
return;
2272-
}
22732271
for (auto &buffer_info : per_draw_buffer_list) {
22742272
gpuav->DestroyBuffer(buffer_info);
22752273
}

0 commit comments

Comments
 (0)