View Single Post
Old 01-05-12, 10:51 AM   #1
Registered User
Join Date: Nov 2008
Posts: 10
Default 290.x, 295.x depend on shader source after compilation

Beginning with the 290.x series, changing the source string of a shader after compilation causes unpredictable behavior when the shader is applied. For example, setting the source to an empty string (or some other, non-GLSL string) often results in nothing being drawn, but sometimes results in other strange output. This seems to be in violation of the OpenGL 2.1 specification, section 2.15.1, which states, "Changing the source code of a shader object with ShaderSource does not change its compile status or the compiled shader code."

Presumably, this is the result of the driver automatically recompiling the shader for the sake of optimization. In that case, it would be better to use a copy of/reference to the source used at the time of user-initiated compilation rather than whatever the source string happens to be at the time of recompilation.
Attached Files
File Type: gz nvidia-bug-report.log.gz (57.4 KB, 37 views)
snzzbk is offline   Reply With Quote