From cc3d29c6e7ccca1ac738cfeafbe4685fbec533f7 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Thu, 20 Feb 2020 07:41:26 -0500 Subject: [PATCH] pan/midgard: Identify clamp(x, -1.0, 1.0) flag 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 Tested-by: Marge Bot Part-of: --- src/panfrost/midgard/disassemble.c | 2 +- src/panfrost/midgard/midgard.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/panfrost/midgard/disassemble.c b/src/panfrost/midgard/disassemble.c index 2634959bc6d..93e11667749 100644 --- a/src/panfrost/midgard/disassemble.c +++ b/src/panfrost/midgard/disassemble.c @@ -140,7 +140,7 @@ print_reg(FILE *fp, unsigned reg, unsigned bits) static char *outmod_names_float[4] = { "", ".pos", - ".unk2", + ".one", ".sat" }; diff --git a/src/panfrost/midgard/midgard.h b/src/panfrost/midgard/midgard.h index 0e650db74e8..b270fd2a823 100644 --- a/src/panfrost/midgard/midgard.h +++ b/src/panfrost/midgard/midgard.h @@ -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 { -- 2.30.2