mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-05 23:58:59 +00:00
VertexLoaderManager: assimilate GetVertexSize()
This commit is contained in:
parent
d50b330d57
commit
1aac65f988
3 changed files with 14 additions and 31 deletions
|
@ -138,18 +138,18 @@ static VertexLoaderBase* RefreshLoader(int vtx_attr_group, bool preprocess = fal
|
|||
return loader;
|
||||
}
|
||||
|
||||
int RunVertices(int vtx_attr_group, int primitive, int count, DataReader src, bool skip_drawing)
|
||||
int RunVertices(int vtx_attr_group, int primitive, int count, DataReader src, bool skip_drawing, bool is_preprocess)
|
||||
{
|
||||
if (!count)
|
||||
return 0;
|
||||
|
||||
VertexLoaderBase* loader = RefreshLoader(vtx_attr_group);
|
||||
VertexLoaderBase* loader = RefreshLoader(vtx_attr_group, is_preprocess);
|
||||
|
||||
int size = count * loader->m_VertexSize;
|
||||
if ((int)src.size() < size)
|
||||
return -1;
|
||||
|
||||
if (skip_drawing)
|
||||
if (skip_drawing || is_preprocess)
|
||||
return size;
|
||||
|
||||
// If the native vertex format changed, force a flush.
|
||||
|
@ -175,11 +175,6 @@ int RunVertices(int vtx_attr_group, int primitive, int count, DataReader src, bo
|
|||
return size;
|
||||
}
|
||||
|
||||
int GetVertexSize(int vtx_attr_group, bool preprocess)
|
||||
{
|
||||
return RefreshLoader(vtx_attr_group, preprocess)->m_VertexSize;
|
||||
}
|
||||
|
||||
NativeVertexFormat* GetCurrentVertexFormat()
|
||||
{
|
||||
return s_current_vtx_fmt;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue