mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-03 12:08:06 +02:00
mesa: use unsigned types when performing bitshifting
Ensure unsigned integers are used instead of signed ones when performing left bit shifts. This has been detected by the Undefined Behaviour Sanitizer (UBSan). Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29772>
This commit is contained in:
parent
017bd4bf25
commit
91593adc93
1 changed files with 1 additions and 1 deletions
|
|
@ -1032,7 +1032,7 @@ _mesa_ColorMaski(GLuint buf, GLboolean red, GLboolean green,
|
|||
|
||||
FLUSH_VERTICES(ctx, 0, GL_COLOR_BUFFER_BIT);
|
||||
ctx->NewDriverState |= ST_NEW_BLEND;
|
||||
ctx->Color.ColorMask &= ~(0xf << (4 * buf));
|
||||
ctx->Color.ColorMask &= ~(0xfu << (4 * buf));
|
||||
ctx->Color.ColorMask |= mask << (4 * buf);
|
||||
_mesa_update_allow_draw_out_of_order(ctx);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue