Updating nv_fragment_program parameters not working?

When I change named (or numbered) program parameters, the change doesn’t seem to affect rendering. The first value given to a parameter (after creating the fragment program) seems to stick indefinitely.

Right now I’m testing with a simple fragment program that just does “MOV o[COLH],p[1];” and drawing a grid of quads with immediate mode. Basically I’m doing 64 times in a loop: glProgramLocalParameter4fvARB, glBegin(GL_QUADS), 4 vertices, glEnd().

If I reload the program text between each quad things work and every quad gets a different color. Disabling fragment program or switching fragment program bind between quads doesn’t seem to help. All quads still get the color from the first one. OpenGL reports no errors.

I’ve tried to read the spec but can’t find any mention of conditions when you can’t change parameters. I’d expect that using a single program and changing parameters for different materials would be the expected way to use fragment program.

Card FX5800, driver 44.03.

I can’t help you, but I can confirm what you’re seeing. I ran into the same problem with a GFFX 5600 earlier this week.

Unfortunately I had to work around the problem right away and haven’t had time to report the bug (and make the obligatory demo app), so I just started sending the parameter through an unused vertex parameter (glColor).

Yeah we (my company) noticed this a while ago. It first appeared in ~44.03/44.02 (and some of the revisions before that) If you are able, you may be able to go back to a previous driver (43.8? -if you have beta access) revision until it gets fixed. (Nvidia are aware and have promised a fix soon)

If you can, please send me an app that repro’s this behavior (with source if possible) and I’ll file a bug on it.

Thanks for your help. As this seems to a be driver bug, I searched the net for any newer beta drivers, and version 44.10 fixed the problem for me!

I still have some similar issues with texture_shader/register_combiner settings not always updating (legacy path). This appears with GF4 too and is intermittent (unlike the above problem which happens every time). I haven’t been able to pinpoint exactly what doesn’t update under what conditions, so I haven’t been able to build a simpler test application for the issue.

I did find a mystery fix for this behavior though, by accident, so I can live with it:
If I do a single glGetCombinerInputParameter after any changes, it seems to cause some kind of reload and settings are updated. I dunno why a glGet triggers a reset (maybe it goes off the fast path momentarily or something), but if I toggle it on/off at runtime I either get flashing incorrect textures/shading or correct textures/shading.

So if anyone has seen similar problems (texture or combiner parameters settings not always updating) and perhaps found the real solution, I’d like to hear about that.

Originally posted by jra101:
If you can, please send me an app that repro’s this behavior (with source if possible) and I’ll file a bug on it.

I sent a very simple repro of this problem to NVIDIA a few weeks ago. I guess it is fixed in the latest betas.