floooh / sokol

minimal cross-platform standalone C headers
https://floooh.github.io/sokol-html5
zlib License
6.94k stars 488 forks source link

Fix cases where failing to create a backend resource doesn't result in SG_RESOURCESTATE_FAILED. #884

Closed floooh closed 1 year ago

floooh commented 1 year ago

See: https://github.com/floooh/sokol/pull/883

floooh commented 1 year ago

Fixed for Metal, but in GL or WebGPU this isn't really fixable for out-of-memory situations. In GL, calling glGetError() causes a full pipeline flush in WebGL, and with WebGPU's asynchronous error reporting it's also not possible to immediately return an out-of-memory error at object creation time.

floooh commented 1 year ago

PR: https://github.com/floooh/sokol/pull/894

floooh commented 1 year ago

Fixed.