Mesa (master): panfrost/midgard: Note floating compares type convert
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Jun 10 14:06:02 UTC 2019
Module: Mesa
Branch: master
Commit: 215b8844eeb556a154c2233d3debeff660fd7ec8
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=215b8844eeb556a154c2233d3debeff660fd7ec8
Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date: Wed Jun 5 15:02:20 2019 -0700
panfrost/midgard: Note floating compares type convert
OP_TYPE_CONVERTS denotes an opcode that returns a different type than is
source (going from int-domain to float-domain or vice versa), named
after the f2i/i2f family of opcodes it covers. We care because source
mods are determined by the source type (i/f) but output modifiers are
determined by the output type (equals the source type, unless the op
type converts, in which case it's the opposite).
The upshot is that floating-point compares (feq/fne/etc) actually do
type-convert. That is, that take in floating-points and output in
integer space (a boolean), so we mark them off this way to ensure the
correct output modifiers are used.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
---
src/gallium/drivers/panfrost/midgard/midgard_ops.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/gallium/drivers/panfrost/midgard/midgard_ops.c b/src/gallium/drivers/panfrost/midgard/midgard_ops.c
index 97c12feec00..693fb56124d 100644
--- a/src/gallium/drivers/panfrost/midgard/midgard_ops.c
+++ b/src/gallium/drivers/panfrost/midgard/midgard_ops.c
@@ -73,10 +73,10 @@ struct mir_op_props alu_opcode_props[256] = {
[midgard_alu_op_imov] = {"imov", UNITS_MOST | QUIRK_FLIPPED_R24},
/* For vector comparisons, use ball etc */
- [midgard_alu_op_feq] = {"feq", UNITS_MOST | OP_COMMUTES},
- [midgard_alu_op_fne] = {"fne", UNITS_MOST | OP_COMMUTES},
- [midgard_alu_op_fle] = {"fle", UNITS_MOST},
- [midgard_alu_op_flt] = {"flt", UNITS_MOST},
+ [midgard_alu_op_feq] = {"feq", UNITS_MOST | OP_TYPE_CONVERT | OP_COMMUTES},
+ [midgard_alu_op_fne] = {"fne", UNITS_MOST | OP_TYPE_CONVERT | OP_COMMUTES},
+ [midgard_alu_op_fle] = {"fle", UNITS_MOST | OP_TYPE_CONVERT},
+ [midgard_alu_op_flt] = {"flt", UNITS_MOST | OP_TYPE_CONVERT},
[midgard_alu_op_ieq] = {"ieq", UNITS_MOST | OP_COMMUTES},
[midgard_alu_op_ine] = {"ine", UNITS_MOST | OP_COMMUTES},
[midgard_alu_op_ilt] = {"ilt", UNITS_MOST},
More information about the mesa-commit
mailing list