citra-emu
/
citra-canary
Archived
1
0
Fork 0

Merge pull request #3750 from wwylele/cube-watcher-fix

gl_rasterizer_cache: add missing watcher invalidation
This commit is contained in:
James Rowe 2018-05-31 23:11:39 -06:00 committed by GitHub
commit 7715fd2c19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -325,6 +325,8 @@ static bool FillSurface(const Surface& surface, const u8* fill_data,
state.draw.draw_framebuffer = draw_fb_handle; state.draw.draw_framebuffer = draw_fb_handle;
state.Apply(); state.Apply();
surface->InvalidateAllWatcher();
if (surface->type == SurfaceType::Color || surface->type == SurfaceType::Texture) { if (surface->type == SurfaceType::Color || surface->type == SurfaceType::Texture) {
glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D,
surface->texture.handle, 0); surface->texture.handle, 0);
@ -1020,6 +1022,8 @@ bool RasterizerCacheOpenGL::BlitSurfaces(const Surface& src_surface,
if (!SurfaceParams::CheckFormatsBlittable(src_surface->pixel_format, dst_surface->pixel_format)) if (!SurfaceParams::CheckFormatsBlittable(src_surface->pixel_format, dst_surface->pixel_format))
return false; return false;
dst_surface->InvalidateAllWatcher();
return BlitTextures(src_surface->texture.handle, src_rect, dst_surface->texture.handle, return BlitTextures(src_surface->texture.handle, src_rect, dst_surface->texture.handle,
dst_rect, src_surface->type, read_framebuffer.handle, dst_rect, src_surface->type, read_framebuffer.handle,
draw_framebuffer.handle); draw_framebuffer.handle);
@ -1417,10 +1421,12 @@ SurfaceSurfaceRect_Tuple RasterizerCacheOpenGL::GetFramebufferSurfaces(
if (color_surface != nullptr) { if (color_surface != nullptr) {
ValidateSurface(color_surface, boost::icl::first(color_vp_interval), ValidateSurface(color_surface, boost::icl::first(color_vp_interval),
boost::icl::length(color_vp_interval)); boost::icl::length(color_vp_interval));
color_surface->InvalidateAllWatcher();
} }
if (depth_surface != nullptr) { if (depth_surface != nullptr) {
ValidateSurface(depth_surface, boost::icl::first(depth_vp_interval), ValidateSurface(depth_surface, boost::icl::first(depth_vp_interval),
boost::icl::length(depth_vp_interval)); boost::icl::length(depth_vp_interval));
depth_surface->InvalidateAllWatcher();
} }
return std::make_tuple(color_surface, depth_surface, fb_rect); return std::make_tuple(color_surface, depth_surface, fb_rect);