From 2ea3649c63f39f07b9cebda1ef0569b7347ada93 Mon Sep 17 00:00:00 2001 From: Connor Abbott Date: Fri, 31 Jul 2015 11:57:48 -0700 Subject: nir: add a pass to lower some double operations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit v2: Move to compiler/nir (Iago) v3: Use nir_imm_int() to load the constants (Sam) v4 (Sam): - Undo line-wrap (Jason). - Fix comment (Jason). - Improve generated code for get_signed_inf() function (Connor). Signed-off-by: Samuel Iglesias Gonsálvez Reviewed-by: Jason Ekstrand --- src/compiler/nir/nir.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/compiler/nir/nir.h') diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index b23130e205b..cbbf47e2570 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -2413,6 +2413,13 @@ void nir_lower_to_source_mods(nir_shader *shader); bool nir_lower_gs_intrinsics(nir_shader *shader); +typedef enum { + nir_lower_drcp = (1 << 0), + nir_lower_dsqrt = (1 << 1), + nir_lower_drsq = (1 << 2), +} nir_lower_doubles_options; + +void nir_lower_doubles(nir_shader *shader, nir_lower_doubles_options options); void nir_lower_double_pack(nir_shader *shader); bool nir_normalize_cubemap_coords(nir_shader *shader); -- cgit v1.2.3