mirror of https://github.com/PCSX2/pcsx2.git
GS: Handle index swap case for auto flush
DirectX and OpenGL no longer have different draw splitting.
This commit is contained in:
parent
34371c070c
commit
f9b8aa1862
|
@ -3035,6 +3035,7 @@ __forceinline void GSState::CLUTAutoFlush()
|
|||
}
|
||||
}
|
||||
|
||||
template<bool index_swap>
|
||||
__forceinline void GSState::HandleAutoFlush()
|
||||
{
|
||||
// Kind of a cheat, making the assumption that 2 consecutive fan/strip triangles won't overlap each other (*should* be safe)
|
||||
|
@ -3126,7 +3127,7 @@ __forceinline void GSState::HandleAutoFlush()
|
|||
}
|
||||
|
||||
// Get the last texture position from the last draw.
|
||||
const GSVertex* v = &m_vertex.buff[m_index.buff[m_index.tail - 1]];
|
||||
const GSVertex* v = &m_vertex.buff[m_index.buff[m_index.tail - (index_swap ? n : 1)]];
|
||||
|
||||
if (PRIM->FST)
|
||||
{
|
||||
|
@ -3260,7 +3261,7 @@ __forceinline void GSState::VertexKick(u32 skip)
|
|||
|
||||
if (auto_flush && skip == 0 && m_index.tail > 0 && ((m_vertex.tail + 1) - m_vertex.head) >= n)
|
||||
{
|
||||
HandleAutoFlush();
|
||||
HandleAutoFlush<index_swap>();
|
||||
}
|
||||
|
||||
size_t head = m_vertex.head;
|
||||
|
|
|
@ -169,6 +169,7 @@ protected:
|
|||
|
||||
void GrowVertexBuffer();
|
||||
bool IsAutoFlushDraw();
|
||||
template<bool index_swap>
|
||||
void HandleAutoFlush();
|
||||
void CLUTAutoFlush();
|
||||
|
||||
|
|
Loading…
Reference in New Issue