mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04: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:
parent
707e9cf7ac
commit
bdcf2c5cff
2 changed files with 2 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue