diff options
author | Paul Berry <[email protected]> | 2013-10-22 14:48:08 -0700 |
---|---|---|
committer | Paul Berry <[email protected]> | 2013-10-24 22:00:59 -0700 |
commit | f65feb5335331ed0960d3fd62a70d0d0aaf23ab7 (patch) | |
tree | 4b763d64a299302b4d947385602315f17b7ccd22 /src/glsl/ir.h | |
parent | 1e3e72e3054de27b35322feb6c715e433b00be2a (diff) |
glsl: Pull interpolation_string() out of ir_variable.
Future patches will need to call this function when there isn't an
ir_varible present to refer to.
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/glsl/ir.h')
-rw-r--r-- | src/glsl/ir.h | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/src/glsl/ir.h b/src/glsl/ir.h index aac8cbb7dbe..c4c00552ac3 100644 --- a/src/glsl/ir.h +++ b/src/glsl/ir.h @@ -312,6 +312,22 @@ struct ir_state_slot { int swizzle; }; + +/** + * Get the string value for an interpolation qualifier + * + * \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(unsigned interpolation); + + class ir_variable : public ir_instruction { public: ir_variable(const struct glsl_type *, const char *, ir_variable_mode); @@ -332,20 +348,6 @@ public: /** - * Get the string value for the interpolation qualifier - * - * \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; - - /** * Determine how this variable should be interpolated based on its * interpolation qualifier (if present), whether it is gl_Color or * gl_SecondaryColor, and whether flatshading is enabled in the current GL |