diff --git a/src/xenia/gpu/gl4/draw_batcher.cc b/src/xenia/gpu/gl4/draw_batcher.cc index b2028a1cd..b86ed1ba3 100644 --- a/src/xenia/gpu/gl4/draw_batcher.cc +++ b/src/xenia/gpu/gl4/draw_batcher.cc @@ -242,6 +242,7 @@ bool DrawBatcher::CommitDraw() { } bool DrawBatcher::Flush(FlushMode mode) { + GLboolean cull_enabled = 0; if (batch_state_.draw_count) { #if FINE_GRAINED_DRAW_SCOPES SCOPE_profile_cpu_f("gpu"); @@ -289,6 +290,8 @@ bool DrawBatcher::Flush(FlushMode mode) { // assert_true( // (register_file_->values[XE_GPU_REG_PA_SU_SC_MODE_CNTL].u32 // & 0x3) == 0); + cull_enabled = glIsEnabled(GL_CULL_FACE); + glDisable(GL_CULL_FACE); break; case PrimitiveType::kQuadList: prim_type = GL_LINES_ADJACENCY; @@ -342,6 +345,10 @@ bool DrawBatcher::Flush(FlushMode mode) { batch_state_.draw_count = 0; } + if (batch_state_.prim_type == PrimitiveType::kRectangleList && cull_enabled) { + glEnable(GL_CULL_FACE); + } + if (mode == FlushMode::kReconfigure) { // Reset - we'll update it as soon as we have all the information. batch_state_.needs_reconfigure = true;