amdgpu 4k at 120Hz / HDMI 2.1

Michel Dänzer michel.daenzer at mailbox.org
Thu Jan 9 14:57:15 UTC 2025


On 2025-01-09 12:00, Mischa Baars wrote:
> On Mon, Jan 6, 2025 at 4:41 PM Michel Dänzer
> <michel.daenzer at mailbox.org <mailto:michel.daenzer at mailbox.org>>
> wrote:
> 
>> 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.

That's much lower level than OpenGL. OpenGL implementations can and do internally use page flipping under the right circumstances, it cannot be enforced via OpenGL / GLX / EGL APIs though, it's an implementation detail.


> 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.

The OpenGL app can use single-buffered drawing to GL_FRONT if it doesn't care about the artifacts possible without double buffering.


> 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?

A big point of GL_BACK (and double buffering in general) is that it's not what's currently visible on screen, so there can be no artifacts due to visible unfinished frame contents.


-- 
Earthling Michel Dänzer       \        GNOME / Xwayland / Mesa developer
https://redhat.com             \               Libre software enthusiast


More information about the amd-gfx mailing list