mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-30 17:53:42 +01:00
Add a decode counter to vertex decoders in _DEBUG mode
This commit is contained in:
1 parent
5b566d5807
commit
7a32507ab7
3 files changed
+32
-2
No files matched your search
@@ -1320,6 +1320,10 @@ void VertexDecoder::DecodeVerts(u8 *decodedptr, const void *verts, const UVScale
|
||||
int count = indexUpperBound - indexLowerBound + 1;
|
||||
int stride = decFmt.stride;
|
||||
|
||||
#ifdef _DEBUG
|
||||
decodedCount += count;
|
||||
#endif
|
||||
|
||||
// Check alignment before running the decoder, as we may crash if it's bad (as should the real PSP but doesn't always)
|
||||
if (((uintptr_t)verts & (biggest - 1)) != 0) {
|
||||
// Bad alignment. Not really sure what to do here... zero the verts to be safe?
|
||||
@@ -1475,7 +1479,7 @@ static const char * const colnames[8] = { "", "?", "?", "?", "565", "5551", "444
|
||||
|
||||
int VertexDecoder::ToString(char *output, bool spaces) const {
|
||||
char *start = output;
|
||||
|
||||
output += sprintf(output, "[%08x] ", fmt_);
|
||||
output += sprintf(output, "P: %s ", posnames[pos]);
|
||||
if (nrm)
|
||||
output += sprintf(output, "N: %s ", nrmnames[nrm]);
|
||||
@@ -1502,6 +1506,10 @@ int VertexDecoder::ToString(char *output, bool spaces) const {
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
output += sprintf(output, " (%llu)", (long long)decodedCount);
|
||||
#endif
|
||||
|
||||
return output - start;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user