Moving the Graphics Card Base Addres instead of buffering
Posted: Thu Mar 17, 2016 8:13 pm
How common and how possible would the following be in a standard way?
I have been thinking that drawing in a screen could be done extremely fast if the base address of the graphics card (the BAR) could be moved to arbitrary regions of memory at runtime instead of relying on double/multiple buffering.
In this way, we could implement a high level stack of buffer pointers, and also a heap of such buffers.
Then, we could start pushing just the address of certain screen-sized buffer and pass it as a parameter for a drawing function.
When we finish drawing, we could, instead of copying the secondary buffer to the screen's frame buffer, just pop it directly into the PCI Base Address Register (BAR) and thus updating the current screen immediately?
If the hardware supported it, we could also move, free up and even page the frame buffer region and probably use it for other purposes (for example when the screen is turned off or when there's a long time away from the computer).