mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 23:40:12 +01:00
panfrost: Skip blit shader labelling if the buffer has no space
Fixes stack corruption in dEQP-GLES31.functional.draw_buffers_indexed.
random.max_implementation_draw_buffers.10
Fixes: 8ba2f9f698 ("panfrost: Create a blitter library to replace the existing preload helpers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10792>
This commit is contained in:
parent
938e52a6e8
commit
4da88060d0
1 changed files with 8 additions and 4 deletions
|
|
@ -468,6 +468,14 @@ pan_blitter_get_blit_shader(struct panfrost_device *dev,
|
|||
default: unreachable("Invalid dim\n");
|
||||
}
|
||||
|
||||
coord_comps = MAX2(coord_comps,
|
||||
(key->surfaces[i].dim ? : 3) +
|
||||
(key->surfaces[i].array ? 1 : 0));
|
||||
first = false;
|
||||
|
||||
if (sig_offset >= sizeof(sig))
|
||||
continue;
|
||||
|
||||
sig_offset += snprintf(sig + sig_offset, sizeof(sig) - sig_offset,
|
||||
"%s[%s;%s;%s%s;src_samples=%d,dst_samples=%d]",
|
||||
first ? "" : ",",
|
||||
|
|
@ -476,10 +484,6 @@ pan_blitter_get_blit_shader(struct panfrost_device *dev,
|
|||
key->surfaces[i].array ? "[]" : "",
|
||||
key->surfaces[i].src_samples,
|
||||
key->surfaces[i].dst_samples);
|
||||
first = false;
|
||||
coord_comps = MAX2(coord_comps,
|
||||
(key->surfaces[i].dim ? : 3) +
|
||||
(key->surfaces[i].array ? 1 : 0));
|
||||
}
|
||||
|
||||
nir_builder b =
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue