mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-11 05:26:24 +02:00
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:
1 parent
707e9cf7ac
commit
bdcf2c5cff
2 files changed
+2
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
@@ -145,6 +145,7 @@ void TextureCacheD3D11::ReleaseTexture(TexCacheEntry *entry, bool delete_them) {
|
||||
void TextureCacheD3D11::ForgetLastTexture() {
|
||||
InvalidateLastTexture();
|
||||
gstate_c.Dirty(DIRTY_TEXTURE_PARAMS);
|
||||
|
||||
ID3D11ShaderResourceView *nullTex[2]{};
|
||||
context_->PSSetShaderResources(0, 2, nullTex);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user