From 51bdc3ebbd2cc749dd270316cd0c76c5f90edfe6 Mon Sep 17 00:00:00 2001 From: Andre Weissflog Date: Fri, 30 Aug 2024 18:09:15 +0200 Subject: [PATCH] sokol_gfx.h wgpu: remove wgpuTexture/BufferDestroy calls to allow discarding resources which are currently in flight --- sokol_gfx.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/sokol_gfx.h b/sokol_gfx.h index e636761fa..1038bbf31 100644 --- a/sokol_gfx.h +++ b/sokol_gfx.h @@ -14547,7 +14547,6 @@ _SOKOL_PRIVATE void _sg_wgpu_discard_buffer(_sg_buffer_t* buf) { _sg_wgpu_bindgroups_cache_invalidate(_SG_WGPU_BINDGROUPSCACHEITEMTYPE_STORAGEBUFFER, buf->slot.id); } if (buf->wgpu.buf) { - wgpuBufferDestroy(buf->wgpu.buf); wgpuBufferRelease(buf->wgpu.buf); } } @@ -14689,7 +14688,6 @@ _SOKOL_PRIVATE void _sg_wgpu_discard_image(_sg_image_t* img) { img->wgpu.view = 0; } if (img->wgpu.tex) { - wgpuTextureDestroy(img->wgpu.tex); wgpuTextureRelease(img->wgpu.tex); img->wgpu.tex = 0; }