panfrost: Mark (1 << 31) as unsigned
I was not aware this incurred undefined behaviour; thank you cppcheck. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
This commit is contained in:
committed by
Tomeu Vizoso
parent
a058e90138
commit
6bd18bb264
@@ -221,7 +221,7 @@ panfrost_vertex_instanced(
|
||||
unsigned m = m_f;
|
||||
|
||||
/* Default case */
|
||||
unsigned magic_divisor = m, extra_flags = 0;
|
||||
uint32_t magic_divisor = m, extra_flags = 0;
|
||||
|
||||
/* e = 2^(shift + 32) % d */
|
||||
uint64_t e = t % hw_divisor;
|
||||
@@ -234,8 +234,8 @@ panfrost_vertex_instanced(
|
||||
}
|
||||
|
||||
/* Top flag implicitly set */
|
||||
assert(magic_divisor & (1 << 31));
|
||||
magic_divisor &= ~(1 << 31);
|
||||
assert(magic_divisor & (1u << 31));
|
||||
magic_divisor &= ~(1u << 31);
|
||||
|
||||
/* Upload to two different slots */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user