diff options
author | Tony Wasserka <NeoBrainX@gmail.com> | 2014-08-17 17:44:55 +0200 |
---|---|---|
committer | Tony Wasserka <NeoBrainX@gmail.com> | 2014-08-25 22:03:19 +0200 |
commit | 2f1c129f6407fe2d5c8c3e57c6717d5668570de5 (patch) | |
tree | 5d12dadd9ffe3b46b9b94a84b7688d6d3b8260fd /src/video_core/debug_utils/debug_utils.cpp | |
parent | 9679d231df0bc8fac9e0e596ab78750bb38ef248 (diff) |
Pica: Consolidate the primitive assembly code in PrimitiveAssembly and GeometryDumper.
Diffstat (limited to 'src/video_core/debug_utils/debug_utils.cpp')
-rw-r--r-- | src/video_core/debug_utils/debug_utils.cpp | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/src/video_core/debug_utils/debug_utils.cpp b/src/video_core/debug_utils/debug_utils.cpp index f7d9455b..48e6dd18 100644 --- a/src/video_core/debug_utils/debug_utils.cpp +++ b/src/video_core/debug_utils/debug_utils.cpp @@ -22,27 +22,17 @@ namespace Pica { namespace DebugUtils { -void GeometryDumper::AddVertex(std::array<float,3> pos, TriangleTopology topology) { - vertices.push_back({pos[0], pos[1], pos[2]}); +void GeometryDumper::AddTriangle(Vertex& v0, Vertex& v1, Vertex& v2) { + vertices.push_back(v0); + vertices.push_back(v1); + vertices.push_back(v2); int num_vertices = vertices.size(); - - switch (topology) { - case TriangleTopology::List: - case TriangleTopology::ListIndexed: - if (0 == (num_vertices % 3)) - faces.push_back({ num_vertices-3, num_vertices-2, num_vertices-1 }); - break; - - default: - ERROR_LOG(GPU, "Unknown triangle topology %x", (int)topology); - exit(0); - break; - } + faces.push_back({ num_vertices-3, num_vertices-2, num_vertices-1 }); } void GeometryDumper::Dump() { - // NOTE: Permanently enabling this just trashes hard disks for no reason. + // NOTE: Permanently enabling this just trashes the hard disk for no reason. // Hence, this is currently disabled. return; |