1
0
Fork 1
forked from suyu/suyu

Merge pull request #2251 from bunnei/skip-zero-flush

gl_rasterizer: Skip zero addr/sized regions on flush/invalidate.
This commit is contained in:
bunnei 2019-03-17 01:40:32 -04:00 committed by GitHub
commit 41566c615b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -749,11 +749,17 @@ void RasterizerOpenGL::FlushAll() {}
void RasterizerOpenGL::FlushRegion(CacheAddr addr, u64 size) {
MICROPROFILE_SCOPE(OpenGL_CacheManagement);
if (!addr || !size) {
return;
}
res_cache.FlushRegion(addr, size);
}
void RasterizerOpenGL::InvalidateRegion(CacheAddr addr, u64 size) {
MICROPROFILE_SCOPE(OpenGL_CacheManagement);
if (!addr || !size) {
return;
}
res_cache.InvalidateRegion(addr, size);
shader_cache.InvalidateRegion(addr, size);
global_cache.InvalidateRegion(addr, size);