mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00: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;
|
||||
}
|
||||
|
||||
|
||||
@@ -475,6 +475,10 @@ public:
|
||||
|
||||
u8 biggest; // in practice, alignment.
|
||||
|
||||
#ifdef _DEBUG
|
||||
mutable u64 decodedCount = 0;
|
||||
#endif
|
||||
|
||||
friend class VertexDecoderJitCache;
|
||||
|
||||
private:
|
||||
|
||||
@@ -16,12 +16,30 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
// Candidates for hand-writing
|
||||
// (found using our custom Very Sleepy).
|
||||
// GPU::P:_f_N:_s8_C:_8888_T:_u16__(24b)_040001BE (5%+ of God of War execution)
|
||||
// GPU::P:_f_N:_s8_C:_8888_T:_u16_W:_f_(1x)__(28b)_040007BE (1%+ of God of War execution)
|
||||
|
||||
// Tekken 6:
|
||||
// (found using the vertex counter that's active in _DEBUG)
|
||||
// [04000111] P: s16 C: 565 T: u8 (10b) (736949) // Also in Midnight Club
|
||||
|
||||
// Wipeout Pure:
|
||||
// [0400013f] P: s16 N: s8 C: 8888 T: f (24b) (1495430)
|
||||
|
||||
// Flatout:
|
||||
// [04000122] P: s16 N: s8 T: u16 (14b) (3901754)
|
||||
// [04000116] P: s16 C: 5551 T: u16 (12b) (2225841)
|
||||
|
||||
// Test drive:
|
||||
// [05000100] P: s16 (6b) (2827872)
|
||||
// [050011ff] P: f N: f C: 8888 T: f I: u16 (36b) (3812112)
|
||||
|
||||
// Burnout Dominator:
|
||||
// [04000122] P: s16 N: s8 T: u16 (14b) (1710813)
|
||||
// [04000116] P: s16 C: 5551 T: u16 (12b) (7688298)
|
||||
|
||||
// This is the first GoW one.
|
||||
void VtxDec_Tu16_C8888_Pfloat(const u8 *srcp, u8 *dstp, int count, const UVScale *uvScaleOffset) {
|
||||
struct GOWVTX {
|
||||
|
||||
Reference in new issue
Block a user