summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir.h
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2011-10-21 07:40:37 -0700
committerPaul Berry <[email protected]>2011-10-27 15:31:20 -0700
commitc488150dea083a9677429b4185c6b20d7facd52b (patch)
tree178b9c921d1408ad220d61b96276450104776472 /src/glsl/ir.h
parentcf45949d6a896651a5f3864d3b195e26d59eee74 (diff)
glsl: Distinguish between no interpolation qualifier and 'smooth'
Previously, we treated the 'smooth' qualifier as equivalent to no qualifier at all. However, this is incorrect for the built-in color variables (gl_FrontColor, gl_BackColor, gl_FrontSecondaryColor, and gl_BackSecondaryColor). For those variables, if there is no qualifier at all, interpolation should be flat if the shade model is GL_FLAT, and smooth if the shade model is GL_SMOOTH. To make this possible, I added a new value to the glsl_interp_qualifier enum, INTERP_QUALIFIER_NONE. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/glsl/ir.h')
-rw-r--r--src/glsl/ir.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/glsl/ir.h b/src/glsl/ir.h
index 4ea8764b68f..0c0cccbd034 100644
--- a/src/glsl/ir.h
+++ b/src/glsl/ir.h
@@ -283,6 +283,10 @@ public:
* \return The string that would be used in a shader to specify \c
* mode will be returned.
*
+ * This function is used to generate error messages of the form "shader
+ * uses %s interpolation qualifier", so in the case where there is no
+ * interpolation qualifier, it returns "no".
+ *
* This function should only be used on a shader input or output variable.
*/
const char *interpolation_string() const;