mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Avoid a texture offset if framebuf attach fails.
But, I'm not sure in what case this could happen.
This commit is contained in:
parent
41601d714b
commit
f553b632be
1 changed files with 4 additions and 5 deletions
|
@ -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…
Add table
Reference in a new issue