4 ms·
There's two big limits in graphics rendering: the actual rendering calculations (upgrading to a faster GPU helps here), and transferring data/instructions from
by thristian 4y ago
There's two big limits in graphics rendering: the actual rendering calculations (upgrading to a faster GPU helps here), and transferring data/instructions from CPU RAM to video RAM (using a faster PCI protocol helps here). Getting top-notch graphical performance out of a modern GPU involves carefully designing the system to deliver all the graphics data and instructions for a given frame to the GPU just in time for it to begin rendering, so it has the maximum amount of time to complete the rendering calculations before scanning out the result to the display.
The trouble is, unless we're talking about the operating system for a modern video game console, the kernel is not interested in re-architecting its graphics rendering for maximum throughput, it wants to keep things as simple as possible. That's partially because kernel code needs to be super-reliable, and also because (unlike a modern video game) it needs to support all kinds of output from modern high-end GPUs to simple memory-mapped bitmap displays to character-at-a-time serial ports, so lowest-common-denominator code wins.
In a classic 1990s PC, to write a character to the screen, the CPU can write a single byte directly into the text-display part of the VGA card's memory, and a fraction of a millisecond later the VGA hardware is looking up that byte in the character ROM and sending electrical pulses down the VGA cable.
In a modern PC, if the CPU wants to write a single character to the screen, it probably needs to write each pixel separately, each pixel is three or four bytes, and writing a pixel probably requires making a change to CPU RAM, preparing a command buffer, creating an "update texture" command, uploading the entire screen contents as the new texture, signalling to the GPU that a command buffer is ready, waiting for the GPU to signal that it's ready to receive, sending the command + data, and waiting for the GPU to signal that it's successfully received the data. And then the GPU actually has to draw the output into its own framebuffer, and send that to the monitor.
A modern PC can send all that data much more quickly than a 1990s PC could, but the 1990s PC is much simpler, so it has much less data to send.