Keep framebuffer sources alive.

Hopefully this is not too dangerous...
This commit is contained in:
Unknown W. Brackets 2013-09-01 11:41:11 -07:00
parent 49902ed4dc
commit ac56a7ee65

View File

@ -978,6 +978,9 @@ void TextureCache::SetTextureFramebuffer(TexCacheEntry *entry)
// But let's still not use random memory.
if (entry->framebuffer->fbo && entry->invalidHint != -1) {
fbo_bind_color_as_texture(entry->framebuffer->fbo, 0);
// Keep the framebuffer alive.
// TODO: Dangerous if it sets a new one?
entry->framebuffer->last_frame_used = gpuStats.numFlips;
} else {
glBindTexture(GL_TEXTURE_2D, 0);
gstate_c.skipDrawReason |= SKIPDRAW_BAD_FB_TEXTURE;