From 862d892e89cfa7f91666d2a4411f36befce16d82 Mon Sep 17 00:00:00 2001 From: Flyinghead Date: Fri, 21 Jun 2019 23:31:45 +0200 Subject: [PATCH] texture corruption resulting from misaligned page unprotection --- core/rend/TexCache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/rend/TexCache.cpp b/core/rend/TexCache.cpp index 8ed8e3219..e68a28ee2 100644 --- a/core/rend/TexCache.cpp +++ b/core/rend/TexCache.cpp @@ -244,7 +244,7 @@ bool VramLockedWriteOffset(size_t offset) } list->clear(); - _vmem_unprotect_vram((u32)offset, PAGE_SIZE); + _vmem_unprotect_vram((u32)(offset & ~PAGE_MASK), PAGE_SIZE); vramlist_lock.Unlock(); }