mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 05:08:08 +02:00
intel/blorp: Fix faked RGB image alignment on XeHP
On XeHP, NPOT and POT formatted surfaces will use different image alignment units when emitting surface states. When BLORP fakes an RGB image as RED, update the image alignment to prevent assert failures when emitting surface states. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12132>
This commit is contained in:
parent
79ad9cda48
commit
1f62cddaf5
1 changed files with 12 additions and 0 deletions
|
|
@ -1785,6 +1785,18 @@ surf_fake_rgb_with_red(const struct isl_device *isl_dev,
|
|||
isl_format_get_layout(info->view.format)->channels.r.bits);
|
||||
|
||||
info->surf.format = info->view.format = red_format;
|
||||
|
||||
if (isl_dev->info->verx10 >= 125) {
|
||||
/* The horizontal alignment is in units of texels for NPOT formats, and
|
||||
* bytes for other formats. Since the only allowed alignment units are
|
||||
* powers of two, there's no way to convert the alignment.
|
||||
*
|
||||
* Thankfully, the value doesn't matter since we're only a single slice.
|
||||
* Pick one allowed by isl_gfx125_choose_image_alignment_el.
|
||||
*/
|
||||
info->surf.image_alignment_el.w =
|
||||
128 / (isl_format_get_layout(red_format)->bpb / 8);
|
||||
}
|
||||
}
|
||||
|
||||
enum blit_shrink_status {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue