Imagination PowerVR SDK Blog

PFX limit 20 effects


#1

My app crashes now that I’ve added the 20th effect to my effect.pfx. I’m curious if there’s a way around this. I found an old thread from 2011 here, which talked about a texture limit. The thread suggests a workaround by changing m_nMaxTextures in CPVRTPFXParser. I don’t see this in version 3.2 however, so I was just wondering if there’s a solution.



To verify it wasn’t a problem with the 20th effect, I rearranged the effects within the file, and it’s always the 20th effect that fails. With 19 effects, the app loads fine and all effects perform correctly.



Thanks.



Valerie


#2

Hi Valerie,



In the old PFX parsing code that the 2011 post refers to, there were some arbitrary limitations in place. The code has since been re factored to use our CPVRTArray container class to make it more flexible.



I’ve filed a bug report (BRN46429) so this issue can be investigated by the engineers that maintain the PVRTools framework. In the meantime, I’d recommend splitting your effects into multiple PFX files, or trying to debug the PVRTools code.



Thanks,

Joe


#3

Nevermind…



The problem was in my code, where I created the effect array size = 19. Not sure where I got that number, or why but whatever.



One of these days it’s actually going to be one of your bugs…d’oh!



Thanks.


#4

Hi Valerie,



No problem. I’ll close the BRN. Glad to hear you found the cause of the issue.



Thanks,

Joe