http://bugs.winehq.org/show_bug.cgi?id=14762
--- Comment #66 from Tobias Jakobi liquid.acid@gmx.net 2009-04-08 21:09:09 --- I looked into what Stefan told me, and I don't think it's going to work.
Quote from the ARB_fragment_program docs:
The error INVALID_VALUE is generated by commands ProgramEnvParameter{fd}ARB, ProgramEnvParameter{fd}vARB, and GetProgramEnvParameter{fd}vARB if <index> is greater than or equal to the value of MAX_PROGRAM_ENV_PARAMETERS_ARB corresponding to the program target <target>.
Like Stefan mentioned MAX_PROGRAM_ENV_PARAMETERS_ARB is usually 256.
Even if it would work to put something like "PARAM ThisIsMyPrivateThing = {programs.env[256 + 1]};" into a fragment/vertex program, there is no way to reliably fill the PARAM with data.
The docs clearly state that this would trigger an error. I'm very much against exploiting some driver functionality that may be there (I haven't actually tested what Stefan told me), but is potentially unstable and only exists for some drivers / some GPUs.
Or am I misunderstanding something here??