summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/OpcodeDecoding.cpp
diff options
context:
space:
mode:
authorTillmann Karras <tilkax@gmail.com>2015-01-31 09:23:50 +0100
committerTillmann Karras <tilkax@gmail.com>2015-01-31 09:23:50 +0100
commit1aac65f9880787ef8a68131429f4f71cacbee838 (patch)
tree5f0a070ead9c5897cedbd16f80802a0998802fdc /Source/Core/VideoCommon/OpcodeDecoding.cpp
parentd50b330d578fd4dffea6c150981a447bc34428bb (diff)
VertexLoaderManager: assimilate GetVertexSize()
Diffstat (limited to 'Source/Core/VideoCommon/OpcodeDecoding.cpp')
-rw-r--r--Source/Core/VideoCommon/OpcodeDecoding.cpp32
1 files changed, 11 insertions, 21 deletions
diff --git a/Source/Core/VideoCommon/OpcodeDecoding.cpp b/Source/Core/VideoCommon/OpcodeDecoding.cpp
index e347b93a76..4a23ac717b 100644
--- a/Source/Core/VideoCommon/OpcodeDecoding.cpp
+++ b/Source/Core/VideoCommon/OpcodeDecoding.cpp
@@ -265,28 +265,18 @@ u8* OpcodeDecoder_Run(DataReader src, u32* cycles, bool in_display_list)
if (src.size() < 2)
goto end;
u16 num_vertices = src.Read<u16>();
+ int bytes = VertexLoaderManager::RunVertices(
+ cmd_byte & GX_VAT_MASK, // Vertex loader index (0 - 7)
+ (cmd_byte & GX_PRIMITIVE_MASK) >> GX_PRIMITIVE_SHIFT,
+ num_vertices,
+ src,
+ g_bSkipCurrentFrame,
+ is_preprocess);
+
+ if (bytes < 0)
+ goto end;
- if (is_preprocess)
- {
- size_t size = num_vertices * VertexLoaderManager::GetVertexSize(cmd_byte & GX_VAT_MASK, is_preprocess);
- if (src.size() < size)
- goto end;
- src.Skip(size);
- }
- else
- {
- int bytes = VertexLoaderManager::RunVertices(
- cmd_byte & GX_VAT_MASK, // Vertex loader index (0 - 7)
- (cmd_byte & GX_PRIMITIVE_MASK) >> GX_PRIMITIVE_SHIFT,
- num_vertices,
- src,
- g_bSkipCurrentFrame);
-
- if (bytes < 0)
- goto end;
- else
- src.Skip(bytes);
- }
+ src.Skip(bytes);
// 4 GPU ticks per vertex, 3 CPU ticks per GPU tick
totalCycles += num_vertices * 4 * 3 + 6;