Skip to content

[WebGL] blitOffscreenFramebuffer: handle already-deleted program #23980

New issue

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

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

Already on GitHub? # to your account

Merged
merged 3 commits into from
Apr 16, 2025

Conversation

kainino0x
Copy link
Collaborator

@kainino0x kainino0x commented Mar 25, 2025

See comment for explanation.

Issue: #23654
See the other PR for additional discussion: #23658 (comment)

See comment for explanation.

Fixes 23654. See the other PR for additional discussion:
emscripten-core#23658 (comment)
@kainino0x kainino0x marked this pull request as ready for review March 25, 2025 02:04
@kenrussell
Copy link
Collaborator

Unfortunately yes, due to OpenGL's rules I think this is the best that can be done in this situation.

@kainino0x kainino0x marked this pull request as draft March 25, 2025 02:06
@kainino0x kainino0x marked this pull request as ready for review March 25, 2025 02:19
@kainino0x kainino0x requested a review from juj March 25, 2025 02:19
@kainino0x
Copy link
Collaborator Author

Thank you for the confirmation Ken!

@kainino0x kainino0x requested a review from kripken April 10, 2025 21:42
Copy link
Member

@kripken kripken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL about the lifetime management of GL objects... interesting.

@kainino0x
Copy link
Collaborator Author

TIL about the lifetime management of GL objects... interesting.

Most objects (like buffers) are automatically unbound when they're deleted. Not so for programs. Also, IIRC, not so for bindings that exist inside of a VAO if that VAO is not current (so the binding is not active, but can be reactivated by activating the VAO). I think that case behaves similarly.

@kainino0x kainino0x merged commit 08775a3 into emscripten-core:main Apr 16, 2025
28 checks passed
@kainino0x kainino0x deleted the restore branch April 16, 2025 00:56
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants