GPU: Prevent GE_PRIM_INVALID on flush.
Wasn't enough to set prim temporarily here.
This commit is contained in:
parent
e5dbdba638
commit
6e8aad727b
1 changed files with 6 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue