arjan de lumens
Veteran
Luminescent said:I am fairly new to programming and processing architectues in general (now learning C), and would like to know why it is such a big deal to have the pixel pipelines running in sync? Why no branches? It seems to be alright to branch in the vertex pipelines.
Apparently, it is possible to save a lot of hardware by dong pixel setup in sync for pixel pipelines set up in a NxM (typically 2x2 for 4 pipes) pixel grid. Also, by running pixel programs in sync, you can share a single program memory between all the pixel pipes, which also saves a bit of hardware.
Finally, computing the derivatives of a datum (typically the content of a pixel shader register) with respect to screen X and Y can be done by calculating the difference of the datum between 2 adjacent pixels; if you run at least 2x2 pixel pipes in lockstep, the datum for at least 1 adjacent pixel along either X or Y axis is always available from an adjacent pipeline. If the pipelines fall out of sync, the derivatives cannot be meaningfully calculated this way.These derivatives are needed to do proper mipapping and anisotropic mapping with EMBM/dependent texturing/procedural texturing. In DX9, there are also instructions - DDX and DDY - to read out these derivatives directly.