Set the texture dirty flags when binding a new framebuffer.

This commit is contained in:
Henrik Rydgård 2020-09-20 22:48:35 +02:00
parent 9b283355a3
commit b6efc65c94
5 changed files with 6 additions and 5 deletions

View File

@ -705,7 +705,7 @@ void FramebufferManagerCommon::DrawPixels(VirtualFramebuffer *vfb, int dstX, int
pixelsTex->Release();
draw_->InvalidateCachedState();
gstate_c.Dirty(DIRTY_BLEND_STATE | DIRTY_RASTER_STATE | DIRTY_DEPTHSTENCIL_STATE | DIRTY_VIEWPORTSCISSOR_STATE);
gstate_c.Dirty(DIRTY_BLEND_STATE | DIRTY_RASTER_STATE | DIRTY_DEPTHSTENCIL_STATE | DIRTY_VIEWPORTSCISSOR_STATE | DIRTY_TEXTURE_IMAGE | DIRTY_TEXTURE_PARAMS);
}
}

View File

@ -330,7 +330,7 @@ void DrawEngineD3D11::DoFlush() {
int curRenderStepId = draw_->GetCurrentStepId();
if (lastRenderStepId_ != curRenderStepId) {
// Dirty everything that has dynamic state that will need re-recording.
gstate_c.Dirty(DIRTY_VIEWPORTSCISSOR_STATE);
gstate_c.Dirty(DIRTY_VIEWPORTSCISSOR_STATE | DIRTY_TEXTURE_IMAGE | DIRTY_TEXTURE_PARAMS);
lastRenderStepId_ = curRenderStepId;
}

View File

@ -315,7 +315,7 @@ void DrawEngineDX9::DoFlush() {
int curRenderStepId = draw_->GetCurrentStepId();
if (lastRenderStepId_ != curRenderStepId) {
// Dirty everything that has dynamic state that will need re-recording.
gstate_c.Dirty(DIRTY_VIEWPORTSCISSOR_STATE);
gstate_c.Dirty(DIRTY_VIEWPORTSCISSOR_STATE | DIRTY_TEXTURE_IMAGE | DIRTY_TEXTURE_PARAMS);
lastRenderStepId_ = curRenderStepId;
}

View File

@ -315,7 +315,7 @@ void DrawEngineGLES::DoFlush() {
int curRenderStepId = render_->GetCurrentStepId();
if (lastRenderStepId_ != curRenderStepId) {
// Dirty everything that has dynamic state that will need re-recording.
gstate_c.Dirty(DIRTY_VIEWPORTSCISSOR_STATE | DIRTY_DEPTHSTENCIL_STATE | DIRTY_BLEND_STATE | DIRTY_RASTER_STATE);
gstate_c.Dirty(DIRTY_VIEWPORTSCISSOR_STATE | DIRTY_DEPTHSTENCIL_STATE | DIRTY_BLEND_STATE | DIRTY_RASTER_STATE | DIRTY_TEXTURE_IMAGE | DIRTY_TEXTURE_PARAMS);
textureCache_->ForgetLastTexture();
lastRenderStepId_ = curRenderStepId;
}

View File

@ -603,7 +603,8 @@ void DrawEngineVulkan::DoFlush() {
int curRenderStepId = renderManager->GetCurrentStepId();
if (lastRenderStepId_ != curRenderStepId) {
// Dirty everything that has dynamic state that will need re-recording.
gstate_c.Dirty(DIRTY_VIEWPORTSCISSOR_STATE | DIRTY_DEPTHSTENCIL_STATE | DIRTY_BLEND_STATE);
gstate_c.Dirty(DIRTY_VIEWPORTSCISSOR_STATE | DIRTY_DEPTHSTENCIL_STATE | DIRTY_BLEND_STATE | DIRTY_TEXTURE_IMAGE | DIRTY_TEXTURE_PARAMS);
textureCache_->ForgetLastTexture();
lastRenderStepId_ = curRenderStepId;
}