Ah ok, it is not unheard of for older GPUs to only support constant
array indices.  

Some previous-generation architectures don't have hardware to do array
indirection at run-time, so "array support" actually consists of
compile-time unrolling w/ constant indices.

I think you may have hit a brick wall on the 7800.

-- mew


> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:osg-users-
> [EMAIL PROTECTED] On Behalf Of Roni Rosenzweig
> Sent: Monday, February 04, 2008 1:36 PM
> To: OpenSceneGraph Users
> Subject: Re: [osg-users] problem using uniform arrays
> 
> Hi Mike
> I may have narrowed down the problem. It's not so much the arrays that
> are
> causing problems, but their usage.
> For example indexing an array like this:
> arr[ind]
> works fine for the vertex shader, but doesn't compile on the fragment
> shader, saying that the index has to be constant, so that arr[ind] is
> not
> allowed, but arr[3] is ok.
> However, since I'm using long arrays (70 elements), I don't know how
to
> work
> around this limitation.
> Any ideas?
> Notice that this error only happens on 7800, not on 8800.
> Also, even though I changed the osg notification level to debug, I get
> no
> error/warning messages when compiling and linking the shader. Don't
> know why
> ... (I used another glsl debugger to get the error messages)
> Roni
> 
> ----- Original Message -----
> From: "Mike Weiblen" <[EMAIL PROTECTED]>
> To: "OpenSceneGraph Users" <[email protected]>
> Sent: Monday, February 04, 2008 8:57 PM
> Subject: Re: [osg-users] problem using uniform arrays
> 
> 
> > Hi Roni,
> > See below
> >
> > > -----Original Message-----
> > > From: [EMAIL PROTECTED]
[mailto:osg-users-
> > > [EMAIL PROTECTED] On Behalf Of Roni Rosenzweig
> > > Sent: Monday, February 04, 2008 1:18 AM
> > > To: OpenSceneGraph Users
> > > Subject: [osg-users] problem using uniform arrays
> > >
> > > Hello
> > > I'm using uniform arrays in my glsl shader. On geforce 8800 it
> works
> > > great, but on 7800 doesn't work (converts to fixed shader).
> > > when I try to validate my shader code I get a
"GL_3DL_array_objects
> > > extension is disabled" error.
> >
> > Assuming you used 3Dlabs' GLSLvalidate tool which, as you can see,
is
> > only helpful up to a point.
> >
> > > Are uniform arrays not supported on geforce 7800?
> >
> > No idea.  Array support often a driver issue, but could require some
> > hardware capability.  Are both GPUs running exactly the same driver?
> >
> > It would be most helpful to see the actual error messages generated
> > during OSG's attempt to compile/link the shader code (eg perhaps you
> in
> > fact have a bug completely unrelated to arrays)  When you increase
> the
> > OSG_NOTIFY_LEVEL, it will print out the compile/link InfoLogs
> containing
> > diagnostic info.  What are those messages?
> >
> > Cut down your shader code to a bare minimum example that works on
> 8800
> > but fails on 7800.  That repro case should probably be no more than
a
> > couple lines.
> >
> > Hth
> > -- mew
> >
> > _______________________________________________
> > osg-users mailing list
> > [email protected]
> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-
> openscenegraph.org
> 
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-
> openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to