Skip to content

Commit

Permalink
sokol_gfx.h wgpu: remove wgpuTexture/BufferDestroy calls to allow dis…
Browse files Browse the repository at this point in the history
…carding resources which are currently in flight
  • Loading branch information
floooh committed Aug 30, 2024
1 parent 6ff211f commit 51bdc3e
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions sokol_gfx.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 51bdc3e

Please sign in to comment.