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, u16 DynPipVU1Program::getMaxVertCount(const bool& singleColorEnabled,
const u16& bufferSize) const { const u16& bufferSize) const {
return 0; // TODO u16 res = bufferSize - 4;
u8 colorElementsPerVertex =
singleColorEnabled ? (elementsPerVertex - 1) : elementsPerVertex;
res /= (colorElementsPerVertex + reglistCount);
// u16 res = bufferSize - 4; // Buffer size = VU1 double buffer size (xtop)
// u8 colorElementsPerVertex = // QBufferSize = res (it is placed inside VU1)
// singleColorEnabled ? (elementsPerVertex - 1) : elementsPerVertex;
// res /= (colorElementsPerVertex + reglistCount);
// // Buffer size = VU1 double buffer size (xtop) // Animation = 2 verts for final vert
// // res = qbuffer size (directly inside VU1) res = res / 2;
// // Must be dividable by 3 and the result also dividable by 3. Why? // Triangle = 3 verts
// // 1st dividable reason - triangle, and packaging system in 3d rendering res = res / 3;
// // 2nd dividable reason - subpackaging system. We are splitting packages res = res * 3;
// into return res;
// // 3 subpackages in 3d renderer.
// res = res / 3 / 3;
// res = res * 3 * 3;
// return res;
} }
} // namespace Tyra } // namespace Tyra
@@ -69,7 +69,7 @@ u16 StaPipVU1Program::getMaxVertCount(const bool& singleColorEnabled,
res /= (colorElementsPerVertex + reglistCount); res /= (colorElementsPerVertex + reglistCount);
// Buffer size = VU1 double buffer size (xtop) // 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? // Must be dividable by 3 and the result also dividable by 3. Why?
// 1st dividable reason - triangle, and packaging system in 3d rendering // 1st dividable reason - triangle, and packaging system in 3d rendering