Merge pull request #3750 from wwylele/cube-watcher-fix
gl_rasterizer_cache: add missing watcher invalidation
This commit is contained in:
commit
7715fd2c19
1 changed files with 6 additions and 0 deletions
|
@ -325,6 +325,8 @@ static bool FillSurface(const Surface& surface, const u8* fill_data,
|
|||
state.draw.draw_framebuffer = draw_fb_handle;
|
||||
state.Apply();
|
||||
|
||||
surface->InvalidateAllWatcher();
|
||||
|
||||
if (surface->type == SurfaceType::Color || surface->type == SurfaceType::Texture) {
|
||||
glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D,
|
||||
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))
|
||||
return false;
|
||||
|
||||
dst_surface->InvalidateAllWatcher();
|
||||
|
||||
return BlitTextures(src_surface->texture.handle, src_rect, dst_surface->texture.handle,
|
||||
dst_rect, src_surface->type, read_framebuffer.handle,
|
||||
draw_framebuffer.handle);
|
||||
|
@ -1417,10 +1421,12 @@ SurfaceSurfaceRect_Tuple RasterizerCacheOpenGL::GetFramebufferSurfaces(
|
|||
if (color_surface != nullptr) {
|
||||
ValidateSurface(color_surface, boost::icl::first(color_vp_interval),
|
||||
boost::icl::length(color_vp_interval));
|
||||
color_surface->InvalidateAllWatcher();
|
||||
}
|
||||
if (depth_surface != nullptr) {
|
||||
ValidateSurface(depth_surface, boost::icl::first(depth_vp_interval),
|
||||
boost::icl::length(depth_vp_interval));
|
||||
depth_surface->InvalidateAllWatcher();
|
||||
}
|
||||
|
||||
return std::make_tuple(color_surface, depth_surface, fb_rect);
|
||||
|
|
Loading…
Reference in a new issue