What is different about GPU drivers from other device drivers, that allows for performance optimizations?

It seems like the big two GPU makers are constantly releasing updated drivers that have a small performance boosts here and there. When they're for the same game, I bet it adds up over time.

With that in mind, why is it that we never hear about AMD or Intel tweaking CPU drivers for a certain app or version of Windows or something?


Solution 1:

Firstly, there sometimes are cases where a driver patch is released that might boost performance, or increase efficiency, for a certain CPU. But obviously you're asking this question because it's just not that common. What the CPU driver optimizations do is similar in concept, however.

A GPU is a very complicated piece of circuitry. It exists to offload certain tasks that take a very long time to do on a CPU. They receive sets of data, and instructions on what to do with this data. The GPU must be able to order the data in a way that is manageable and interpret the instructions to tell it what to do. Then, it must perform a series of mathematical operations on the data. After that, it must reorder the data again and send the results back to the operating system when it's complete. This is a very simplistic description of the computer graphics pipeline. There are multiple steps that must be taken before the data is ready for the program.

Now, as the GPU must accept sets of instructions and implement very complicated mathematical operations in the hardware, there will be certain things that are known to run faster or slower through this pipeline. Part of writing a driver for a device is interpreting data and instructions sent to the device, translating it so that the device can understand it. When a driver is doing this, it can make decisions on how to send the data to the device so that the tasks will take the shortest amount of time possible. However, a driver generally doesn't have very much information about what the program it's servicing is doing. All it receives from the program are the API calls ("draw a line", "color a point", "shade a triangle", etc). So, the assumptions it can make aren't very good.

When AMD or nVidia releases a driver update that contains performance improvements for specific games, what this means is that the driver will detect what game is calling the graphics hardware, and have a series of hard-coded assumptions that are known about how the game is implemented. It might be that the game has a lot of texture images that need to be quickly swapped in and out of memory, or that it does a lot of color blending on the fly to produce certain lighting effects. Usually what a game will do is implement small programs (called "shaders") that describe how to perform these calculations, and it will be sent to the GPU to execute. If the driver knows how the game uses the hardware, it can organize the data and choose sets of instructions that perform the task desired in a manner that increases throughput and efficiency. Since it knows what to expect, it can essentially "prepare" the GPU and the data so that they get executed as quickly as possible.

Sometimes, though, after the product has been shipped, bugs might be found in some part of the GPU. It might be obscure enough to have been missed in validation when the chip was being designed, but it might be found that it causes some buggy or undesireable behavior (or even crashes) in a particular game that hits it. In that case the driver will detect this buggy state and work around it, either by offloading some calculation to the CPU side or changing how it feeds data to the GPU so that it doesn't enter this state. These, again, will be released in the form of driver updates.

So basically, it's not changing the performance of the hardware itself, it's just changing how it uses the hardware, so that it can operate more efficiently and quickly on the same set of data.

Solution 2:

"CPU drivers" rarely exist, and certainly not as loadable modules. The occasional "CPU driver" would be needed for some variation of multicore control or interrupt handling (e.g. AMD dual-cores needed a WinXP driver for full utilization). Otherwise most OSes are configured and built to access the CPU directly. If an issue appears and is severe, then the kernel code is patched and a kernel update is released.

GPUs are not just peripherals anymore; they have evolved into co-processors. The "GPU driver" does not just provide device access, they include processing algorithms (i.e. graphics subprograms) for the GPU packaged in the driver. The size of these "drivers" is a giveaway/clue. It's these algorithms/subprograms that are being improved.