mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-27 06:48:33 +00:00
VertexLoaderManager: assimilate GetVertexSize()
This commit is contained in:
parent
d50b330d57
commit
1aac65f988
3 changed files with 14 additions and 31 deletions
|
@ -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 (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;
|
||||
|
||||
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue