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:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user