View Full Version : uniform name hasAlpha verboten? (nVidia)
12-06-2011, 02:31 PM
Anyone noticed that a float uniform named "hasAlpha" will always be filled with the value 1.0? Happens on some NV hardware/drivers. Everything works fine when I pick another name.
I'm guessing it is a sloppy driver-side bugfix for some game.
12-07-2011, 06:45 AM
... or maybe it is a built-in name used internally by the NVIDIA driver.
Either way, it looks like a driver bug.
12-07-2011, 03:14 PM
Oops, looks like it was a false alarm.
After some code changes my bug was inexplicably fixed. It may have to do with dynamic branching and the driver optimizing some stuff away, causing sampler/uniform locations to shift around. I still don't know in what way the uniform name could influence such though. Maybe the driver internally alphabetically sorts uniform names for fast glGetUniformLocation lookup (I had replaced "hasAlpha" with "hasXlpha" as workaround) or some other optimization.
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.