This adds the missing error code paths (_SG_ERROR log + put object into SG_RESOURCESTATE_FAILED mode) when Metal object creation fails for the following object types:
buffers
textures
samplers
depth-stencil-state (inside sg_make_pipeline())
NOTE: For (Web)GL this isn't possible without involving a full pipeline flush (caused by calling glGetError()), and WebGPU's asynchronous error reporting also doesn't allow to react to out-of-memory-situations at object creation time.
This adds the missing error code paths (_SG_ERROR log + put object into SG_RESOURCESTATE_FAILED mode) when Metal object creation fails for the following object types:
NOTE: For (Web)GL this isn't possible without involving a full pipeline flush (caused by calling glGetError()), and WebGPU's asynchronous error reporting also doesn't allow to react to out-of-memory-situations at object creation time.