summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/IndexGenerator.cpp
diff options
context:
space:
mode:
authormagumagu <magumagu9@gmail.com>2014-05-08 16:53:18 -0700
committermagumagu <magumagu9@gmail.com>2014-05-10 20:33:28 -0700
commit39d439fc48ef44d0a28113a10cb796cd8989f944 (patch)
tree25a1cccde305a45ee57ae09b7432f3b40ceb1f2e /Source/Core/VideoCommon/IndexGenerator.cpp
parent2983ae2823cb8ff022d896c98df581064a6bb763 (diff)
Opcode decoding: handle missing opcodes 0x88 etc.
Hardware testing shows that they do the same thing as the 0x80 family of opcodes: they draw quads.
Diffstat (limited to 'Source/Core/VideoCommon/IndexGenerator.cpp')
-rw-r--r--Source/Core/VideoCommon/IndexGenerator.cpp26
1 files changed, 14 insertions, 12 deletions
diff --git a/Source/Core/VideoCommon/IndexGenerator.cpp b/Source/Core/VideoCommon/IndexGenerator.cpp
index 949ee342b1..f9838a1daa 100644
--- a/Source/Core/VideoCommon/IndexGenerator.cpp
+++ b/Source/Core/VideoCommon/IndexGenerator.cpp
@@ -6,6 +6,7 @@
#include "Common/Common.h"
#include "VideoCommon/IndexGenerator.h"
+#include "VideoCommon/OpcodeDecoding.h"
#include "VideoCommon/VideoConfig.h"
//Init
@@ -21,22 +22,23 @@ void IndexGenerator::Init()
{
if (g_Config.backend_info.bSupportsPrimitiveRestart)
{
- primitive_table[0] = IndexGenerator::AddQuads<true>;
- primitive_table[2] = IndexGenerator::AddList<true>;
- primitive_table[3] = IndexGenerator::AddStrip<true>;
- primitive_table[4] = IndexGenerator::AddFan<true>;
+ primitive_table[GX_DRAW_QUADS] = IndexGenerator::AddQuads<true>;
+ primitive_table[GX_DRAW_QUADS_2] = IndexGenerator::AddQuads<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>;
}
else
{
- primitive_table[0] = IndexGenerator::AddQuads<false>;
- primitive_table[2] = IndexGenerator::AddList<false>;
- primitive_table[3] = IndexGenerator::AddStrip<false>;
- primitive_table[4] = IndexGenerator::AddFan<false>;
+ primitive_table[GX_DRAW_QUADS] = IndexGenerator::AddQuads<false>;
+ primitive_table[GX_DRAW_QUADS_2] = IndexGenerator::AddQuads<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>;
}
- primitive_table[1] = nullptr;
- primitive_table[5] = &IndexGenerator::AddLineList;
- primitive_table[6] = &IndexGenerator::AddLineStrip;
- primitive_table[7] = &IndexGenerator::AddPoints;
+ primitive_table[GX_DRAW_LINES] = &IndexGenerator::AddLineList;
+ primitive_table[GX_DRAW_LINE_STRIP] = &IndexGenerator::AddLineStrip;
+ primitive_table[GX_DRAW_POINTS] = &IndexGenerator::AddPoints;
}
void IndexGenerator::Start(u16* Indexptr)