mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-11-15 07:10:05 +00:00
Merge pull request #2251 from bunnei/skip-zero-flush
gl_rasterizer: Skip zero addr/sized regions on flush/invalidate.
This commit is contained in:
commit
41566c615b
@ -749,11 +749,17 @@ void RasterizerOpenGL::FlushAll() {}
|
|||||||
|
|
||||||
void RasterizerOpenGL::FlushRegion(CacheAddr addr, u64 size) {
|
void RasterizerOpenGL::FlushRegion(CacheAddr addr, u64 size) {
|
||||||
MICROPROFILE_SCOPE(OpenGL_CacheManagement);
|
MICROPROFILE_SCOPE(OpenGL_CacheManagement);
|
||||||
|
if (!addr || !size) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
res_cache.FlushRegion(addr, size);
|
res_cache.FlushRegion(addr, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RasterizerOpenGL::InvalidateRegion(CacheAddr addr, u64 size) {
|
void RasterizerOpenGL::InvalidateRegion(CacheAddr addr, u64 size) {
|
||||||
MICROPROFILE_SCOPE(OpenGL_CacheManagement);
|
MICROPROFILE_SCOPE(OpenGL_CacheManagement);
|
||||||
|
if (!addr || !size) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
res_cache.InvalidateRegion(addr, size);
|
res_cache.InvalidateRegion(addr, size);
|
||||||
shader_cache.InvalidateRegion(addr, size);
|
shader_cache.InvalidateRegion(addr, size);
|
||||||
global_cache.InvalidateRegion(addr, size);
|
global_cache.InvalidateRegion(addr, size);
|
||||||
|
Loading…
Reference in New Issue
Block a user