diff options
author | Ian Romanick <[email protected]> | 2018-09-10 22:38:29 -0700 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-01-23 00:18:57 +0000 |
commit | 1d165b0548639df48c406fd6514298309e68aba9 (patch) | |
tree | 501b0fb310674a620f635789b1e9a43937322d1f /src/mesa/program | |
parent | 20d34c4ebf07c98a40ea43b0cccc95537c176fa9 (diff) |
glsl: Add new expressions for INTEL_shader_integer_functions2
v2: Re-write iadd64_saturate and isub64_saturate to avoid undefined
overflow behavior. Also fix copy-and-paste bug in isub64_saturate.
Suggested by Caio.
v3: Avoid signed integer overflow for abs_sub(0, INT_MIN). Noticed by
Caio.
v4: Alternate fix for signed integer overflow for abs_sub(0, INT_MIN).
I tried the previous methon in a small test program with -ftrapv, and it
failed.
Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/767>
Diffstat (limited to 'src/mesa/program')
-rw-r--r-- | src/mesa/program/ir_to_mesa.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp index dfc52e718d1..2bf01098db9 100644 --- a/src/mesa/program/ir_to_mesa.cpp +++ b/src/mesa/program/ir_to_mesa.cpp @@ -1296,6 +1296,12 @@ ir_to_mesa_visitor::visit(ir_expression *ir) case ir_binop_ldexp: case ir_binop_carry: case ir_binop_borrow: + case ir_binop_abs_sub: + case ir_binop_add_sat: + case ir_binop_sub_sat: + case ir_binop_avg: + case ir_binop_avg_round: + case ir_binop_mul_32x16: case ir_binop_imul_high: case ir_unop_interpolate_at_centroid: case ir_binop_interpolate_at_offset: @@ -1340,6 +1346,7 @@ ir_to_mesa_visitor::visit(ir_expression *ir) case ir_unop_unpack_image_2x32: case ir_unop_atan: case ir_binop_atan2: + case ir_unop_clz: assert(!"not supported"); break; |