diff options
author | Oskar Rundgren <oskar.rundgren@imgtec.com> | 2023-05-07 12:53:01 +0100 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2023-05-17 08:18:26 +0000 |
commit | 1f36901ad955988934f4108ffaf58d4303c57af2 (patch) | |
tree | 63a9dfcbf64f0e9844ee7e08e913e4094eb52b69 | |
parent | 9d7b35bf8eb24bd2ccb29eddb77ad26888cbf6d6 (diff) | |
download | mesa-1f36901ad955988934f4108ffaf58d4303c57af2.tar.gz |
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>
-rw-r--r-- | src/imagination/vulkan/pvr_job_transfer.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/imagination/vulkan/pvr_job_transfer.c b/src/imagination/vulkan/pvr_job_transfer.c index 95b82d32b0c..bd208a0d14d 100644 --- a/src/imagination/vulkan/pvr_job_transfer.c +++ b/src/imagination/vulkan/pvr_job_transfer.c @@ -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++; } |