mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-28 04:24:15 +01:00
Fix broken surface validation logic since removal of the reinterpret hack
This commit is contained in:
parent
f893daa4a2
commit
9a6a452857
@ -1271,10 +1271,8 @@ void RasterizerCacheOpenGL::ValidateSurface(const Surface& surface, PAddr addr,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto validate_regions = surface->invalid_regions & validate_interval;
|
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
const auto it = validate_regions.begin();
|
const auto it = surface->invalid_regions.find(validate_interval);
|
||||||
if (it == surface->invalid_regions.end())
|
if (it == surface->invalid_regions.end())
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -1287,7 +1285,7 @@ void RasterizerCacheOpenGL::ValidateSurface(const Surface& surface, PAddr addr,
|
|||||||
if (copy_surface != nullptr) {
|
if (copy_surface != nullptr) {
|
||||||
SurfaceInterval copy_interval = params.GetCopyableInterval(copy_surface);
|
SurfaceInterval copy_interval = params.GetCopyableInterval(copy_surface);
|
||||||
CopySurface(copy_surface, surface, copy_interval);
|
CopySurface(copy_surface, surface, copy_interval);
|
||||||
validate_regions.erase(interval);
|
surface->invalid_regions.erase(interval);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1295,7 +1293,7 @@ void RasterizerCacheOpenGL::ValidateSurface(const Surface& surface, PAddr addr,
|
|||||||
FlushRegion(params.addr, params.size);
|
FlushRegion(params.addr, params.size);
|
||||||
surface->LoadGLBuffer(params.addr, params.end);
|
surface->LoadGLBuffer(params.addr, params.end);
|
||||||
surface->UploadGLTexture(surface->GetSubRect(params));
|
surface->UploadGLTexture(surface->GetSubRect(params));
|
||||||
validate_regions.erase(interval);
|
surface->invalid_regions.erase(interval);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user