mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
radv: fix shift overflow in radv_pipeline_init_dynamic_state
Fixes UBSan error with thewitness/005aa77325a11410: runtime error: left shift of 15 by 28 places cannot be represented in type 'int' Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37055>
This commit is contained in:
parent
1105f7b98f
commit
7f5c84d7ac
1 changed files with 1 additions and 1 deletions
|
|
@ -1107,7 +1107,7 @@ radv_pipeline_init_dynamic_state(const struct radv_device *device, struct radv_g
|
|||
|
||||
if (states & RADV_DYNAMIC_COLOR_WRITE_MASK) {
|
||||
for (unsigned i = 0; i < state->cb->attachment_count; i++) {
|
||||
dynamic->color_write_mask |= state->cb->attachments[i].write_mask << (4 * i);
|
||||
dynamic->color_write_mask |= (uint32_t)state->cb->attachments[i].write_mask << (4 * i);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue