From 3671fd0a97351c1e5b2ea691d85ab45d5f83288e Mon Sep 17 00:00:00 2001 From: ameerj <52414509+ameerj@users.noreply.github.com> Date: Fri, 7 May 2021 22:14:21 -0400 Subject: texture_cache: Handle out of bound texture blits Some games interleave a texture blit using regions which are out-of-bounds. This addresses the interleaving to avoid oob reads from the src texture. --- src/video_core/texture_cache/types.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/video_core/texture_cache/types.h') diff --git a/src/video_core/texture_cache/types.h b/src/video_core/texture_cache/types.h index 2ad2d72a6..c9571f7e4 100644 --- a/src/video_core/texture_cache/types.h +++ b/src/video_core/texture_cache/types.h @@ -64,6 +64,13 @@ struct Offset3D { s32 z; }; +struct Region2D { + constexpr auto operator<=>(const Region2D&) const noexcept = default; + + Offset2D start; + Offset2D end; +}; + struct Extent2D { constexpr auto operator<=>(const Extent2D&) const noexcept = default; -- cgit v1.2.3