Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sokol_gfx.h add missing error paths when backend resource creation calls fail #894

Merged
merged 1 commit into from Sep 18, 2023

Conversation

floooh
Copy link
Owner

@floooh floooh commented Sep 18, 2023

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.

@floooh floooh merged commit edcc624 into master Sep 18, 2023
41 checks passed
@floooh floooh deleted the issue884-failed_resource_creation branch September 18, 2023 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant