vp program and "result"

In my vp program, I named one of my temporaries result.
Is this illegal?
It gives me an error and when I rename it as resul, it works fine.

I’m quite certain it worked fine before.
My drivers are 44.03

Yes I know, it’s a stupid problem.

PS: I hope GL2 makes it easier to debug these things.

Originally posted by V-man:
[b]In my vp program, I named one of my temporaries result.
Is this illegal?
It gives me an error and when I rename it as resul, it works fine.

I’m quite certain it worked fine before.
My drivers are 44.03

Yes I know, it’s a stupid problem.

PS: I hope GL2 makes it easier to debug these things.[/b]

Yep… from the ARB_vp spec:

(93) This extension allows applications to name their own variables. What
keywords should be reserved?

RESOLVED: Instruction names and declaration keywords (e.g., PARAM) will
be reserved. Additionally, since attribute, parameter, and result
bindings are allowed in the program text, the binding prefix keywords
“vertex”, “state”, “program”, and “result” are reserved to simplify
parsing. This prevents the need to distinguish between
“vertex.position” (“vertex” as a binding) and “vertex.xyzw” (“vertex” as
a variable).

That’s odd. Even the spec uses result as a variable in all it’s examples.

Thanks.

It’s not used as a variable in the examples. It is used as a binding.

Originally posted by vincoof:
It’s not used as a variable in the examples. It is used as a binding.

Yes, it is a binding, but the spec is full of thisv line in the examples :

TEMP result, temp;

Why do they do that?

They do that because the result of an operation is logically called “result”, but I admit it leads to confusion.