Clint Weisbrod
11-02-2005, 04:47 AM
Hi All,
Just wondering if anyone has run into issues involving native limits for GLSL fragment programs. I've written a fragment shader which uses gl_FragCoord to render using a stereographic projection. Just to avoid any confusion, I'm referring to the projection described at http://mathworld.wolfram.com/StereographicProjection.html and not two side-by-side images that you cross your eyes at. :-)
Anyway, the fragment program uses a fair amount of math and runs fine on a number of more capable cards; NVidia 6800 Ultra and ATI X800 XT. Both of these cards have significant capabilities with respect to items like GL_MAX_PROGRAM_INSTRUCTION_ARB.
I'm now trying to get the shader to run on a lesser card that still supports GLSL. The shader doesn't appear to do anything unless I start removing code to make the program smaller.
Is there no way of determining things like GL_PROGRAM_INSTRUCTIONS_ARB and GL_PROGRAM_ALU_INSTRUCTIONS_ARB as I used to be able to do using ARB fragment programs?
It would be ideal if I could make a call like:
GLint isUnderNativeLimits;
glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB, &isUnderNativeLimits);
Without such information, I have no way of knowing for certain if my shader will run on any particular GPU short of testing it on all of them. This would seem like a severe deficiency in the GLSL language specification.
I'm sure I must be missing something.
Thanks for any help.
Clint Weisbrod
Imaginova Canada, Ltd.
Starry Night Software.
Just wondering if anyone has run into issues involving native limits for GLSL fragment programs. I've written a fragment shader which uses gl_FragCoord to render using a stereographic projection. Just to avoid any confusion, I'm referring to the projection described at http://mathworld.wolfram.com/StereographicProjection.html and not two side-by-side images that you cross your eyes at. :-)
Anyway, the fragment program uses a fair amount of math and runs fine on a number of more capable cards; NVidia 6800 Ultra and ATI X800 XT. Both of these cards have significant capabilities with respect to items like GL_MAX_PROGRAM_INSTRUCTION_ARB.
I'm now trying to get the shader to run on a lesser card that still supports GLSL. The shader doesn't appear to do anything unless I start removing code to make the program smaller.
Is there no way of determining things like GL_PROGRAM_INSTRUCTIONS_ARB and GL_PROGRAM_ALU_INSTRUCTIONS_ARB as I used to be able to do using ARB fragment programs?
It would be ideal if I could make a call like:
GLint isUnderNativeLimits;
glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB, &isUnderNativeLimits);
Without such information, I have no way of knowing for certain if my shader will run on any particular GPU short of testing it on all of them. This would seem like a severe deficiency in the GLSL language specification.
I'm sure I must be missing something.
Thanks for any help.
Clint Weisbrod
Imaginova Canada, Ltd.
Starry Night Software.