Problem with ARBfp on Radeon9700Pro

Hello,

I’ve got a problem with a fragment program on my card. It seems that the program exceeds native resources (that’s what the error message says), but the number of instructions, params, etc. are much lower than the GL_MAX_… values. The actual numbers are:

                            value     max
native ALU instructions:     19        64
native TEX instructions:     16        32
native TEX indirections:      0         4
temporaries:                  1        46
parameters:                   6        32
attributes:                   3        10

Everything is compiled OK if I remove one LRP instruction. Is it possible that there are some other limitations than the maximal number of instructions, attributes, etc.? Or is one LRP instruction so expensive? Other instructions used are MOV, ADD, SUB, TEX, MUL, MAD, nothing else. Is it possible that some instructions compile to more than one instruction? I’ve got Catalyst 4.9 (didn’t work also on 4.8, I haven’t tried other versions).
Thanks

There seems to be something wrong cause tex indirection is 0. It should be at minimum 1.

At most, an instruction may end up beeing 3 in native form (I beleive)

Thanks for reply.

I tried reading the program properties and it gives strange results when I insert that LRP instruction:
without LRP it returns
ALU inst. 16
TEX inst. 6
TEX ind. 2
and compiles OK
and with the LRP
ALU inst. 19
TEX inst. 6
TEX ind. 0
and does not compile

It could mean that LRP is not natively supported.
It could be compiled to to 2 instructions :


LRP dest, source0, source1, source2;


SUB temp0, source1, source2;
MAD dest, source0, temp0, source2;

Yes, it does sounds like it wasn’t able to compile or compiler is very confused. I have seen the case of tex ind =0 before, and some of my old shaders seem to cause it to run in software.
I was using Cat 4.7 and 4.8