mesa: don't set _ClampFragmentColor to TRUE if it has no effect

This should reduce shader recompilations with drivers that emulate fragment
color clamping, because we want the clamping to be enabled only if there is
a signed normalized or floating-point colorbuffer.

Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
Marek Olšák
2013-03-28 01:56:01 +01:00
parent 21d407c1b8
commit 755648c37f
13 changed files with 37 additions and 21 deletions

View File

@@ -86,8 +86,7 @@ update_fp( struct st_context *st )
/* _NEW_FRAG_CLAMP */
key.clamp_color = st->clamp_frag_color_in_shader &&
st->ctx->Color._ClampFragmentColor &&
!st->ctx->DrawBuffer->_IntegerColor;
st->ctx->Color._ClampFragmentColor;
st->fp_variant = st_get_fp_variant(st, stfp, &key);