Video backends: warn on usage of GL_DRAW_QUADS_2.

It's not normally used, so if it shows up, it could indicate a CPU emulation
bug.
This commit is contained in:
magumagu
2014-05-17 11:55:32 -07:00
parent 39d439fc48
commit 9b82d72070
3 changed files with 12 additions and 2 deletions

View File

@ -23,7 +23,7 @@ void IndexGenerator::Init()
if (g_Config.backend_info.bSupportsPrimitiveRestart)
{
primitive_table[GX_DRAW_QUADS] = IndexGenerator::AddQuads<true>;
primitive_table[GX_DRAW_QUADS_2] = IndexGenerator::AddQuads<true>;
primitive_table[GX_DRAW_QUADS_2] = IndexGenerator::AddQuads_nonstandard<true>;
primitive_table[GX_DRAW_TRIANGLES] = IndexGenerator::AddList<true>;
primitive_table[GX_DRAW_TRIANGLE_STRIP] = IndexGenerator::AddStrip<true>;
primitive_table[GX_DRAW_TRIANGLE_FAN] = IndexGenerator::AddFan<true>;
@ -31,7 +31,7 @@ void IndexGenerator::Init()
else
{
primitive_table[GX_DRAW_QUADS] = IndexGenerator::AddQuads<false>;
primitive_table[GX_DRAW_QUADS_2] = IndexGenerator::AddQuads<false>;
primitive_table[GX_DRAW_QUADS_2] = IndexGenerator::AddQuads_nonstandard<false>;
primitive_table[GX_DRAW_TRIANGLES] = IndexGenerator::AddList<false>;
primitive_table[GX_DRAW_TRIANGLE_STRIP] = IndexGenerator::AddStrip<false>;
primitive_table[GX_DRAW_TRIANGLE_FAN] = IndexGenerator::AddFan<false>;
@ -198,6 +198,12 @@ template <bool pr> u16* IndexGenerator::AddQuads(u16 *Iptr, u32 numVerts, u32 in
return Iptr;
}
template <bool pr> u16* IndexGenerator::AddQuads_nonstandard(u16 *Iptr, u32 numVerts, u32 index)
{
WARN_LOG(VIDEO, "Non-standard primitive drawing command GL_DRAW_QUADS_2");
return AddQuads<pr>(Iptr, numVerts, index);
}
// Lines
u16* IndexGenerator::AddLineList(u16 *Iptr, u32 numVerts, u32 index)
{