mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 05:08:08 +02:00
dri: cast constant to uint for bitshift
Define 1 as uint for shifting bits is well-defined. 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
d9eacb05c9
commit
d854dd32fb
1 changed files with 1 additions and 1 deletions
|
|
@ -172,7 +172,7 @@ driCreateConfigs(enum pipe_format format,
|
|||
if (is_float || color_bits[i] == 0)
|
||||
masks[i] = 0;
|
||||
else
|
||||
masks[i] = ((1 << color_bits[i]) - 1) << shifts[i];
|
||||
masks[i] = ((1u << color_bits[i]) - 1) << shifts[i];
|
||||
}
|
||||
|
||||
num_modes = num_zs_formats * num_db_modes * num_accum_bits * num_msaa_modes;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue