radv: fix signed integer overflow
Fixes UBSan error: src/amd/vulkan/radv_shader_info.c:78:41: 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/25432>
This commit is contained in:
@@ -75,7 +75,7 @@ gather_intrinsic_store_output_info(const nir_shader *nir, const nir_intrinsic_in
|
||||
break;
|
||||
case MESA_SHADER_FRAGMENT:
|
||||
if (idx >= FRAG_RESULT_DATA0) {
|
||||
info->ps.colors_written |= 0xf << (4 * (idx - FRAG_RESULT_DATA0));
|
||||
info->ps.colors_written |= 0xfu << (4 * (idx - FRAG_RESULT_DATA0));
|
||||
|
||||
if (idx == FRAG_RESULT_DATA0)
|
||||
info->ps.color0_written = write_mask;
|
||||
|
||||
Reference in New Issue
Block a user