Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
hoffstadt committed Jan 18, 2025
1 parent e14b70f commit 21bb2a8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
7 changes: 6 additions & 1 deletion extensions/pl_graphics_ext.c
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,6 @@ pl__cleanup_common_device(plDevice* ptDevice)
pl_sb_free(ptDevice->sbtBufferFreeIndices);
pl_sb_free(ptDevice->sbtTexturesCold);
pl_sb_free(ptDevice->sbtSamplersCold);
pl_sb_free(ptDevice->sbtBindGroupsCold);
pl_sb_free(ptDevice->sbtRenderPassesCold);
pl_sb_free(ptDevice->sbtTextureFreeIndices);
pl_sb_free(ptDevice->sbtRenderPassLayoutsCold);
Expand All @@ -357,6 +356,12 @@ pl__cleanup_common_device(plDevice* ptDevice)
pl_sb_free(ptDevice->sbtRenderPassLayoutFreeIndices);
pl_sb_free(ptDevice->sbtRenderPassFreeIndices);

for(uint32_t i = 0; i < pl_sb_size(ptDevice->sbtBindGroupsCold); i++)
{
pl_sb_free(ptDevice->sbtBindGroupsCold[i]._sbtTextures);
}
pl_sb_free(ptDevice->sbtBindGroupsCold);

plTimelineSemaphore* ptCurrentSemaphore = ptDevice->ptSemaphoreFreeList;
while(ptCurrentSemaphore)
{
Expand Down
5 changes: 4 additions & 1 deletion extensions/pl_graphics_metal.m
Original file line number Diff line number Diff line change
Expand Up @@ -1106,7 +1106,9 @@
levels:tLevelRange
slices:tSliceRange];

ptNewMetalTexture->tTexture.label = [NSString stringWithUTF8String:ptViewDesc->pcDebugName];
if(ptNewTexture->tView.pcDebugName == NULL)
ptNewTexture->tView.pcDebugName = "unnamed texture";
ptNewMetalTexture->tTexture.label = [NSString stringWithUTF8String:ptNewTexture->tView.pcDebugName];
ptNewMetalTexture->uHeap = ptOldMetalTexture->uHeap;
return tHandle;
}
Expand Down Expand Up @@ -2690,6 +2692,7 @@
pl_sb_free(ptDevice->sbtRenderPassesHot[i].atRenderPassDescriptors[j].sbptRenderPassDescriptor);
}
}
pl_sb_free(ptDevice->sbuFreeHeaps);
pl_sb_free(ptDevice->sbtTexturesHot);
pl_sb_free(ptDevice->sbtSamplersHot);
pl_sb_free(ptDevice->sbtBindGroupsHot);
Expand Down

0 comments on commit 21bb2a8

Please sign in to comment.