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]))
45 * Base class of all IR instructions
47 class ir_instruction
: public exec_node
{
49 const struct glsl_type
*type
;
51 class ir_constant
*constant_expression_value();
53 /** ir_print_visitor helper for debugging. */
54 void print(void) const;
56 virtual void accept(ir_visitor
*) = 0;
57 virtual ir_visitor_status
accept(ir_hierarchical_visitor
*) = 0;
58 virtual ir_instruction
*clone(struct hash_table
*ht
) const = 0;
61 * \name IR instruction downcast functions
63 * These functions either cast the object to a derived class or return
64 * \c NULL if the object's type does not match the specified derived class.
65 * Additional downcast functions will be added as needed.
68 virtual class ir_variable
* as_variable() { return NULL
; }
69 virtual class ir_function
* as_function() { return NULL
; }
70 virtual class ir_dereference
* as_dereference() { return NULL
; }
71 virtual class ir_dereference_array
* as_dereference_array() { return NULL
; }
72 virtual class ir_dereference_variable
*as_dereference_variable() { return NULL
; }
73 virtual class ir_expression
* as_expression() { return NULL
; }
74 virtual class ir_rvalue
* as_rvalue() { return NULL
; }
75 virtual class ir_loop
* as_loop() { return NULL
; }
76 virtual class ir_assignment
* as_assignment() { return NULL
; }
77 virtual class ir_call
* as_call() { return NULL
; }
78 virtual class ir_return
* as_return() { return NULL
; }
79 virtual class ir_if
* as_if() { return NULL
; }
80 virtual class ir_swizzle
* as_swizzle() { return NULL
; }
81 virtual class ir_constant
* as_constant() { return NULL
; }
92 class ir_rvalue
: public ir_instruction
{
94 virtual ir_rvalue
*clone(struct hash_table
*) const = 0;
96 virtual ir_rvalue
* as_rvalue()
101 virtual bool is_lvalue()
107 * Get the variable that is ultimately referenced by an r-value
109 virtual ir_variable
*variable_referenced()
116 * If an r-value is a reference to a whole variable, get that variable
119 * Pointer to a variable that is completely dereferenced by the r-value. If
120 * the r-value is not a dereference or the dereference does not access the
121 * entire variable (i.e., it's just one array element, struct field), \c NULL
124 virtual ir_variable
*whole_variable_referenced()
137 enum ir_variable_mode
{
145 enum ir_variable_interpolation
{
152 class ir_variable
: public ir_instruction
{
154 ir_variable(const struct glsl_type
*, const char *);
156 virtual ir_variable
*clone(struct hash_table
*ht
) const;
158 virtual ir_variable
*as_variable()
163 virtual void accept(ir_visitor
*v
)
168 virtual ir_visitor_status
accept(ir_hierarchical_visitor
*);
172 * Get the string value for the interpolation qualifier
175 * If none of \c shader_in or \c shader_out is set, an empty string will
176 * be returned. Otherwise the string that would be used in a shader to
177 * specify \c mode will be returned.
179 const char *interpolation_string() const;
182 * Calculate the number of slots required to hold this variable
184 * This is used to determine how many uniform or varying locations a variable
185 * occupies. The count is in units of floating point components.
187 unsigned component_slots() const;
192 * Highest element accessed with a constant expression array index
194 * Not used for non-array variables.
196 unsigned max_array_access
;
198 unsigned read_only
:1;
200 unsigned invariant
:1;
201 /** If the variable is initialized outside of the scope of the shader */
202 unsigned shader_in
:1;
204 * If the variable value is later used outside of the scope of the shader.
206 unsigned shader_out
:1;
209 unsigned interpolation
:2;
212 * Flag that the whole array is assignable
214 * In GLSL 1.20 and later whole arrays are assignable (and comparable for
215 * equality). This flag enables this behavior.
217 unsigned array_lvalue
:1;
220 * Storage location of the base of this variable
222 * The precise meaning of this field depends on the nature of the variable.
224 * - Vertex shader input: one of the values from \c gl_vert_attrib.
225 * - Vertex shader output: one of the values from \c gl_vert_result.
226 * - Fragment shader input: one of the values from \c gl_frag_attrib.
227 * - Fragment shader output: one of the values from \c gl_frag_result.
228 * - Uniforms: Per-stage uniform slot number.
229 * - Other: This field is not currently used.
231 * If the variable is a uniform, shader input, or shader output, and the
232 * slot has not been assigned, the value will be -1.
237 * Emit a warning if this variable is accessed.
239 const char *warn_extension
;
242 * Value assigned in the initializer of a variable declared "const"
244 ir_constant
*constant_value
;
250 * The representation of a function instance; may be the full definition or
251 * simply a prototype.
253 class ir_function_signature
: public ir_instruction
{
254 /* An ir_function_signature will be part of the list of signatures in
258 ir_function_signature(const glsl_type
*return_type
);
260 virtual ir_function_signature
*clone(struct hash_table
*ht
) const;
262 virtual void accept(ir_visitor
*v
)
267 virtual ir_visitor_status
accept(ir_hierarchical_visitor
*);
270 * Get the name of the function for which this is a signature
272 const char *function_name() const;
275 * Get a handle to the function for which this is a signature
277 * There is no setter function, this function returns a \c const pointer,
278 * and \c ir_function_signature::_function is private for a reason. The
279 * only way to make a connection between a function and function signature
280 * is via \c ir_function::add_signature. This helps ensure that certain
281 * invariants (i.e., a function signature is in the list of signatures for
282 * its \c _function) are met.
284 * \sa ir_function::add_signature
286 inline const class ir_function
*function() const
288 return this->_function
;
292 * Check whether the qualifiers match between this signature's parameters
293 * and the supplied parameter list. If not, returns the name of the first
294 * parameter with mismatched qualifiers (for use in error messages).
296 const char *qualifiers_match(exec_list
*params
);
299 * Replace the current parameter list with the given one. This is useful
300 * if the current information came from a prototype, and either has invalid
301 * or missing parameter names.
303 void replace_parameters(exec_list
*new_params
);
306 * Function return type.
308 * \note This discards the optional precision qualifier.
310 const struct glsl_type
*return_type
;
313 * List of ir_variable of function parameters.
315 * This represents the storage. The paramaters passed in a particular
316 * call will be in ir_call::actual_paramaters.
318 struct exec_list parameters
;
320 /** Whether or not this function has a body (which may be empty). */
321 unsigned is_defined
:1;
323 /** Whether or not this function signature is a built-in. */
324 unsigned is_built_in
:1;
326 /** Body of instructions in the function. */
327 struct exec_list body
;
330 /** Function of which this signature is one overload. */
331 class ir_function
*_function
;
333 friend class ir_function
;
338 * Header for tracking multiple overloaded functions with the same name.
339 * Contains a list of ir_function_signatures representing each of the
342 class ir_function
: public ir_instruction
{
344 ir_function(const char *name
);
346 virtual ir_function
*clone(struct hash_table
*ht
) const;
348 virtual ir_function
*as_function()
353 virtual void accept(ir_visitor
*v
)
358 virtual ir_visitor_status
accept(ir_hierarchical_visitor
*);
360 void add_signature(ir_function_signature
*sig
)
362 sig
->_function
= this;
363 this->signatures
.push_tail(sig
);
367 * Get an iterator for the set of function signatures
369 exec_list_iterator
iterator()
371 return signatures
.iterator();
375 * Find a signature that matches a set of actual parameters, taking implicit
376 * conversions into account.
378 ir_function_signature
*matching_signature(exec_list
*actual_param
);
381 * Find a signature that exactly matches a set of actual parameters without
382 * any implicit type conversions.
384 ir_function_signature
*exact_matching_signature(exec_list
*actual_ps
);
387 * Name of the function.
393 * List of ir_function_signature for each overloaded function with this name.
395 struct exec_list signatures
;
398 inline const char *ir_function_signature::function_name() const
400 return this->_function
->name
;
406 * IR instruction representing high-level if-statements
408 class ir_if
: public ir_instruction
{
410 ir_if(ir_rvalue
*condition
)
411 : condition(condition
)
416 virtual ir_if
*clone(struct hash_table
*ht
) const;
418 virtual ir_if
*as_if()
423 virtual void accept(ir_visitor
*v
)
428 virtual ir_visitor_status
accept(ir_hierarchical_visitor
*);
430 ir_rvalue
*condition
;
431 /** List of ir_instruction for the body of the then branch */
432 exec_list then_instructions
;
433 /** List of ir_instruction for the body of the else branch */
434 exec_list else_instructions
;
439 * IR instruction representing a high-level loop structure.
441 class ir_loop
: public ir_instruction
{
443 ir_loop() : from(NULL
), to(NULL
), increment(NULL
), counter(NULL
)
448 virtual ir_loop
*clone(struct hash_table
*ht
) const;
450 virtual void accept(ir_visitor
*v
)
455 virtual ir_visitor_status
accept(ir_hierarchical_visitor
*);
457 virtual ir_loop
*as_loop()
463 * Get an iterator for the instructions of the loop body
465 exec_list_iterator
iterator()
467 return body_instructions
.iterator();
470 /** List of ir_instruction that make up the body of the loop. */
471 exec_list body_instructions
;
474 * \name Loop counter and controls
479 ir_rvalue
*increment
;
480 ir_variable
*counter
;
485 class ir_assignment
: public ir_rvalue
{
487 ir_assignment(ir_rvalue
*lhs
, ir_rvalue
*rhs
, ir_rvalue
*condition
);
489 virtual ir_assignment
*clone(struct hash_table
*ht
) const;
491 virtual void accept(ir_visitor
*v
)
496 virtual ir_visitor_status
accept(ir_hierarchical_visitor
*);
498 virtual ir_assignment
* as_assignment()
504 * Left-hand side of the assignment.
509 * Value being assigned
514 * Optional condition for the assignment.
516 ir_rvalue
*condition
;
519 /* Update ir_expression::num_operands() and operator_strs when
520 * updating this list.
522 enum ir_expression_operation
{
535 ir_unop_f2i
, /**< Float-to-integer conversion. */
536 ir_unop_i2f
, /**< Integer-to-float conversion. */
537 ir_unop_f2b
, /**< Float-to-boolean conversion */
538 ir_unop_b2f
, /**< Boolean-to-float conversion */
539 ir_unop_i2b
, /**< int-to-boolean conversion */
540 ir_unop_b2i
, /**< Boolean-to-int conversion */
541 ir_unop_u2f
, /**< Unsigned-to-float conversion. */
544 * \name Unary floating-point rounding operations.
554 * \name Trigonometric operations.
562 * \name Partial derivatives.
575 * Takes one of two combinations of arguments:
580 * Does not take integer types.
585 * \name Binary comparison operators
597 * \name Bit-wise binary operations.
619 class ir_expression
: public ir_rvalue
{
621 ir_expression(int op
, const struct glsl_type
*type
,
622 ir_rvalue
*, ir_rvalue
*);
624 virtual ir_expression
*as_expression()
629 virtual ir_expression
*clone(struct hash_table
*ht
) const;
631 static unsigned int get_num_operands(ir_expression_operation
);
632 unsigned int get_num_operands() const
634 return get_num_operands(operation
);
638 * Return a string representing this expression's operator.
640 const char *operator_string();
643 * Do a reverse-lookup to translate the given string into an operator.
645 static ir_expression_operation
get_operator(const char *);
647 virtual void accept(ir_visitor
*v
)
652 virtual ir_visitor_status
accept(ir_hierarchical_visitor
*);
654 ir_expression_operation operation
;
655 ir_rvalue
*operands
[2];
660 * IR instruction representing a function call
662 class ir_call
: public ir_rvalue
{
664 ir_call(ir_function_signature
*callee
, exec_list
*actual_parameters
)
667 assert(callee
->return_type
!= NULL
);
668 type
= callee
->return_type
;
669 actual_parameters
->move_nodes_to(& this->actual_parameters
);
672 virtual ir_call
*clone(struct hash_table
*ht
) const;
674 virtual ir_call
*as_call()
679 virtual void accept(ir_visitor
*v
)
684 virtual ir_visitor_status
accept(ir_hierarchical_visitor
*);
687 * Get a generic ir_call object when an error occurs
689 * Any allocation will be performed with 'ctx' as talloc owner.
691 static ir_call
*get_error_instruction(void *ctx
);
694 * Get an iterator for the set of acutal parameters
696 exec_list_iterator
iterator()
698 return actual_parameters
.iterator();
702 * Get the name of the function being called.
704 const char *callee_name() const
706 return callee
->function_name();
709 ir_function_signature
*get_callee()
715 * Set the function call target
717 void set_callee(ir_function_signature
*sig
);
720 * Generates an inline version of the function before @ir,
721 * returning the return value of the function.
723 ir_rvalue
*generate_inline(ir_instruction
*ir
);
732 ir_function_signature
*callee
;
734 /* List of ir_rvalue of paramaters passed in this call. */
735 exec_list actual_parameters
;
740 * \name Jump-like IR instructions.
742 * These include \c break, \c continue, \c return, and \c discard.
745 class ir_jump
: public ir_instruction
{
753 class ir_return
: public ir_jump
{
761 ir_return(ir_rvalue
*value
)
767 virtual ir_return
*clone(struct hash_table
*) const;
769 virtual ir_return
*as_return()
774 ir_rvalue
*get_value() const
779 virtual void accept(ir_visitor
*v
)
784 virtual ir_visitor_status
accept(ir_hierarchical_visitor
*);
791 * Jump instructions used inside loops
793 * These include \c break and \c continue. The \c break within a loop is
794 * different from the \c break within a switch-statement.
798 class ir_loop_jump
: public ir_jump
{
805 ir_loop_jump(jump_mode mode
)
811 virtual ir_loop_jump
*clone(struct hash_table
*) const;
813 virtual void accept(ir_visitor
*v
)
818 virtual ir_visitor_status
accept(ir_hierarchical_visitor
*);
820 bool is_break() const
822 return mode
== jump_break
;
825 bool is_continue() const
827 return mode
== jump_continue
;
830 /** Mode selector for the jump instruction. */
833 /** Loop containing this break instruction. */
838 * IR instruction representing discard statements.
840 class ir_discard
: public ir_jump
{
844 this->condition
= NULL
;
847 ir_discard(ir_rvalue
*cond
)
849 this->condition
= cond
;
852 virtual ir_discard
*clone(struct hash_table
*ht
) const;
854 virtual void accept(ir_visitor
*v
)
859 virtual ir_visitor_status
accept(ir_hierarchical_visitor
*);
861 ir_rvalue
*condition
;
867 * Texture sampling opcodes used in ir_texture
869 enum ir_texture_opcode
{
870 ir_tex
, /* Regular texture look-up */
871 ir_txb
, /* Texture look-up with LOD bias */
872 ir_txl
, /* Texture look-up with explicit LOD */
873 ir_txd
, /* Texture look-up with partial derivatvies */
874 ir_txf
/* Texel fetch with explicit LOD */
879 * IR instruction to sample a texture
881 * The specific form of the IR instruction depends on the \c mode value
882 * selected from \c ir_texture_opcodes. In the printed IR, these will
886 * | Projection divisor
887 * | | Shadow comparitor
890 * (tex (sampler) (coordinate) (0 0 0) (1) ( ))
891 * (txb (sampler) (coordinate) (0 0 0) (1) ( ) (bias))
892 * (txl (sampler) (coordinate) (0 0 0) (1) ( ) (lod))
893 * (txd (sampler) (coordinate) (0 0 0) (1) ( ) (dPdx dPdy))
894 * (txf (sampler) (coordinate) (0 0 0) (lod))
896 class ir_texture
: public ir_rvalue
{
898 ir_texture(enum ir_texture_opcode op
)
899 : op(op
), projector(NULL
), shadow_comparitor(NULL
)
904 virtual ir_texture
*clone(struct hash_table
*) const;
906 virtual void accept(ir_visitor
*v
)
911 virtual ir_visitor_status
accept(ir_hierarchical_visitor
*);
914 * Return a string representing the ir_texture_opcode.
916 const char *opcode_string();
918 /** Set the sampler and infer the type. */
919 void set_sampler(ir_dereference
*sampler
);
922 * Do a reverse-lookup to translate a string into an ir_texture_opcode.
924 static ir_texture_opcode
get_opcode(const char *);
926 enum ir_texture_opcode op
;
928 /** Sampler to use for the texture access. */
929 ir_dereference
*sampler
;
931 /** Texture coordinate to sample */
932 ir_rvalue
*coordinate
;
935 * Value used for projective divide.
937 * If there is no projective divide (the common case), this will be
938 * \c NULL. Optimization passes should check for this to point to a constant
939 * of 1.0 and replace that with \c NULL.
941 ir_rvalue
*projector
;
944 * Coordinate used for comparison on shadow look-ups.
946 * If there is no shadow comparison, this will be \c NULL. For the
947 * \c ir_txf opcode, this *must* be \c NULL.
949 ir_rvalue
*shadow_comparitor
;
951 /** Explicit texel offsets. */
952 signed char offsets
[3];
955 ir_rvalue
*lod
; /**< Floating point LOD */
956 ir_rvalue
*bias
; /**< Floating point LOD bias */
958 ir_rvalue
*dPdx
; /**< Partial derivative of coordinate wrt X */
959 ir_rvalue
*dPdy
; /**< Partial derivative of coordinate wrt Y */
965 struct ir_swizzle_mask
{
972 * Number of components in the swizzle.
974 unsigned num_components
:3;
977 * Does the swizzle contain duplicate components?
979 * L-value swizzles cannot contain duplicate components.
981 unsigned has_duplicates
:1;
985 class ir_swizzle
: public ir_rvalue
{
987 ir_swizzle(ir_rvalue
*, unsigned x
, unsigned y
, unsigned z
, unsigned w
,
990 ir_swizzle(ir_rvalue
*val
, const unsigned *components
, unsigned count
);
992 ir_swizzle(ir_rvalue
*val
, ir_swizzle_mask mask
);
994 virtual ir_swizzle
*clone(struct hash_table
*) const;
996 virtual ir_swizzle
*as_swizzle()
1002 * Construct an ir_swizzle from the textual representation. Can fail.
1004 static ir_swizzle
*create(ir_rvalue
*, const char *, unsigned vector_length
);
1006 virtual void accept(ir_visitor
*v
)
1011 virtual ir_visitor_status
accept(ir_hierarchical_visitor
*);
1015 return val
->is_lvalue() && !mask
.has_duplicates
;
1019 * Get the variable that is ultimately referenced by an r-value
1021 virtual ir_variable
*variable_referenced();
1024 ir_swizzle_mask mask
;
1028 * Initialize the mask component of a swizzle
1030 * This is used by the \c ir_swizzle constructors.
1032 void init_mask(const unsigned *components
, unsigned count
);
1036 class ir_dereference
: public ir_rvalue
{
1038 virtual ir_dereference
*clone(struct hash_table
*) const = 0;
1040 virtual ir_dereference
*as_dereference()
1048 * Get the variable that is ultimately referenced by an r-value
1050 virtual ir_variable
*variable_referenced() = 0;
1054 class ir_dereference_variable
: public ir_dereference
{
1056 ir_dereference_variable(ir_variable
*var
);
1058 virtual ir_dereference_variable
*clone(struct hash_table
*) const;
1060 virtual ir_dereference_variable
*as_dereference_variable()
1066 * Get the variable that is ultimately referenced by an r-value
1068 virtual ir_variable
*variable_referenced()
1073 virtual ir_variable
*whole_variable_referenced()
1075 /* ir_dereference_variable objects always dereference the entire
1076 * variable. However, if this dereference is dereferenced by anything
1077 * else, the complete deferefernce chain is not a whole-variable
1078 * dereference. This method should only be called on the top most
1079 * ir_rvalue in a dereference chain.
1084 virtual void accept(ir_visitor
*v
)
1089 virtual ir_visitor_status
accept(ir_hierarchical_visitor
*);
1092 * Object being dereferenced.
1098 class ir_dereference_array
: public ir_dereference
{
1100 ir_dereference_array(ir_rvalue
*value
, ir_rvalue
*array_index
);
1102 ir_dereference_array(ir_variable
*var
, ir_rvalue
*array_index
);
1104 virtual ir_dereference_array
*clone(struct hash_table
*) const;
1106 virtual ir_dereference_array
*as_dereference_array()
1112 * Get the variable that is ultimately referenced by an r-value
1114 virtual ir_variable
*variable_referenced()
1116 return this->array
->variable_referenced();
1119 virtual void accept(ir_visitor
*v
)
1124 virtual ir_visitor_status
accept(ir_hierarchical_visitor
*);
1127 ir_rvalue
*array_index
;
1130 void set_array(ir_rvalue
*value
);
1134 class ir_dereference_record
: public ir_dereference
{
1136 ir_dereference_record(ir_rvalue
*value
, const char *field
);
1138 ir_dereference_record(ir_variable
*var
, const char *field
);
1140 virtual ir_dereference_record
*clone(struct hash_table
*) const;
1143 * Get the variable that is ultimately referenced by an r-value
1145 virtual ir_variable
*variable_referenced()
1147 return this->record
->variable_referenced();
1150 virtual void accept(ir_visitor
*v
)
1155 virtual ir_visitor_status
accept(ir_hierarchical_visitor
*);
1163 * Data stored in an ir_constant
1165 union ir_constant_data
{
1173 class ir_constant
: public ir_rvalue
{
1175 ir_constant(const struct glsl_type
*type
, const ir_constant_data
*data
);
1176 ir_constant(bool b
);
1177 ir_constant(unsigned int u
);
1179 ir_constant(float f
);
1182 * Construct an ir_constant from a list of ir_constant values
1184 ir_constant(const struct glsl_type
*type
, exec_list
*values
);
1187 * Construct an ir_constant from a scalar component of another ir_constant
1189 * The new \c ir_constant inherits the type of the component from the
1193 * In the case of a matrix constant, the new constant is a scalar, \b not
1196 ir_constant(const ir_constant
*c
, unsigned i
);
1198 virtual ir_constant
*clone(struct hash_table
*) const;
1200 virtual ir_constant
*as_constant()
1205 virtual void accept(ir_visitor
*v
)
1210 virtual ir_visitor_status
accept(ir_hierarchical_visitor
*);
1213 * Get a particular component of a constant as a specific type
1215 * This is useful, for example, to get a value from an integer constant
1216 * as a float or bool. This appears frequently when constructors are
1217 * called with all constant parameters.
1220 bool get_bool_component(unsigned i
) const;
1221 float get_float_component(unsigned i
) const;
1222 int get_int_component(unsigned i
) const;
1223 unsigned get_uint_component(unsigned i
) const;
1226 ir_constant
*get_record_field(const char *name
);
1229 * Determine whether a constant has the same value as another constant
1231 bool has_value(const ir_constant
*) const;
1234 * Value of the constant.
1236 * The field used to back the values supplied by the constant is determined
1237 * by the type associated with the \c ir_instruction. Constants may be
1238 * scalars, vectors, or matrices.
1240 union ir_constant_data value
;
1242 exec_list components
;
1246 * Parameterless constructor only used by the clone method
1252 visit_exec_list(exec_list
*list
, ir_visitor
*visitor
);
1254 void validate_ir_tree(exec_list
*instructions
);
1257 * Make a clone of each IR instruction in a list
1259 * \param in List of IR instructions that are to be cloned
1260 * \param out List to hold the cloned instructions
1263 clone_ir_list(exec_list
*out
, const exec_list
*in
);
1266 _mesa_glsl_initialize_variables(exec_list
*instructions
,
1267 struct _mesa_glsl_parse_state
*state
);
1270 _mesa_glsl_initialize_functions(exec_list
*instructions
,
1271 struct _mesa_glsl_parse_state
*state
);