Home | History | Annotate | Download | only in glsl
      1 /*
      2  * Copyright (C) 2010 Intel Corporation
      3  *
      4  * Permission is hereby granted, free of charge, to any person obtaining a
      5  * copy of this software and associated documentation files (the "Software"),
      6  * to deal in the Software without restriction, including without limitation
      7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
      8  * and/or sell copies of the Software, and to permit persons to whom the
      9  * Software is furnished to do so, subject to the following conditions:
     10  *
     11  * The above copyright notice and this permission notice (including the next
     12  * paragraph) shall be included in all copies or substantial portions of the
     13  * Software.
     14  *
     15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
     16  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
     17  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
     18  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
     19  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
     20  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
     21  * DEALINGS IN THE SOFTWARE.
     22  */
     23 
     24 enum ir_expression_operation {
     25    ir_unop_bit_not,
     26    ir_unop_logic_not,
     27    ir_unop_neg,
     28    ir_unop_abs,
     29    ir_unop_sign,
     30    ir_unop_rcp,
     31    ir_unop_rsq,
     32    ir_unop_sqrt,
     33    ir_unop_exp,
     34    ir_unop_log,
     35    ir_unop_exp2,
     36    ir_unop_log2,
     37    ir_unop_f2i,
     38    ir_unop_f2u,
     39    ir_unop_i2f,
     40    ir_unop_f2b,
     41    ir_unop_b2f,
     42    ir_unop_i2b,
     43    ir_unop_b2i,
     44    ir_unop_u2f,
     45    ir_unop_i2u,
     46    ir_unop_u2i,
     47    ir_unop_d2f,
     48    ir_unop_f2d,
     49    ir_unop_d2i,
     50    ir_unop_i2d,
     51    ir_unop_d2u,
     52    ir_unop_u2d,
     53    ir_unop_d2b,
     54    ir_unop_bitcast_i2f,
     55    ir_unop_bitcast_f2i,
     56    ir_unop_bitcast_u2f,
     57    ir_unop_bitcast_f2u,
     58    ir_unop_bitcast_u642d,
     59    ir_unop_bitcast_i642d,
     60    ir_unop_bitcast_d2u64,
     61    ir_unop_bitcast_d2i64,
     62    ir_unop_i642i,
     63    ir_unop_u642i,
     64    ir_unop_i642u,
     65    ir_unop_u642u,
     66    ir_unop_i642b,
     67    ir_unop_i642f,
     68    ir_unop_u642f,
     69    ir_unop_i642d,
     70    ir_unop_u642d,
     71    ir_unop_i2i64,
     72    ir_unop_u2i64,
     73    ir_unop_b2i64,
     74    ir_unop_f2i64,
     75    ir_unop_d2i64,
     76    ir_unop_i2u64,
     77    ir_unop_u2u64,
     78    ir_unop_f2u64,
     79    ir_unop_d2u64,
     80    ir_unop_u642i64,
     81    ir_unop_i642u64,
     82    ir_unop_trunc,
     83    ir_unop_ceil,
     84    ir_unop_floor,
     85    ir_unop_fract,
     86    ir_unop_round_even,
     87    ir_unop_sin,
     88    ir_unop_cos,
     89    ir_unop_dFdx,
     90    ir_unop_dFdx_coarse,
     91    ir_unop_dFdx_fine,
     92    ir_unop_dFdy,
     93    ir_unop_dFdy_coarse,
     94    ir_unop_dFdy_fine,
     95    ir_unop_pack_snorm_2x16,
     96    ir_unop_pack_snorm_4x8,
     97    ir_unop_pack_unorm_2x16,
     98    ir_unop_pack_unorm_4x8,
     99    ir_unop_pack_half_2x16,
    100    ir_unop_unpack_snorm_2x16,
    101    ir_unop_unpack_snorm_4x8,
    102    ir_unop_unpack_unorm_2x16,
    103    ir_unop_unpack_unorm_4x8,
    104    ir_unop_unpack_half_2x16,
    105    ir_unop_bitfield_reverse,
    106    ir_unop_bit_count,
    107    ir_unop_find_msb,
    108    ir_unop_find_lsb,
    109    ir_unop_saturate,
    110    ir_unop_pack_double_2x32,
    111    ir_unop_unpack_double_2x32,
    112    ir_unop_pack_sampler_2x32,
    113    ir_unop_pack_image_2x32,
    114    ir_unop_unpack_sampler_2x32,
    115    ir_unop_unpack_image_2x32,
    116    ir_unop_frexp_sig,
    117    ir_unop_frexp_exp,
    118    ir_unop_noise,
    119    ir_unop_subroutine_to_int,
    120    ir_unop_interpolate_at_centroid,
    121    ir_unop_get_buffer_size,
    122    ir_unop_ssbo_unsized_array_length,
    123    ir_unop_pack_int_2x32,
    124    ir_unop_pack_uint_2x32,
    125    ir_unop_unpack_int_2x32,
    126    ir_unop_unpack_uint_2x32,
    127    ir_binop_add,
    128    ir_binop_sub,
    129    ir_binop_mul,
    130    ir_binop_imul_high,
    131    ir_binop_div,
    132    ir_binop_carry,
    133    ir_binop_borrow,
    134    ir_binop_mod,
    135    ir_binop_less,
    136    ir_binop_gequal,
    137    ir_binop_equal,
    138    ir_binop_nequal,
    139    ir_binop_all_equal,
    140    ir_binop_any_nequal,
    141    ir_binop_lshift,
    142    ir_binop_rshift,
    143    ir_binop_bit_and,
    144    ir_binop_bit_xor,
    145    ir_binop_bit_or,
    146    ir_binop_logic_and,
    147    ir_binop_logic_xor,
    148    ir_binop_logic_or,
    149    ir_binop_dot,
    150    ir_binop_min,
    151    ir_binop_max,
    152    ir_binop_pow,
    153    ir_binop_ubo_load,
    154    ir_binop_ldexp,
    155    ir_binop_vector_extract,
    156    ir_binop_interpolate_at_offset,
    157    ir_binop_interpolate_at_sample,
    158    ir_triop_fma,
    159    ir_triop_lrp,
    160    ir_triop_csel,
    161    ir_triop_bitfield_extract,
    162    ir_triop_vector_insert,
    163    ir_quadop_bitfield_insert,
    164    ir_quadop_vector,
    165 
    166    /* Sentinels marking the last of each kind of operation. */
    167    ir_last_unop = ir_unop_unpack_uint_2x32,
    168    ir_last_binop = ir_binop_interpolate_at_sample,
    169    ir_last_triop = ir_triop_vector_insert,
    170    ir_last_quadop = ir_quadop_vector,
    171    ir_last_opcode = ir_quadop_vector
    172 };
    173