[Mesa-dev] [PATCH 09/18] panfrost/midgard: Add varying divide-by-z mode
Alyssa Rosenzweig
alyssa.rosenzweig at collabora.com
Mon Jun 10 22:01:37 UTC 2019
Turns out this modifier field is the same as Utgard-PP.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
---
src/gallium/drivers/panfrost/midgard/disassemble.c | 6 ++++--
src/gallium/drivers/panfrost/midgard/midgard.h | 5 +++--
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/gallium/drivers/panfrost/midgard/disassemble.c b/src/gallium/drivers/panfrost/midgard/disassemble.c
index 5f553ba27a0..6be262f7ba0 100644
--- a/src/gallium/drivers/panfrost/midgard/disassemble.c
+++ b/src/gallium/drivers/panfrost/midgard/disassemble.c
@@ -926,8 +926,10 @@ print_varying_parameters(midgard_load_store_word *word)
}
if (param.modifier != midgard_varying_mod_none) {
- if (param.modifier == midgard_varying_mod_perspective)
- printf(".perspective");
+ if (param.modifier == midgard_varying_mod_perspective_w)
+ printf(".perspectivew");
+ else if (param.modifier == midgard_varying_mod_perspective_z)
+ printf(".perspectivez");
else
printf(".mod%d", param.modifier);
}
diff --git a/src/gallium/drivers/panfrost/midgard/midgard.h b/src/gallium/drivers/panfrost/midgard/midgard.h
index ef06e298010..354d611e9df 100644
--- a/src/gallium/drivers/panfrost/midgard/midgard.h
+++ b/src/gallium/drivers/panfrost/midgard/midgard.h
@@ -440,9 +440,10 @@ typedef enum {
/* Other values unknown */
- /* Take the would-be result and divide all components by its w
+ /* Take the would-be result and divide all components by its z/w
* (perspective division baked in with the load) */
- midgard_varying_mod_perspective = 3,
+ midgard_varying_mod_perspective_z = 2,
+ midgard_varying_mod_perspective_w = 3,
} midgard_varying_modifier;
typedef struct
--
2.20.1
More information about the mesa-dev
mailing list