mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-29 17:23:40 +01:00
GPU: Prevent GE_PRIM_INVALID on flush.
Wasn't enough to set prim temporarily here.
This commit is contained in:
1 parent
e5dbdba638
commit
6e8aad727b
1 file changed
+6
-2
@@ -790,9 +790,13 @@ void DrawEngineCommon::SubmitPrim(const void *verts, const void *inds, GEPrimiti
|
||||
DispatchFlush();
|
||||
}
|
||||
|
||||
// TODO: Is this the right thing to do?
|
||||
// This isn't exactly right, if we flushed, since prims can straddle previous calls.
|
||||
// But it generally works for common usage.
|
||||
if (prim == GE_PRIM_KEEP_PREVIOUS) {
|
||||
prim = prevPrim_ != GE_PRIM_INVALID ? prevPrim_ : GE_PRIM_POINTS;
|
||||
// Has to be set to something, let's assume POINTS (0) if no previous.
|
||||
if (prevPrim_ == GE_PRIM_INVALID)
|
||||
prevPrim_ = GE_PRIM_POINTS;
|
||||
prim = prevPrim_;
|
||||
} else {
|
||||
prevPrim_ = prim;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user