Skip to content

Commit ccbc349

Browse files
committed
fix: metal gfx backend sampler funcs missing
1 parent 48fabc4 commit ccbc349

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

extensions/pl_graphics_metal.m

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080

8181
typedef struct _plMetalFrameBuffer
8282
{
83-
MTLRenderPassDescriptor** sbptRenderPassDescriptor;
83+
MTLRenderPassDescriptor** sbptRenderPassDescriptor; // one per subpass
8484
} plMetalFrameBuffer;
8585

8686
typedef struct _plMetalRenderPass
@@ -3513,6 +3513,16 @@
35133513

35143514
}
35153515

3516+
void
3517+
pl_destroy_sampler(plDevice* ptDevice, plSamplerHandle tHandle)
3518+
{
3519+
pl_log_trace_f(gptLog, uLogChannelGraphics, "destroy sampler %u immediately", tHandle.uIndex);
3520+
[ptDevice->sbtSamplersHot[tHandle.uIndex].tSampler release];
3521+
ptDevice->sbtSamplersHot[tHandle.uIndex].tSampler = nil;
3522+
ptDevice->sbtSamplersCold[tHandle.uIndex]._uGeneration++;
3523+
pl_sb_push(ptDevice->sbtSamplerFreeIndices, tHandle.uIndex);
3524+
}
3525+
35163526
static void
35173527
pl_destroy_compute_shader(plDevice* ptDevice, plComputeShaderHandle tHandle)
35183528
{

0 commit comments

Comments
 (0)