#include "list.h"
#include "ir_visitor.h"
#include "ir_hierarchical_visitor.h"
-#include "main/mtypes.h"
#ifdef __cplusplus
ir_rvalue *as_rvalue_to_saturate();
- virtual bool is_lvalue(const struct _mesa_glsl_parse_state *state = NULL) const
+ virtual bool is_lvalue(const struct _mesa_glsl_parse_state * = NULL) const
{
return false;
}
* \sa ir_variable::state_slots
*/
struct ir_state_slot {
- int tokens[5];
+ gl_state_index16 tokens[STATE_LENGTH];
int swizzle;
};
*
* For the first declaration below, there will be an \c ir_variable named
* "instance" whose type and whose instance_type will be the same
- * \cglsl_type. For the second declaration, there will be an \c ir_variable
+ * \c glsl_type. For the second declaration, there will be an \c ir_variable
* named "f" whose type is float and whose instance_type is B2.
*
* "instance" is an interface instance variable, but "f" is not.
unsigned centroid:1;
unsigned sample:1;
unsigned patch:1;
+ /**
+ * Was an 'invariant' qualifier explicitly set in the shader?
+ *
+ * This is used to cross validate qualifiers.
+ */
+ unsigned explicit_invariant:1;
+ /**
+ * Is the variable invariant?
+ *
+ * It can happen either by having the 'invariant' qualifier
+ * explicitly set in the shader or by being used in calculations
+ * of other invariant variables.
+ */
unsigned invariant:1;
unsigned precise:1;
* variable has been used. For example, it is an error to redeclare a
* variable as invariant after it has been used.
*
- * This is only maintained in the ast_to_hir.cpp path, not in
- * Mesa's fixed function or ARB program paths.
+ * This is maintained in the ast_to_hir.cpp path and during linking,
+ * but not in Mesa's fixed function or ARB program paths.
*/
unsigned used:1;
*/
unsigned interpolation:2;
- /**
- * \name ARB_fragment_coord_conventions
- * @{
- */
- unsigned origin_upper_left:1;
- unsigned pixel_center_integer:1;
- /*@}*/
-
/**
* Was the location explicitly set in the shader?
*
unsigned is_xfb_only:1;
/**
- * Was a transfor feedback buffer set in the shader?
+ * Was a transform feedback buffer set in the shader?
*/
unsigned explicit_xfb_buffer:1;
/**
- * Was a transfor feedback offset set in the shader?
+ * Was a transform feedback offset set in the shader?
*/
unsigned explicit_xfb_offset:1;
/**
- * Was a transfor feedback stride set in the shader?
+ * Was a transform feedback stride set in the shader?
*/
unsigned explicit_xfb_stride:1;
ir_intrinsic_memory_barrier_buffer,
ir_intrinsic_memory_barrier_image,
ir_intrinsic_memory_barrier_shared,
+ ir_intrinsic_begin_invocation_interlock,
+ ir_intrinsic_end_invocation_interlock,
ir_intrinsic_vote_all,
ir_intrinsic_vote_any,
*/
union ir_constant_data value;
- /* Array elements */
- ir_constant **array_elements;
-
- /* Structure fields */
- exec_list components;
+ /* Array elements and structure fields */
+ ir_constant **const_elements;
private:
/**
_mesa_glsl_initialize_variables(exec_list *instructions,
struct _mesa_glsl_parse_state *state);
-extern void
-_mesa_glsl_initialize_derived_variables(struct gl_context *ctx,
- gl_shader *shader);
-
extern void
reparent_ir(exec_list *list, void *mem_ctx);