3 * Copyright © 2010 Intel Corporation
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the "Software"),
7 * to deal in the Software without restriction, including without limitation
8 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 * and/or sell copies of the Software, and to permit persons to whom the
10 * Software is furnished to do so, subject to the following conditions:
12 * The above copyright notice and this permission notice (including the next
13 * paragraph) shall be included in all copies or substantial portions of the
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
37 #include "ir_visitor.h"
38 #include "ir_hierarchical_visitor.h"
41 #define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
49 * Base class of all IR instructions
51 class ir_instruction
: public exec_node
{
53 const struct glsl_type
*type
;
55 class ir_constant
*constant_expression_value();
57 /** ir_print_visitor helper for debugging. */
58 void print(void) const;
60 virtual void accept(ir_visitor
*) = 0;
61 virtual ir_visitor_status
accept(ir_hierarchical_visitor
*) = 0;
62 virtual ir_instruction
*clone(struct hash_table
*ht
) const = 0;
65 * \name IR instruction downcast functions
67 * These functions either cast the object to a derived class or return
68 * \c NULL if the object's type does not match the specified derived class.
69 * Additional downcast functions will be added as needed.
72 virtual class ir_variable
* as_variable() { return NULL
; }
73 virtual class ir_function
* as_function() { return NULL
; }
74 virtual class ir_dereference
* as_dereference() { return NULL
; }
75 virtual class ir_dereference_array
* as_dereference_array() { return NULL
; }
76 virtual class ir_dereference_variable
*as_dereference_variable() { return NULL
; }
77 virtual class ir_expression
* as_expression() { return NULL
; }
78 virtual class ir_rvalue
* as_rvalue() { return NULL
; }
79 virtual class ir_loop
* as_loop() { return NULL
; }
80 virtual class ir_assignment
* as_assignment() { return NULL
; }
81 virtual class ir_call
* as_call() { return NULL
; }
82 virtual class ir_return
* as_return() { return NULL
; }
83 virtual class ir_if
* as_if() { return NULL
; }
84 virtual class ir_swizzle
* as_swizzle() { return NULL
; }
85 virtual class ir_constant
* as_constant() { return NULL
; }
96 class ir_rvalue
: public ir_instruction
{
98 virtual ir_rvalue
*clone(struct hash_table
*) const = 0;
100 virtual ir_rvalue
* as_rvalue()
105 virtual bool is_lvalue()
111 * Get the variable that is ultimately referenced by an r-value
113 virtual ir_variable
*variable_referenced()
120 * If an r-value is a reference to a whole variable, get that variable
123 * Pointer to a variable that is completely dereferenced by the r-value. If
124 * the r-value is not a dereference or the dereference does not access the
125 * entire variable (i.e., it's just one array element, struct field), \c NULL
128 virtual ir_variable
*whole_variable_referenced()
141 enum ir_variable_mode
{
149 enum ir_variable_interpolation
{
156 class ir_variable
: public ir_instruction
{
158 ir_variable(const struct glsl_type
*, const char *);
160 virtual ir_variable
*clone(struct hash_table
*ht
) const;
162 virtual ir_variable
*as_variable()
167 virtual void accept(ir_visitor
*v
)
172 virtual ir_visitor_status
accept(ir_hierarchical_visitor
*);
176 * Get the string value for the interpolation qualifier
179 * If none of \c shader_in or \c shader_out is set, an empty string will
180 * be returned. Otherwise the string that would be used in a shader to
181 * specify \c mode will be returned.
183 const char *interpolation_string() const;
186 * Calculate the number of slots required to hold this variable
188 * This is used to determine how many uniform or varying locations a variable
189 * occupies. The count is in units of floating point components.
191 unsigned component_slots() const;
196 * Highest element accessed with a constant expression array index
198 * Not used for non-array variables.
200 unsigned max_array_access
;
202 unsigned read_only
:1;
204 unsigned invariant
:1;
205 /** If the variable is initialized outside of the scope of the shader */
206 unsigned shader_in
:1;
208 * If the variable value is later used outside of the scope of the shader.
210 unsigned shader_out
:1;
213 unsigned interpolation
:2;
216 * Flag that the whole array is assignable
218 * In GLSL 1.20 and later whole arrays are assignable (and comparable for
219 * equality). This flag enables this behavior.
221 unsigned array_lvalue
:1;
224 * Storage location of the base of this variable
226 * The precise meaning of this field depends on the nature of the variable.
228 * - Vertex shader input: one of the values from \c gl_vert_attrib.
229 * - Vertex shader output: one of the values from \c gl_vert_result.
230 * - Fragment shader input: one of the values from \c gl_frag_attrib.
231 * - Fragment shader output: one of the values from \c gl_frag_result.
232 * - Uniforms: Per-stage uniform slot number.
233 * - Other: This field is not currently used.
235 * If the variable is a uniform, shader input, or shader output, and the
236 * slot has not been assigned, the value will be -1.
241 * Emit a warning if this variable is accessed.
243 const char *warn_extension
;
246 * Value assigned in the initializer of a variable declared "const"
248 ir_constant
*constant_value
;
254 * The representation of a function instance; may be the full definition or
255 * simply a prototype.
257 class ir_function_signature
: public ir_instruction
{
258 /* An ir_function_signature will be part of the list of signatures in
262 ir_function_signature(const glsl_type
*return_type
);
264 virtual ir_function_signature
*clone(struct hash_table
*ht
) const;
266 virtual void accept(ir_visitor
*v
)
271 virtual ir_visitor_status
accept(ir_hierarchical_visitor
*);
274 * Get the name of the function for which this is a signature
276 const char *function_name() const;
279 * Get a handle to the function for which this is a signature
281 * There is no setter function, this function returns a \c const pointer,
282 * and \c ir_function_signature::_function is private for a reason. The
283 * only way to make a connection between a function and function signature
284 * is via \c ir_function::add_signature. This helps ensure that certain
285 * invariants (i.e., a function signature is in the list of signatures for
286 * its \c _function) are met.
288 * \sa ir_function::add_signature
290 inline const class ir_function
*function() const
292 return this->_function
;
296 * Check whether the qualifiers match between this signature's parameters
297 * and the supplied parameter list. If not, returns the name of the first
298 * parameter with mismatched qualifiers (for use in error messages).
300 const char *qualifiers_match(exec_list
*params
);
303 * Replace the current parameter list with the given one. This is useful
304 * if the current information came from a prototype, and either has invalid
305 * or missing parameter names.
307 void replace_parameters(exec_list
*new_params
);
310 * Function return type.
312 * \note This discards the optional precision qualifier.
314 const struct glsl_type
*return_type
;
317 * List of ir_variable of function parameters.
319 * This represents the storage. The paramaters passed in a particular
320 * call will be in ir_call::actual_paramaters.
322 struct exec_list parameters
;
324 /** Whether or not this function has a body (which may be empty). */
325 unsigned is_defined
:1;
327 /** Whether or not this function signature is a built-in. */
328 unsigned is_built_in
:1;
330 /** Body of instructions in the function. */
331 struct exec_list body
;
334 /** Function of which this signature is one overload. */
335 class ir_function
*_function
;
337 friend class ir_function
;
342 * Header for tracking multiple overloaded functions with the same name.
343 * Contains a list of ir_function_signatures representing each of the
346 class ir_function
: public ir_instruction
{
348 ir_function(const char *name
);
350 virtual ir_function
*clone(struct hash_table
*ht
) const;
352 virtual ir_function
*as_function()
357 virtual void accept(ir_visitor
*v
)
362 virtual ir_visitor_status
accept(ir_hierarchical_visitor
*);
364 void add_signature(ir_function_signature
*sig
)
366 sig
->_function
= this;
367 this->signatures
.push_tail(sig
);
371 * Get an iterator for the set of function signatures
373 exec_list_iterator
iterator()
375 return signatures
.iterator();
379 * Find a signature that matches a set of actual parameters, taking implicit
380 * conversions into account.
382 ir_function_signature
*matching_signature(exec_list
*actual_param
);
385 * Find a signature that exactly matches a set of actual parameters without
386 * any implicit type conversions.
388 ir_function_signature
*exact_matching_signature(exec_list
*actual_ps
);
391 * Name of the function.
397 * List of ir_function_signature for each overloaded function with this name.
399 struct exec_list signatures
;
402 inline const char *ir_function_signature::function_name() const
404 return this->_function
->name
;
410 * IR instruction representing high-level if-statements
412 class ir_if
: public ir_instruction
{
414 ir_if(ir_rvalue
*condition
)
415 : condition(condition
)
420 virtual ir_if
*clone(struct hash_table
*ht
) const;
422 virtual ir_if
*as_if()
427 virtual void accept(ir_visitor
*v
)
432 virtual ir_visitor_status
accept(ir_hierarchical_visitor
*);
434 ir_rvalue
*condition
;
435 /** List of ir_instruction for the body of the then branch */
436 exec_list then_instructions
;
437 /** List of ir_instruction for the body of the else branch */
438 exec_list else_instructions
;
443 * IR instruction representing a high-level loop structure.
445 class ir_loop
: public ir_instruction
{
447 ir_loop() : from(NULL
), to(NULL
), increment(NULL
), counter(NULL
)
452 virtual ir_loop
*clone(struct hash_table
*ht
) const;
454 virtual void accept(ir_visitor
*v
)
459 virtual ir_visitor_status
accept(ir_hierarchical_visitor
*);
461 virtual ir_loop
*as_loop()
467 * Get an iterator for the instructions of the loop body
469 exec_list_iterator
iterator()
471 return body_instructions
.iterator();
474 /** List of ir_instruction that make up the body of the loop. */
475 exec_list body_instructions
;
478 * \name Loop counter and controls
483 ir_rvalue
*increment
;
484 ir_variable
*counter
;
489 class ir_assignment
: public ir_rvalue
{
491 ir_assignment(ir_rvalue
*lhs
, ir_rvalue
*rhs
, ir_rvalue
*condition
);
493 virtual ir_assignment
*clone(struct hash_table
*ht
) const;
495 virtual void accept(ir_visitor
*v
)
500 virtual ir_visitor_status
accept(ir_hierarchical_visitor
*);
502 virtual ir_assignment
* as_assignment()
508 * Left-hand side of the assignment.
513 * Value being assigned
518 * Optional condition for the assignment.
520 ir_rvalue
*condition
;
523 /* Update ir_expression::num_operands() and operator_strs when
524 * updating this list.
526 enum ir_expression_operation
{
539 ir_unop_f2i
, /**< Float-to-integer conversion. */
540 ir_unop_i2f
, /**< Integer-to-float conversion. */
541 ir_unop_f2b
, /**< Float-to-boolean conversion */
542 ir_unop_b2f
, /**< Boolean-to-float conversion */
543 ir_unop_i2b
, /**< int-to-boolean conversion */
544 ir_unop_b2i
, /**< Boolean-to-int conversion */
545 ir_unop_u2f
, /**< Unsigned-to-float conversion. */
548 * \name Unary floating-point rounding operations.
558 * \name Trigonometric operations.
566 * \name Partial derivatives.
579 * Takes one of two combinations of arguments:
584 * Does not take integer types.
589 * \name Binary comparison operators
601 * \name Bit-wise binary operations.
622 class ir_expression
: public ir_rvalue
{
624 ir_expression(int op
, const struct glsl_type
*type
,
625 ir_rvalue
*, ir_rvalue
*);
627 virtual ir_expression
*as_expression()
632 virtual ir_expression
*clone(struct hash_table
*ht
) const;
634 static unsigned int get_num_operands(ir_expression_operation
);
635 unsigned int get_num_operands() const
637 return get_num_operands(operation
);
641 * Return a string representing this expression's operator.
643 const char *operator_string();
646 * Do a reverse-lookup to translate the given string into an operator.
648 static ir_expression_operation
get_operator(const char *);
650 virtual void accept(ir_visitor
*v
)
655 virtual ir_visitor_status
accept(ir_hierarchical_visitor
*);
657 ir_expression_operation operation
;
658 ir_rvalue
*operands
[2];
663 * IR instruction representing a function call
665 class ir_call
: public ir_rvalue
{
667 ir_call(const ir_function_signature
*callee
, exec_list
*actual_parameters
)
670 assert(callee
->return_type
!= NULL
);
671 type
= callee
->return_type
;
672 actual_parameters
->move_nodes_to(& this->actual_parameters
);
675 virtual ir_call
*clone(struct hash_table
*ht
) const;
677 virtual ir_call
*as_call()
682 virtual void accept(ir_visitor
*v
)
687 virtual ir_visitor_status
accept(ir_hierarchical_visitor
*);
690 * Get a generic ir_call object when an error occurs
692 * Any allocation will be performed with 'ctx' as talloc owner.
694 static ir_call
*get_error_instruction(void *ctx
);
697 * Get an iterator for the set of acutal parameters
699 exec_list_iterator
iterator()
701 return actual_parameters
.iterator();
705 * Get the name of the function being called.
707 const char *callee_name() const
709 return callee
->function_name();
712 const ir_function_signature
*get_callee()
718 * Set the function call target
720 void set_callee(const ir_function_signature
*sig
);
723 * Generates an inline version of the function before @ir,
724 * returning the return value of the function.
726 ir_rvalue
*generate_inline(ir_instruction
*ir
);
735 const ir_function_signature
*callee
;
737 /* List of ir_rvalue of paramaters passed in this call. */
738 exec_list actual_parameters
;
743 * \name Jump-like IR instructions.
745 * These include \c break, \c continue, \c return, and \c discard.
748 class ir_jump
: public ir_instruction
{
756 class ir_return
: public ir_jump
{
764 ir_return(ir_rvalue
*value
)
770 virtual ir_return
*clone(struct hash_table
*) const;
772 virtual ir_return
*as_return()
777 ir_rvalue
*get_value() const
782 virtual void accept(ir_visitor
*v
)
787 virtual ir_visitor_status
accept(ir_hierarchical_visitor
*);
794 * Jump instructions used inside loops
796 * These include \c break and \c continue. The \c break within a loop is
797 * different from the \c break within a switch-statement.
801 class ir_loop_jump
: public ir_jump
{
808 ir_loop_jump(jump_mode mode
)
814 virtual ir_loop_jump
*clone(struct hash_table
*) const;
816 virtual void accept(ir_visitor
*v
)
821 virtual ir_visitor_status
accept(ir_hierarchical_visitor
*);
823 bool is_break() const
825 return mode
== jump_break
;
828 bool is_continue() const
830 return mode
== jump_continue
;
833 /** Mode selector for the jump instruction. */
836 /** Loop containing this break instruction. */
841 * IR instruction representing discard statements.
843 class ir_discard
: public ir_jump
{
847 this->condition
= NULL
;
850 ir_discard(ir_rvalue
*cond
)
852 this->condition
= cond
;
855 virtual ir_discard
*clone(struct hash_table
*ht
) const;
857 virtual void accept(ir_visitor
*v
)
862 virtual ir_visitor_status
accept(ir_hierarchical_visitor
*);
864 ir_rvalue
*condition
;
870 * Texture sampling opcodes used in ir_texture
872 enum ir_texture_opcode
{
873 ir_tex
, /* Regular texture look-up */
874 ir_txb
, /* Texture look-up with LOD bias */
875 ir_txl
, /* Texture look-up with explicit LOD */
876 ir_txd
, /* Texture look-up with partial derivatvies */
877 ir_txf
/* Texel fetch with explicit LOD */
882 * IR instruction to sample a texture
884 * The specific form of the IR instruction depends on the \c mode value
885 * selected from \c ir_texture_opcodes. In the printed IR, these will
889 * | Projection divisor
890 * | | Shadow comparitor
893 * (tex (sampler) (coordinate) (0 0 0) (1) ( ))
894 * (txb (sampler) (coordinate) (0 0 0) (1) ( ) (bias))
895 * (txl (sampler) (coordinate) (0 0 0) (1) ( ) (lod))
896 * (txd (sampler) (coordinate) (0 0 0) (1) ( ) (dPdx dPdy))
897 * (txf (sampler) (coordinate) (0 0 0) (lod))
899 class ir_texture
: public ir_rvalue
{
901 ir_texture(enum ir_texture_opcode op
)
902 : op(op
), projector(NULL
), shadow_comparitor(NULL
)
907 virtual ir_texture
*clone(struct hash_table
*) const;
909 virtual void accept(ir_visitor
*v
)
914 virtual ir_visitor_status
accept(ir_hierarchical_visitor
*);
917 * Return a string representing the ir_texture_opcode.
919 const char *opcode_string();
921 /** Set the sampler and infer the type. */
922 void set_sampler(ir_dereference
*sampler
);
925 * Do a reverse-lookup to translate a string into an ir_texture_opcode.
927 static ir_texture_opcode
get_opcode(const char *);
929 enum ir_texture_opcode op
;
931 /** Sampler to use for the texture access. */
932 ir_dereference
*sampler
;
934 /** Texture coordinate to sample */
935 ir_rvalue
*coordinate
;
938 * Value used for projective divide.
940 * If there is no projective divide (the common case), this will be
941 * \c NULL. Optimization passes should check for this to point to a constant
942 * of 1.0 and replace that with \c NULL.
944 ir_rvalue
*projector
;
947 * Coordinate used for comparison on shadow look-ups.
949 * If there is no shadow comparison, this will be \c NULL. For the
950 * \c ir_txf opcode, this *must* be \c NULL.
952 ir_rvalue
*shadow_comparitor
;
954 /** Explicit texel offsets. */
955 signed char offsets
[3];
958 ir_rvalue
*lod
; /**< Floating point LOD */
959 ir_rvalue
*bias
; /**< Floating point LOD bias */
961 ir_rvalue
*dPdx
; /**< Partial derivative of coordinate wrt X */
962 ir_rvalue
*dPdy
; /**< Partial derivative of coordinate wrt Y */
968 struct ir_swizzle_mask
{
975 * Number of components in the swizzle.
977 unsigned num_components
:3;
980 * Does the swizzle contain duplicate components?
982 * L-value swizzles cannot contain duplicate components.
984 unsigned has_duplicates
:1;
988 class ir_swizzle
: public ir_rvalue
{
990 ir_swizzle(ir_rvalue
*, unsigned x
, unsigned y
, unsigned z
, unsigned w
,
993 ir_swizzle(ir_rvalue
*val
, const unsigned *components
, unsigned count
);
995 ir_swizzle(ir_rvalue
*val
, ir_swizzle_mask mask
);
997 virtual ir_swizzle
*clone(struct hash_table
*) const;
999 virtual ir_swizzle
*as_swizzle()
1005 * Construct an ir_swizzle from the textual representation. Can fail.
1007 static ir_swizzle
*create(ir_rvalue
*, const char *, unsigned vector_length
);
1009 virtual void accept(ir_visitor
*v
)
1014 virtual ir_visitor_status
accept(ir_hierarchical_visitor
*);
1018 return val
->is_lvalue() && !mask
.has_duplicates
;
1022 * Get the variable that is ultimately referenced by an r-value
1024 virtual ir_variable
*variable_referenced();
1027 ir_swizzle_mask mask
;
1031 * Initialize the mask component of a swizzle
1033 * This is used by the \c ir_swizzle constructors.
1035 void init_mask(const unsigned *components
, unsigned count
);
1039 class ir_dereference
: public ir_rvalue
{
1041 virtual ir_dereference
*clone(struct hash_table
*) const = 0;
1043 virtual ir_dereference
*as_dereference()
1051 * Get the variable that is ultimately referenced by an r-value
1053 virtual ir_variable
*variable_referenced() = 0;
1057 class ir_dereference_variable
: public ir_dereference
{
1059 ir_dereference_variable(ir_variable
*var
);
1061 virtual ir_dereference_variable
*clone(struct hash_table
*) const;
1063 virtual ir_dereference_variable
*as_dereference_variable()
1069 * Get the variable that is ultimately referenced by an r-value
1071 virtual ir_variable
*variable_referenced()
1076 virtual ir_variable
*whole_variable_referenced()
1078 /* ir_dereference_variable objects always dereference the entire
1079 * variable. However, if this dereference is dereferenced by anything
1080 * else, the complete deferefernce chain is not a whole-variable
1081 * dereference. This method should only be called on the top most
1082 * ir_rvalue in a dereference chain.
1087 virtual void accept(ir_visitor
*v
)
1092 virtual ir_visitor_status
accept(ir_hierarchical_visitor
*);
1095 * Object being dereferenced.
1101 class ir_dereference_array
: public ir_dereference
{
1103 ir_dereference_array(ir_rvalue
*value
, ir_rvalue
*array_index
);
1105 ir_dereference_array(ir_variable
*var
, ir_rvalue
*array_index
);
1107 virtual ir_dereference_array
*clone(struct hash_table
*) const;
1109 virtual ir_dereference_array
*as_dereference_array()
1115 * Get the variable that is ultimately referenced by an r-value
1117 virtual ir_variable
*variable_referenced()
1119 return this->array
->variable_referenced();
1122 virtual void accept(ir_visitor
*v
)
1127 virtual ir_visitor_status
accept(ir_hierarchical_visitor
*);
1130 ir_rvalue
*array_index
;
1133 void set_array(ir_rvalue
*value
);
1137 class ir_dereference_record
: public ir_dereference
{
1139 ir_dereference_record(ir_rvalue
*value
, const char *field
);
1141 ir_dereference_record(ir_variable
*var
, const char *field
);
1143 virtual ir_dereference_record
*clone(struct hash_table
*) const;
1146 * Get the variable that is ultimately referenced by an r-value
1148 virtual ir_variable
*variable_referenced()
1150 return this->record
->variable_referenced();
1153 virtual void accept(ir_visitor
*v
)
1158 virtual ir_visitor_status
accept(ir_hierarchical_visitor
*);
1166 * Data stored in an ir_constant
1168 union ir_constant_data
{
1176 class ir_constant
: public ir_rvalue
{
1178 ir_constant(const struct glsl_type
*type
, const ir_constant_data
*data
);
1179 ir_constant(bool b
);
1180 ir_constant(unsigned int u
);
1182 ir_constant(float f
);
1185 * Construct an ir_constant from a list of ir_constant values
1187 ir_constant(const struct glsl_type
*type
, exec_list
*values
);
1190 * Construct an ir_constant from a scalar component of another ir_constant
1192 * The new \c ir_constant inherits the type of the component from the
1196 * In the case of a matrix constant, the new constant is a scalar, \b not
1199 ir_constant(const ir_constant
*c
, unsigned i
);
1201 virtual ir_constant
*clone(struct hash_table
*) const;
1203 virtual ir_constant
*as_constant()
1208 virtual void accept(ir_visitor
*v
)
1213 virtual ir_visitor_status
accept(ir_hierarchical_visitor
*);
1216 * Get a particular component of a constant as a specific type
1218 * This is useful, for example, to get a value from an integer constant
1219 * as a float or bool. This appears frequently when constructors are
1220 * called with all constant parameters.
1223 bool get_bool_component(unsigned i
) const;
1224 float get_float_component(unsigned i
) const;
1225 int get_int_component(unsigned i
) const;
1226 unsigned get_uint_component(unsigned i
) const;
1229 ir_constant
*get_record_field(const char *name
);
1232 * Determine whether a constant has the same value as another constant
1234 bool has_value(const ir_constant
*) const;
1237 * Value of the constant.
1239 * The field used to back the values supplied by the constant is determined
1240 * by the type associated with the \c ir_instruction. Constants may be
1241 * scalars, vectors, or matrices.
1243 union ir_constant_data value
;
1245 exec_list components
;
1249 * Parameterless constructor only used by the clone method
1255 visit_exec_list(exec_list
*list
, ir_visitor
*visitor
);
1257 void validate_ir_tree(exec_list
*instructions
);
1260 * Make a clone of each IR instruction in a list
1262 * \param in List of IR instructions that are to be cloned
1263 * \param out List to hold the cloned instructions
1266 clone_ir_list(exec_list
*out
, const exec_list
*in
);
1269 _mesa_glsl_initialize_variables(exec_list
*instructions
,
1270 struct _mesa_glsl_parse_state
*state
);
1273 _mesa_glsl_initialize_functions(exec_list
*instructions
,
1274 struct _mesa_glsl_parse_state
*state
);