mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-10 00:41:26 +12:00
rsx: Bounds check on local resource for atlas merge.
- Local resources can also have padded pitch dimensions and false-positives on range overlap tests
This commit is contained in:
parent
63f9b8e0c6
commit
48cb265c2c
1 changed files with 8 additions and 0 deletions
|
@ -1753,6 +1753,14 @@ namespace rsx
|
||||||
const auto clipped = rsx::intersect_region(address, slice_w, slice_h, bpp,
|
const auto clipped = rsx::intersect_region(address, slice_w, slice_h, bpp,
|
||||||
section->get_section_base(), normalized_width, section->get_height(), section_bpp, pitch);
|
section->get_section_base(), normalized_width, section->get_height(), section_bpp, pitch);
|
||||||
|
|
||||||
|
// Rect intersection test
|
||||||
|
// TODO: Make the intersection code cleaner with proper 2D regions
|
||||||
|
if (std::get<0>(clipped).x >= section->get_width())
|
||||||
|
{
|
||||||
|
// Overlap lies outside the image area!
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const auto slice_begin = u32(slice * src_slice_h);
|
const auto slice_begin = u32(slice * src_slice_h);
|
||||||
const auto slice_end = u32(slice_begin + slice_h);
|
const auto slice_end = u32(slice_begin + slice_h);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue