mesa: Add an option so driver can opt out of varying packing.
authorPaul Berry <stereotype441@gmail.com>
Thu, 13 Dec 2012 20:45:37 +0000 (12:45 -0800)
committerPaul Berry <stereotype441@gmail.com>
Fri, 14 Dec 2012 18:49:32 +0000 (10:49 -0800)
commit6ee500cfd28324bef27f145fbe03e77993810c45
tree5b8ce8b22ddaaf7dd1afeed00b6f78455f1176cf
parent1745a4d751a4184771628ad2be1336439c831afb
mesa: Add an option so driver can opt out of varying packing.

On hardware that supports a limited number of texture indirections,
varying packing will comsume an extra texture indirection, since ALU
operations are needed in the fragment shader to unpack the varyings
before any texturing can be done.

This patch introduces a new driver option,
ctx->Const.DisableVaryingPacking, which can be used by a driver to opt
out of varying packing if the extra texture indirection is costly
enough to outweigh the advantages of packing varyings.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
src/mesa/main/mtypes.h