mirror of
https://github.com/libretro/ppsspp.git
synced 2024-11-28 02:41:18 +00:00
Merge pull request #6532 from unknownbrackets/gpu-minor
Avoid a texture offset if framebuf attach fails
This commit is contained in:
commit
00c54a82a8
@ -1005,9 +1005,7 @@ bool SetDebugTexture() {
|
||||
#endif
|
||||
|
||||
void TextureCache::SetTextureFramebuffer(TexCacheEntry *entry, VirtualFramebuffer *framebuffer) {
|
||||
if (framebuffer == nullptr) {
|
||||
return;
|
||||
}
|
||||
_dbg_assert_msg_(G3D, framebuffer != nullptr, "Framebuffer must not be null.");
|
||||
|
||||
framebuffer->usageFlags |= FB_USAGE_TEXTURE;
|
||||
bool useBufferedRendering = g_Config.iRenderingMode != FB_NON_BUFFERED_MODE;
|
||||
@ -1137,13 +1135,14 @@ bool TextureCache::SetOffsetTexture(u32 offset) {
|
||||
}
|
||||
}
|
||||
|
||||
if (success) {
|
||||
if (success && entry->framebuffer) {
|
||||
SetTextureFramebuffer(entry, entry->framebuffer);
|
||||
lastBoundTexture = -1;
|
||||
entry->lastFrame = gpuStats.numFlips;
|
||||
return true;
|
||||
}
|
||||
|
||||
return success;
|
||||
return false;
|
||||
}
|
||||
|
||||
void TextureCache::SetTexture(bool force) {
|
||||
|
Loading…
Reference in New Issue
Block a user