in `a << b` with gcc 13 the shift count c is masked by the
bit count, and a value larger than 32 will result in shifts
by (c & 0x1f), which will add empty instructions if all
color outputs are written and this will eventually
result in an OOM error.
Fixes:
201b46e487d3aecda005973b0b46a514184eec4b
r600/sfn: on R600/R700 write a dummy pixel output if there is a gap
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23945>
unsigned i = 0;
unsigned mask = m_color_export_mask;
- while (mask & (1u << (4 * i))) {
+ while (i < m_max_color_exports && (mask & (1u << (4 * i)))) {
if (!(m_color_export_written_mask & (1u << i))) {
RegisterVec4 value(0, false, {7, 7, 7, 7});
m_last_pixel_export = new ExportInstr(ExportInstr::pixel, i, value);