i965: Skip uploading border color when unnecessary.
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 26 Jul 2014 08:16:27 +0000 (01:16 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 9 Oct 2014 13:43:18 +0000 (15:43 +0200)
commit4ce11de4ae356375833cb403711f5af1ed681965
tree30947c344a5f4f0a0f6a755645a2cc7dca8b3fda
parentb7844d12487dbac702ecd734faeffa6fe1a61a83
i965: Skip uploading border color when unnecessary.

The border color is only needed when using the GL_CLAMP_TO_BORDER or
(deprecated) GL_CLAMP wrap modes; all others ignore it, including the
common GL_CLAMP_TO_EDGE and GL_REPEAT wrap modes.

In those cases, we can skip uploading it entirely, saving a bit of space
in the batchbuffer.  Instead, we just point it at the start of the
batch (offset 0); we have to program something, and that address is safe
to read.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
src/mesa/drivers/dri/i965/brw_sampler_state.c