EGLBE: Support additional named framebuffer functions#286
Open
tahmid-23 wants to merge 2 commits into
Open
Conversation
Since the EGL back end emulates GLX Pbuffers with FBOs, the "default framebuffer"
(0) is really a named FBO. Interpose the remaining named framebuffer functions
that accept the default framebuffer (0) as an argument and translate 0 to the
emulating FBO:
glBlitNamedFramebuffer()
glCheckNamedFramebufferStatus[EXT]()
glClearNamedFramebuffer{iv,uiv,fv,fi}()
glGetFramebufferParameterivEXT()
glGetNamedFramebufferAttachmentParameteriv[EXT]()
glInvalidateNamedFramebuffer{Data,SubData}()
glIsFramebuffer[EXT]() is intentionally not interposed: applications that
iterate the framebuffer namespace (e.g. piglit's object-namespace-pollution test)
rely on it reporting the true availability of names.
Also restrict the existing default-FB attachment OBJECT_TYPE fixup (RENDERBUFFER
-> FRAMEBUFFER_DEFAULT) to the attachment-parameter query for which it applies.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Member
|
Great. I will take a look at this in the coming weeks. Comments/questions:
|
Author
Minecraft (Java Edition) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #136.
This interposes the majority of the remaining named framebuffer functions (as enumerated in the issue) by checking for framebuffer 0.
One minor behavioral change is in
getFramebufferAttachmentParameteriv(), which now checks forpname == GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, since it might replace the parameter value if the original value collides withGL_RENDERBUFFER(which is admittedly pathological). I changed it here since this check also applies togetNamedFramebufferAttachmentParameteriv().