It’s tempting to think of modern graphics APIs as requiring a bunch of tedious setup followed by “real computation” in shaders. But pipeline configuration is programming the hardware!
Why “Fixed Function” Is Misleading
GPU hardware contains parameterizable functions implemented in silicon. When you specify a depth format or blend mode, you’re telling the GPU how to compute.
Creating an image view with D24_UNORM_S8_UINT configures depth comparison circuits. Choosing a different depth format, results in different hardware curcits activating, resulting in a different computation.
So there isn’t really a fixed “depth computation” stage in the pipeline. There is no single “I compute depth” circuit.
Another example: Choosing SRGB activates in silico gamma conversion hardware, whereas UNORM bypasses this circuit.
The Architectural View
Why declare all this upfront? Because thousands of shader cores write simultaneously. The hardware must pre-configure memory controllers, depth testing units, and blending circuits before launching parallel execution. Runtime dispatch would destroy performance.
GPUs deliberately require upfront declaration. By forcing programmers to pre-declare computation patterns, the hardware can be configured once before a computation.
The API verbosity maps to silicon complexity. You’re not “just setting up context”. You’re programming dozens of specialized hardware units through their configuration parameters.
Graphics APIs Are Hardware Programming Languages
The Core Misconception
It’s tempting to think of modern graphics APIs as requiring a bunch of tedious setup followed by “real computation” in shaders. But pipeline configuration is programming the hardware!
Why “Fixed Function” Is Misleading
GPU hardware contains parameterizable functions implemented in silicon. When you specify a depth format or blend mode, you’re telling the GPU how to compute.
Creating an image view with
D24_UNORM_S8_UINTconfigures depth comparison circuits. Choosing a different depth format, results in different hardware curcits activating, resulting in a different computation.So there isn’t really a fixed “depth computation” stage in the pipeline. There is no single “I compute depth” circuit.
Another example: Choosing
SRGBactivates in silico gamma conversion hardware, whereasUNORMbypasses this circuit.The Architectural View
Why declare all this upfront? Because thousands of shader cores write simultaneously. The hardware must pre-configure memory controllers, depth testing units, and blending circuits before launching parallel execution. Runtime dispatch would destroy performance.
GPUs deliberately require upfront declaration. By forcing programmers to pre-declare computation patterns, the hardware can be configured once before a computation.
The API verbosity maps to silicon complexity. You’re not “just setting up context”. You’re programming dozens of specialized hardware units through their configuration parameters.