mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 07:18:17 +02:00
pvr: fix texel unwind workaround mappings
Fix the rectangle mappings used with texel unwind workaround (unaligned address). Signed-off-by: Oskar Rundgren <oskar.rundgren@imgtec.com> Reviewed-by: Frank Binns <frank.binns@imgtec.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22958>
This commit is contained in:
parent
9d7b35bf8e
commit
1f36901ad9
1 changed files with 7 additions and 4 deletions
|
|
@ -4887,20 +4887,22 @@ static void pvr_unwind_rects(uint32_t width,
|
|||
|
||||
mappings[new_mapping] = mappings[i];
|
||||
|
||||
new_rect->extent.width =
|
||||
(new_rect->extent.width + new_rect->offset.x) - split_point;
|
||||
rect->extent.width = split_point - rect->offset.x;
|
||||
new_rect->offset.x = split_point;
|
||||
|
||||
if (input) {
|
||||
mappings[i].dst_rect.extent.width -= new_rect->extent.width;
|
||||
mappings[i].dst_rect.extent.width -=
|
||||
new_rect->extent.width - split_point;
|
||||
mappings[new_mapping].dst_rect.offset.x =
|
||||
mappings[i].dst_rect.offset.x +
|
||||
mappings[i].dst_rect.extent.width;
|
||||
} else {
|
||||
mappings[i].src_rect.extent.width -= new_rect->extent.width;
|
||||
mappings[i].src_rect.extent.width -=
|
||||
new_rect->extent.width - split_point;
|
||||
mappings[new_mapping].src_rect.offset.x =
|
||||
mappings[i].src_rect.offset.x +
|
||||
mappings[i].src_rect.extent.width;
|
||||
mappings[new_mapping].src_rect.extent.width = texel_unwind;
|
||||
}
|
||||
|
||||
rect->offset.x += texel_unwind;
|
||||
|
|
@ -4909,6 +4911,7 @@ static void pvr_unwind_rects(uint32_t width,
|
|||
new_rect->offset.x =
|
||||
(int32_t)texel_unwind - (int32_t)width + new_rect->offset.x;
|
||||
new_rect->offset.y++;
|
||||
new_rect->extent.width = texel_unwind - width + new_rect->extent.width;
|
||||
|
||||
new_mappings++;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue