Re: [info-performer] Vertex Program Parameter Problem

Date view Thread view Subject view Author view

From: Alexandre Naaman (naaman++at++laplace.engr.sgi.com)
Date: 06/18/2004 15:01:39


Hi Duvan,

> I am trying to use a vertex program with more than 32 local parameters
> (for vertex skinning). I allocate the space just as the sample program
> does...
>
>
> for (index = 0; index < 96; index++)
> {
> data = (float *) pfMalloc((sizeof(float) * 4), pfGetSharedArena());
>
> // Set the data values on the parameter we just allocated
> (...)
>
> // Set the vector to the vertex program.
> vertexParameters->setParameters(index, PF_GPP_FLOAT_4, 1, data);
> }
>
> When I reach the 33rd vertex parameter I get this..
>
> PF Fatal/Resource: pfMemory::new() Unable to allocate 32 bytes
> from arena 0x43d43000.
> Try using pfSharedArenaSize() or env PFSHAREDSIZE
> to increase the arena size
> (currently 65536.00 KBytes) and check for adequate setrlimit()
> values and available space on swap (or pfTmpDir()).
>
>
> I have already tried increasing the PFSHAREDSIZE value to 1GB, but it made
> no difference on which parameter it died at (33rd). Is there some
> limitation to the number of "data blocks" I can create within an Arena?
> Does Performer not support the 96+ vertex parameters specified by
> the OpenGL ARB_vertex_program extension?
>

Well, it looks like you've found a bug in pfGProgramParms::setParameters().

Internally we store a list of parameter arrays which are each of length
32. So, it looks to me like the logic for dealing with the case when a
33rd parameter props up is erroneous.

I've filed a bug (# 916606) for this and hope to get it fixed for the next
release (a quick glance at the code reveals that it shouldn't be too hard
to fix ...)

A+,

Alex.


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Fri Jun 18 2004 - 15:03:06 PDT