amdgpu 4k at 120Hz / HDMI 2.1
Mischa Baars
mjbaars1977.backup at gmail.com
Thu Jan 9 11:00:56 UTC 2025
On Mon, Jan 6, 2025 at 4:41 PM Michel Dänzer <michel.daenzer at mailbox.org>
wrote:
> Yeah, that's not how double-buffering works in GL. The draw buffer is
always GL_BACK, SwapBuffers doesn't affect that (it just may internally
change which actual buffer GL_BACK refers to).
>
> I don't see more context about the issue you're investigating, any
pointers?
I'm sort of a fan of Michael Abrash, as he inspired me to learn programming
assembly language a long time ago, but in his Graphics Programming Black
Book, Chapter 23
<https://www.phatcode.net/res/224/files/html/ch23/23-03.html#Heading6> he
shows how the CRTC Index Register is used to change what is shown on the
screen by alternating between two memory pages at PAGE0_OFFSET and
PAGE1_OFFSET. I was under the impression that OpenGL used a similar
approach with GL_FRONT and GL_BACK, hence I was expecting GL_DRAW_BUFFER to
alternate between the two. On closer inspection of the glXSwapBuffers()
<https://registry.khronos.org/OpenGL-Refpages/gl2.1/xhtml/glXSwapBuffers.xml>
reference page, it indeed does not say anything about alternating
GL_DRAW_BUFFERs. I must have misread, with the above concept in mind. The
glDrawBuffer()
<https://registry.khronos.org/OpenGL-Refpages/gl4/html/glDrawBuffer.xhtml>
reference page however does speak of initial values for double buffered
contexts and the use of both front and back buffers.
Can you explain to me why we are only drawing in GL_BACK and how that
relates to what portion of memory is shown on the screen?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20250109/e862009d/attachment.htm>
More information about the amd-gfx
mailing list