OSDN Git Service

i965/gen9: Allow fast clears for non-MSRT SRGB buffers
authorNeil Roberts <neil@linux.intel.com>
Tue, 24 Nov 2015 15:34:46 +0000 (16:34 +0100)
committerNeil Roberts <neil@linux.intel.com>
Fri, 11 Dec 2015 18:05:56 +0000 (18:05 +0000)
commit0033c8134401cd4c42845a8e33c001ec62612015
tree11797e5c1c87ecdce7fa0d5953e7e53a11036d35
parent82d459a4230c8fcb96fc5e85d00d2c2f4502d1e0
i965/gen9: Allow fast clears for non-MSRT SRGB buffers

SRGB buffers are not marked as losslessly compressible so previously
they would not be used for fast clears. However in practice the
hardware will never actually see that we are using SRGB buffers for
fast clears if we use the linear equivalent format when clearing and
make sure to resolve the buffer as a linear format before sampling
from it.

This is an important use case because by default the window system
framebuffers are created as SRGB so without this fast clears won't be
used there.

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
src/mesa/drivers/dri/i965/intel_mipmap_tree.c