Code: Select all
8:31 PM] ian micheal:
KOS Vram Usage
Post by PH3NOM » Thu Oct 06, 2016 2:54 pm
Whats up guys?
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? */
So I simple commented that line out
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;
I made some testing an arrived at
CODE: SELECT ALL
buf->opb_size = 0x14160 + polybuf;
On a default pvr_init_defaults, the original code gives us 4,626,688 bytes of Texture Memory Available.
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.
[8:33 PM] ian micheal: It seems like i learn a lot from PH3NOM these days but this was amazing to me since ti works and you get With His new changes to pvr_buffers.c, pvr_init_defaults gives us 5,855,232 bytes of Texture Memory Available. so kos your using On a default pvr_init_defaults, the original code gives us 4,626,688 bytes of Texture Memory Available.... Not seen a problem with this change only more vram