max vert count

This commit is contained in:
h4570
2022-07-18 23:01:12 +02:00
parent 9850028811
commit efdec2c52e
2 changed files with 13 additions and 16 deletions
@@ -63,24 +63,21 @@ void DynPipVU1Program::addStandardBufferDataToPacket(packet2_t* packet,
u16 DynPipVU1Program::getMaxVertCount(const bool& singleColorEnabled,
const u16& bufferSize) const {
return 0; // TODO
u16 res = bufferSize - 4;
u8 colorElementsPerVertex =
singleColorEnabled ? (elementsPerVertex - 1) : elementsPerVertex;
res /= (colorElementsPerVertex + reglistCount);
// u16 res = bufferSize - 4;
// u8 colorElementsPerVertex =
// singleColorEnabled ? (elementsPerVertex - 1) : elementsPerVertex;
// res /= (colorElementsPerVertex + reglistCount);
// Buffer size = VU1 double buffer size (xtop)
// QBufferSize = res (it is placed inside VU1)
// // Buffer size = VU1 double buffer size (xtop)
// // res = qbuffer size (directly inside VU1)
// Animation = 2 verts for final vert
res = res / 2;
// // Must be dividable by 3 and the result also dividable by 3. Why?
// // 1st dividable reason - triangle, and packaging system in 3d rendering
// // 2nd dividable reason - subpackaging system. We are splitting packages
// into
// // 3 subpackages in 3d renderer.
// res = res / 3 / 3;
// res = res * 3 * 3;
// return res;
// Triangle = 3 verts
res = res / 3;
res = res * 3;
return res;
}
} // namespace Tyra
@@ -69,7 +69,7 @@ u16 StaPipVU1Program::getMaxVertCount(const bool& singleColorEnabled,
res /= (colorElementsPerVertex + reglistCount);
// Buffer size = VU1 double buffer size (xtop)
// res = qbuffer size (directly inside VU1)
// QBufferSize = res (it is placed inside VU1)
// Must be dividable by 3 and the result also dividable by 3. Why?
// 1st dividable reason - triangle, and packaging system in 3d rendering