mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
D3D various: "Safe texture cache" option, texture replace instead of destroy/create when possible, a commented out "optimization" that didn't speed things up (use DrawPrimitive instead of DrawIndexedPrimitive when possible), reduce code duplication in Flush(), don't periodically clean out the shader caches since it's not really beneficial - shaders are cheap to keep. some code cleanup.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4302 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -31,6 +31,8 @@ void IndexGenerator::Start(unsigned short *startptr)
|
||||
ptr = startptr;
|
||||
index = 0;
|
||||
numPrims = 0;
|
||||
adds = 0;
|
||||
onlyLists = true;
|
||||
}
|
||||
|
||||
void IndexGenerator::AddList(int numVerts)
|
||||
@ -45,6 +47,7 @@ void IndexGenerator::AddList(int numVerts)
|
||||
}
|
||||
index += numVerts;
|
||||
numPrims += numTris;
|
||||
adds++;
|
||||
}
|
||||
|
||||
void IndexGenerator::AddStrip(int numVerts)
|
||||
@ -61,6 +64,8 @@ void IndexGenerator::AddStrip(int numVerts)
|
||||
}
|
||||
index += numVerts;
|
||||
numPrims += numTris;
|
||||
adds++;
|
||||
onlyLists = false;
|
||||
}
|
||||
|
||||
void IndexGenerator::AddLineList(int numVerts)
|
||||
@ -74,6 +79,7 @@ void IndexGenerator::AddLineList(int numVerts)
|
||||
}
|
||||
index += numVerts;
|
||||
numPrims += numLines;
|
||||
adds++;
|
||||
}
|
||||
|
||||
void IndexGenerator::AddLineStrip(int numVerts)
|
||||
@ -87,9 +93,10 @@ void IndexGenerator::AddLineStrip(int numVerts)
|
||||
}
|
||||
index += numVerts;
|
||||
numPrims += numLines;
|
||||
adds++;
|
||||
onlyLists = false;
|
||||
}
|
||||
|
||||
|
||||
void IndexGenerator::AddFan(int numVerts)
|
||||
{
|
||||
int numTris = numVerts - 2;
|
||||
@ -102,6 +109,8 @@ void IndexGenerator::AddFan(int numVerts)
|
||||
}
|
||||
index += numVerts;
|
||||
numPrims += numTris;
|
||||
adds++;
|
||||
onlyLists = false;
|
||||
}
|
||||
|
||||
void IndexGenerator::AddQuads(int numVerts)
|
||||
@ -119,10 +128,13 @@ void IndexGenerator::AddQuads(int numVerts)
|
||||
}
|
||||
index += numVerts;
|
||||
numPrims += numTris;
|
||||
adds++;
|
||||
onlyLists = false;
|
||||
}
|
||||
|
||||
|
||||
void IndexGenerator::AddPointList(int numVerts)
|
||||
void IndexGenerator::AddPoints(int numVerts)
|
||||
{
|
||||
index += numVerts;
|
||||
}
|
||||
numPrims += numVerts;
|
||||
adds++;
|
||||
}
|
||||
|
Reference in New Issue
Block a user