mesa: Use SATURATE
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5100>
This commit is contained in:

committed by
Marge Bot

parent
0f1fde1faf
commit
05bacdb917
@@ -440,10 +440,10 @@ _mesa_fetch_state(struct gl_context *ctx, const gl_state_index16 state[],
|
||||
if(ctx->Light._ClampVertexColor &&
|
||||
(idx == VERT_ATTRIB_COLOR0 ||
|
||||
idx == VERT_ATTRIB_COLOR1)) {
|
||||
value[0] = CLAMP(ctx->Current.Attrib[idx][0], 0.0f, 1.0f);
|
||||
value[1] = CLAMP(ctx->Current.Attrib[idx][1], 0.0f, 1.0f);
|
||||
value[2] = CLAMP(ctx->Current.Attrib[idx][2], 0.0f, 1.0f);
|
||||
value[3] = CLAMP(ctx->Current.Attrib[idx][3], 0.0f, 1.0f);
|
||||
value[0] = SATURATE(ctx->Current.Attrib[idx][0]);
|
||||
value[1] = SATURATE(ctx->Current.Attrib[idx][1]);
|
||||
value[2] = SATURATE(ctx->Current.Attrib[idx][2]);
|
||||
value[3] = SATURATE(ctx->Current.Attrib[idx][3]);
|
||||
}
|
||||
else
|
||||
COPY_4V(value, ctx->Current.Attrib[idx]);
|
||||
|
Reference in New Issue
Block a user