As my game has been increasing in size and complexity, I have been finding more ways to squeeze out performance of the system.
Recently, I realized that I had gotten to the point where I was sending more vertices than my pvr vertex buffer could support, and needed to increase the Vertex Buffer Size on PVR initialization.
Problem is, once I did that, I ran out of texture memory, and was afraid I would have to decrease textures quality to get everything to fit.
But first, I started digging around in KOS to look at how the Vertex Buffers were allocated, and I noticed a few questionable comments:
on pvr_buffers.c:
Line 234:
Code: Select all
outaddr += buf->opb_size; /* Do we _really_ need this twice? */
and Line 245:
Code: Select all
/* XXX What the heck is this 0x50580 magic value?? All I
remember about it is that removing it makes it fail. */
buf->opb_size = 0x50580 + polybuf;
Code: Select all
buf->opb_size = 0x14160 + polybuf;
With my new changes to pvr_buffers.c, pvr_init_defaults gives us 5,855,232 bytes of Texture Memory Available.
With this change, I was able to increase my Vertex Buffer size, without having to sacrifice Texture Quality.
Just posting this so see if I am missing something here, I have ran many tests on real hardware, and I can see no adverse effects, only more VRAM available.