pan/midgard: Identify clamp(x, -1.0, 1.0) flag
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Thu, 20 Feb 2020 12:41:26 +0000 (07:41 -0500)
committerMarge Bot <eric+marge@anholt.net>
Thu, 20 Feb 2020 13:34:18 +0000 (13:34 +0000)
So *that's* what's .unk2 was about :)

We still need to add an opt pass for it, but we can do that further down
the line.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3892>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3892>

src/panfrost/midgard/disassemble.c
src/panfrost/midgard/midgard.h

index 2634959bc6da2c480211be8cd13cb140ad7fb6e1..93e11667749e82f2735d95f554b82e78a6b154f9 100644 (file)
@@ -140,7 +140,7 @@ print_reg(FILE *fp, unsigned reg, unsigned bits)
 static char *outmod_names_float[4] = {
         "",
         ".pos",
-        ".unk2",
+        ".one",
         ".sat"
 };
 
index 0e650db74e87a410ea0279a96a655bfa9e8fe3b9..b270fd2a8233f9a273e5931fc3b04b1a77569690 100644 (file)
@@ -207,9 +207,9 @@ typedef enum {
 
 typedef enum {
         midgard_outmod_none = 0,
-        midgard_outmod_pos  = 1,
-        /* 0x2 unknown */
-        midgard_outmod_sat  = 3
+        midgard_outmod_pos  = 1, /* max(x, 0.0) */
+        midgard_outmod_one  = 2, /* clamp(x, -1.0, 1.0) */
+        midgard_outmod_sat  = 3 /* clamp(x, 0.0, 1.0) */
 } midgard_outmod_float;
 
 typedef enum {