Have to invalidate "lastBoundTexture" when binding framebuffers as texture.

Fixes parts of #13431 for D3D11 at least.

Will probably soon get rid of this concept, it's only useful in D3D9/11 and
those are probably not gonna lose much perf if we remove this minor
state caching.
This commit is contained in:
Henrik Rydgård 2020-09-20 20:42:28 +02:00
parent 707e9cf7ac
commit bdcf2c5cff
2 changed files with 2 additions and 0 deletions

View file

@ -1588,6 +1588,7 @@ void TextureCacheCommon::ApplyTexture() {
// Maybe we bound a framebuffer?
if (nextFramebufferTexture_) {
bool depth = Memory::IsDepthTexVRAMAddress(gstate.getTextureAddress(0));
InvalidateLastTexture();
ApplyTextureFramebuffer(nextFramebufferTexture_, gstate.getTextureFormat(), depth ? NOTIFY_FB_DEPTH : NOTIFY_FB_COLOR);
nextFramebufferTexture_ = nullptr;
}