summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir.h
diff options
context:
space:
mode:
authorConnor Abbott <[email protected]>2015-07-31 11:57:48 -0700
committerSamuel Iglesias Gonsálvez <[email protected]>2016-04-28 11:58:13 +0200
commit2ea3649c63f39f07b9cebda1ef0569b7347ada93 (patch)
tree7f920fa1a6e9967d4d556ca3ffabfe50f95f0845 /src/compiler/nir/nir.h
parent2cf3b28884047f1cdef76542355bd2a4dd653fde (diff)
nir: add a pass to lower some double operations
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 <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir.h')
-rw-r--r--src/compiler/nir/nir.h7
1 files changed, 7 insertions, 0 deletions
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);