maximum temp registries

Hi, i am compiling a shader ARB_Fragment_program (arbfp1), it states at the bottom of the compiled code that i have 20 R-regs, 10 H-regs.

when run it says i am using too many registers, however using glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB,GL_MAX_PROGRAM_TEMPORARIES_ARB ,&a);

i get 32 for a

any ideas why this might be ??

cheers

It may be that after optimization and conversion to hardware instructions the number of registers exceeds the maximum. Still, the driver should not advertise 32 available registers if it can’t always provide them.

32 is a lot of registers. I recommend trying to reduce the number of temporaries in your program.