glsl: Reorder ir_type_* enum for easier comparisons.
authorMatt Turner <mattst88@gmail.com>
Sat, 31 May 2014 18:20:37 +0000 (11:20 -0700)
committerMatt Turner <mattst88@gmail.com>
Wed, 4 Jun 2014 00:58:34 +0000 (17:58 -0700)
Makes checking whether an object is an ir_dereference, an ir_rvalue, or
an ir_jump simpler. Since ir_dereference is a subclass or ir_rvalue,
list its subtypes first so that they can both generate nice code.

Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
src/glsl/ir.h

index 02784e1f369c83d8a4e404e23b0d337ea603291a..57552e0f5678a0dbe97e9de137de981f9e48b513 100644 (file)
@@ -64,23 +64,23 @@ enum ir_node_type {
     * \c ir_instruction::ir_type has not been initialized.
     */
    ir_type_unset,
-   ir_type_variable,
-   ir_type_assignment,
-   ir_type_call,
-   ir_type_constant,
    ir_type_dereference_array,
    ir_type_dereference_record,
    ir_type_dereference_variable,
-   ir_type_discard,
+   ir_type_constant,
    ir_type_expression,
+   ir_type_swizzle,
+   ir_type_texture,
+   ir_type_variable,
+   ir_type_assignment,
+   ir_type_call,
    ir_type_function,
    ir_type_function_signature,
    ir_type_if,
    ir_type_loop,
    ir_type_loop_jump,
    ir_type_return,
-   ir_type_swizzle,
-   ir_type_texture,
+   ir_type_discard,
    ir_type_emit_vertex,
    ir_type_end_primitive,
    ir_type_max /**< maximum ir_type enum number, for validation */