mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
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:
@ -25,7 +25,10 @@ void SetupUnit::SetupVertex()
|
|||||||
switch (m_PrimType)
|
switch (m_PrimType)
|
||||||
{
|
{
|
||||||
case GX_DRAW_QUADS:
|
case GX_DRAW_QUADS:
|
||||||
|
SetupQuad();
|
||||||
|
break;
|
||||||
case GX_DRAW_QUADS_2:
|
case GX_DRAW_QUADS_2:
|
||||||
|
WARN_LOG(VIDEO, "Non-standard primitive drawing command GL_DRAW_QUADS_2");
|
||||||
SetupQuad();
|
SetupQuad();
|
||||||
break;
|
break;
|
||||||
case GX_DRAW_TRIANGLES:
|
case GX_DRAW_TRIANGLES:
|
||||||
|
@ -23,7 +23,7 @@ void IndexGenerator::Init()
|
|||||||
if (g_Config.backend_info.bSupportsPrimitiveRestart)
|
if (g_Config.backend_info.bSupportsPrimitiveRestart)
|
||||||
{
|
{
|
||||||
primitive_table[GX_DRAW_QUADS] = IndexGenerator::AddQuads<true>;
|
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_TRIANGLES] = IndexGenerator::AddList<true>;
|
||||||
primitive_table[GX_DRAW_TRIANGLE_STRIP] = IndexGenerator::AddStrip<true>;
|
primitive_table[GX_DRAW_TRIANGLE_STRIP] = IndexGenerator::AddStrip<true>;
|
||||||
primitive_table[GX_DRAW_TRIANGLE_FAN] = IndexGenerator::AddFan<true>;
|
primitive_table[GX_DRAW_TRIANGLE_FAN] = IndexGenerator::AddFan<true>;
|
||||||
@ -31,7 +31,7 @@ void IndexGenerator::Init()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
primitive_table[GX_DRAW_QUADS] = IndexGenerator::AddQuads<false>;
|
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_TRIANGLES] = IndexGenerator::AddList<false>;
|
||||||
primitive_table[GX_DRAW_TRIANGLE_STRIP] = IndexGenerator::AddStrip<false>;
|
primitive_table[GX_DRAW_TRIANGLE_STRIP] = IndexGenerator::AddStrip<false>;
|
||||||
primitive_table[GX_DRAW_TRIANGLE_FAN] = IndexGenerator::AddFan<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;
|
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
|
// Lines
|
||||||
u16* IndexGenerator::AddLineList(u16 *Iptr, u32 numVerts, u32 index)
|
u16* IndexGenerator::AddLineList(u16 *Iptr, u32 numVerts, u32 index)
|
||||||
{
|
{
|
||||||
|
@ -31,6 +31,7 @@ private:
|
|||||||
template <bool pr> static u16* AddStrip(u16 *Iptr, u32 numVerts, u32 index);
|
template <bool pr> static u16* AddStrip(u16 *Iptr, u32 numVerts, u32 index);
|
||||||
template <bool pr> static u16* AddFan(u16 *Iptr, u32 numVerts, u32 index);
|
template <bool pr> static u16* AddFan(u16 *Iptr, u32 numVerts, u32 index);
|
||||||
template <bool pr> static u16* AddQuads(u16 *Iptr, u32 numVerts, u32 index);
|
template <bool pr> static u16* AddQuads(u16 *Iptr, u32 numVerts, u32 index);
|
||||||
|
template <bool pr> static u16* AddQuads_nonstandard(u16 *Iptr, u32 numVerts, u32 index);
|
||||||
|
|
||||||
// Lines
|
// Lines
|
||||||
static u16* AddLineList(u16 *Iptr, u32 numVerts, u32 index);
|
static u16* AddLineList(u16 *Iptr, u32 numVerts, u32 index);
|
||||||
|
Reference in New Issue
Block a user