mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
fix for point rendering in dx9 backend, that will teach me to read the full documentation. if someone founs a games that use points a lot i will try to implement a faster path for point rendering.
now the map in twin snakes is functional in all the backends.
This commit is contained in:
@ -158,7 +158,7 @@ void VertexManager::PrepareDrawBuffers(u32 stride)
|
||||
int TdataSize = IndexGenerator::GetTriangleindexLen();
|
||||
int LDataSize = IndexGenerator::GetLineindexLen();
|
||||
int PDataSize = IndexGenerator::GetPointindexLen();
|
||||
int IndexDataSize = TdataSize + LDataSize + PDataSize;
|
||||
int IndexDataSize = TdataSize + LDataSize;
|
||||
DWORD LockMode = D3DLOCK_NOOVERWRITE;
|
||||
m_vertex_buffer_cursor--;
|
||||
m_vertex_buffer_cursor = m_vertex_buffer_cursor - (m_vertex_buffer_cursor % stride) + stride;
|
||||
@ -199,10 +199,6 @@ void VertexManager::PrepareDrawBuffers(u32 stride)
|
||||
memcpy(pIndices, LIBuffer, LDataSize * sizeof(u16));
|
||||
pIndices += LDataSize;
|
||||
}
|
||||
if(PDataSize)
|
||||
{
|
||||
memcpy(pIndices, PIBuffer, PDataSize * sizeof(u16));
|
||||
}
|
||||
m_index_buffers[m_current_index_buffer]->Unlock();
|
||||
if(m_current_stride != stride || m_vertex_buffer_cursor == 0)
|
||||
{
|
||||
@ -256,17 +252,20 @@ void VertexManager::DrawVertexBuffer(int stride)
|
||||
}
|
||||
if (points > 0)
|
||||
{
|
||||
if (FAILED(D3D::dev->DrawIndexedPrimitive(
|
||||
D3DPT_POINTLIST,
|
||||
basevertex,
|
||||
0,
|
||||
numverts,
|
||||
StartIndex,
|
||||
points)))
|
||||
//DrawIndexedPrimitive does not support point list so we have to draw the points one by one
|
||||
for (int i = 0; i < points; i++)
|
||||
{
|
||||
DumpBadShaders();
|
||||
if (FAILED(D3D::dev->DrawPrimitive(
|
||||
D3DPT_POINTLIST,
|
||||
basevertex + PIBuffer[i],
|
||||
1)))
|
||||
{
|
||||
DumpBadShaders();
|
||||
}
|
||||
INCSTAT(stats.thisFrame.numDrawCalls);
|
||||
}
|
||||
INCSTAT(stats.thisFrame.numIndexedDrawCalls);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user