diff options
Diffstat (limited to 'mesalib/src/glsl/ir.h')
-rw-r--r-- | mesalib/src/glsl/ir.h | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/mesalib/src/glsl/ir.h b/mesalib/src/glsl/ir.h index e266328b2..ed3f086ce 100644 --- a/mesalib/src/glsl/ir.h +++ b/mesalib/src/glsl/ir.h @@ -106,6 +106,7 @@ public: /** ir_print_visitor helper for debugging. */ void print(void) const; + void fprint(FILE *f) const; virtual void accept(ir_visitor *) = 0; virtual ir_visitor_status accept(ir_hierarchical_visitor *) = 0; @@ -691,6 +692,20 @@ public: } atomic; /** + * ARB_shader_image_load_store qualifiers. + */ + struct { + bool read_only; /**< "readonly" qualifier. */ + bool write_only; /**< "writeonly" qualifier. */ + bool coherent; + bool _volatile; + bool restrict_flag; + + /** Image internal format if specified explicitly, otherwise GL_NONE. */ + GLenum format; + } image; + + /** * Highest element accessed with a constant expression array index * * Not used for non-array variables. @@ -1444,6 +1459,18 @@ public: } /** + * Return whether the expression operates on vectors horizontally. + */ + bool is_horizontal() const + { + return operation == ir_binop_all_equal || + operation == ir_binop_any_nequal || + operation == ir_unop_any || + operation == ir_binop_dot || + operation == ir_quadop_vector; + } + + /** * Return a string representing this expression's operator. */ const char *operator_string(); @@ -2339,7 +2366,7 @@ mode_string(const ir_variable *var); extern "C" { #endif /* __cplusplus */ -extern void _mesa_print_ir(struct exec_list *instructions, +extern void _mesa_print_ir(FILE *f, struct exec_list *instructions, struct _mesa_glsl_parse_state *state); #ifdef __cplusplus |