Dirty on various framebuf state helpers.

Ideally we should cut down on using DisableState(), or restore afterward.
This commit is contained in:
Unknown W. Brackets 2017-03-19 12:14:43 -07:00 committed by Henrik Rydgård
parent 96ed8564ab
commit ca40282a10
3 changed files with 6 additions and 0 deletions

View file

@ -509,6 +509,8 @@ void FramebufferManagerD3D11::ReformatFramebufferFrom(VirtualFramebuffer *vfb, G
context_->RSSetViewports(1, &vp);
context_->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP);
context_->Draw(4, 0);
gstate_c.Dirty(DIRTY_BLEND_STATE | DIRTY_RASTER_STATE | DIRTY_DEPTHSTENCIL_STATE | DIRTY_VIEWPORTSCISSOR_STATE);
}
RebindFramebuffer();

View file

@ -89,6 +89,7 @@ static const D3DVERTEXELEMENT9 g_FramebufferVertexElements[] = {
dxstate.stencilTest.disable();
dxstate.colorMask.set(true, true, true, true);
dxstate.stencilMask.set(0xFF);
gstate_c.Dirty(DIRTY_BLEND_STATE | DIRTY_RASTER_STATE | DIRTY_DEPTHSTENCIL_STATE | DIRTY_VIEWPORTSCISSOR_STATE);
}
FramebufferManagerDX9::FramebufferManagerDX9(Draw::DrawContext *draw)
@ -339,6 +340,7 @@ static const D3DVERTEXELEMENT9 g_FramebufferVertexElements[] = {
dxstate.colorMask.set(false, false, false, true);
dxstate.stencilFunc.set(D3DCMP_ALWAYS, 0, 0);
dxstate.stencilMask.set(0xFF);
gstate_c.Dirty(DIRTY_BLEND_STATE | DIRTY_DEPTHSTENCIL_STATE | DIRTY_VIEWPORTSCISSOR_STATE);
float coord[20] = {
-1.0f,-1.0f,0, 0,0,

View file

@ -80,6 +80,8 @@ void FramebufferManagerGLES::DisableState() {
#endif
glstate.colorMask.set(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
glstate.stencilMask.set(0xFF);
gstate_c.Dirty(DIRTY_BLEND_STATE | DIRTY_RASTER_STATE | DIRTY_DEPTHSTENCIL_STATE | DIRTY_VIEWPORTSCISSOR_STATE);
}
void FramebufferManagerGLES::CompileDraw2DProgram() {