Comments (2)
Thanks for the bug report! I'll have a look, resource destruction isn't tested in the sokol samples, so that's likely to have slipped through. The timing is good since today I wanted to work on the Oryol-sokol migration for the Metal backend, Oryol has a resource stress test sample which hopefully would also trigger this bug (I'll test that too).
from sokol.
Ok, it was actually 2 problems: first in the garbage-collect function the release-path was never called because the check was broken (as you suspected), and the second part was that the now free pool index was never put back into the 'free queue'.
I made both those things a bit more robust and cleaner now, and I also added a new stress-test to the samples (https://github.com/floooh/sokol-samples/blob/master/metal/releasetest-metal.c), same as your test case, but I'm also creating and destroying the shader and pipeline (and I reduced the resource pool sizes so that the bug would trigger earlier).
Thanks again for the bug report :)
from sokol.
Related Issues (20)
- [sokol_imgui] Manage ImDrawCallback_ResetRenderState HOT 3
- [sokol_gfx] Array of struct uniform HOT 1
- WebGPU samples currently broken. HOT 1
- Regression: swapchains with depth (not depth/stencil) buffers currently broken in Metal. HOT 2
- [sokol_app] A call to GetIntegerv in _sapp_wgl_create_context leaves the stack corrupted HOT 8
- Dear ImGui touch input broken on mobile browsers HOT 12
- sokol_app.h html5: event bubbling followup fixes... HOT 1
- Ability to label command encoders HOT 8
- Possible bug in #define _SAPP_CLEAR_ARC_STRUCT(type, item) HOT 1
- Difference between sokol_app events `KEY_DOWN` and `CHAR` HOT 4
- WebGL2: Emsdk 3.1.52 no longer enables ETC2 and ASTC extensions by default. HOT 1
- Redundant buffer bindings on metal when only changing vertex buffer offset
- Use retained command buffer in sokol_gfx HOT 4
- sokol_app.h: Resize callback is never unregistered giving javascript errors HOT 3
- Mutliple `sg_apply_uniforms` in a pipeline influence other render target HOT 4
- fullscreen working every other time on gnome HOT 1
- Can't Set Float Uniform Variable HOT 3
- WebGPU backend broke in sg_make_pipeline() HOT 1
- [sokol_app] Status of clipboard support on X11? HOT 2
- The WebGL renderer does not produce the same output as the GLES renderer after updating to samplers. HOT 23
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sokol.