Permalink
Browse files

cullmode fallback

  • Loading branch information...
zhang wei
zhang wei committed Apr 28, 2018
1 parent 3419197 commit 51388ded228a742111f564cde419493a1c64e65e
Showing with 7 additions and 0 deletions.
  1. +7 −0 GPU/GPUCommon.cpp
@@ -1580,6 +1580,13 @@ void GPUCommon::Execute_Prim(u32 op, u32 diff) {
inds = Memory::GetPointerUnchecked(gstate_c.indexAddr);
}
if (newPrim != GE_PRIM_TRIANGLE_STRIP && cullMode != -1 && cullMode != gstate.getCullMode()) {
DEBUG_LOG(G3D, "flush cull mode before prim: %d", newPrim);
drawEngineCommon_->DispatchFlush();
gstate.cmdmem[GE_CMD_CULL] ^= 1;
gstate_c.Dirty(DIRTY_RASTER_STATE);
}
drawEngineCommon_->SubmitPrim(verts, inds, newPrim, count, vertTypeID, cullMode, &bytesRead);
AdvanceVerts(vertexType, count, bytesRead);
totalVertCount += count;

0 comments on commit 51388de

Please sign in to comment.