mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
VertexLoaderManager: Return debug strings by value
This also renames AppendListToString to VertexLoadersToString.
This commit is contained in:
parent
9859533ab4
commit
9ebd84e54a
@ -68,8 +68,7 @@ std::string Statistics::ToString()
|
||||
str += StringFromFormat("Uniform streamed: %i kB\n", stats.thisFrame.bytesUniformStreamed / 1024);
|
||||
str += StringFromFormat("Vertex Loaders: %i\n", stats.numVertexLoaders);
|
||||
|
||||
std::string vertex_list;
|
||||
VertexLoaderManager::AppendListToString(&vertex_list);
|
||||
std::string vertex_list = VertexLoaderManager::VertexLoadersToString();
|
||||
|
||||
// TODO : at some point text1 just becomes too huge and overflows, we can't even read the added
|
||||
// stuff
|
||||
|
@ -98,7 +98,7 @@ struct entry
|
||||
};
|
||||
}
|
||||
|
||||
void AppendListToString(std::string* dest)
|
||||
std::string VertexLoadersToString()
|
||||
{
|
||||
std::lock_guard<std::mutex> lk(s_vertex_loader_map_lock);
|
||||
std::vector<entry> entries;
|
||||
@ -112,13 +112,18 @@ void AppendListToString(std::string* dest)
|
||||
total_size += e.text.size() + 1;
|
||||
entries.push_back(std::move(e));
|
||||
}
|
||||
|
||||
sort(entries.begin(), entries.end());
|
||||
dest->reserve(dest->size() + total_size);
|
||||
|
||||
std::string dest;
|
||||
dest.reserve(total_size);
|
||||
for (const entry& entry : entries)
|
||||
{
|
||||
*dest += entry.text;
|
||||
*dest += '\n';
|
||||
dest += entry.text;
|
||||
dest += '\n';
|
||||
}
|
||||
|
||||
return dest;
|
||||
}
|
||||
|
||||
void MarkAllDirty()
|
||||
|
@ -30,7 +30,7 @@ NativeVertexFormatMap* GetNativeVertexFormatMap();
|
||||
int RunVertices(int vtx_attr_group, int primitive, int count, DataReader src, bool is_preprocess);
|
||||
|
||||
// For debugging
|
||||
void AppendListToString(std::string* dest);
|
||||
std::string VertexLoadersToString();
|
||||
|
||||
NativeVertexFormat* GetCurrentVertexFormat();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user