diff options
author | Alyssa Rosenzweig <[email protected]> | 2020-04-28 12:27:11 -0400 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-04-28 17:17:48 +0000 |
commit | 1520131d82812c815a08e322d182f7f2dc84f627 (patch) | |
tree | 06fd2dc2da321b9f2dbda352532a5a8c0a4567fd /src/panfrost | |
parent | 12ca99f2c1ac70844153362528808858af9aec32 (diff) |
pan/bi: Fix source mod testing for CMP
Outputs u32.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4789>
Diffstat (limited to 'src/panfrost')
-rw-r--r-- | src/panfrost/bifrost/bir.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/panfrost/bifrost/bir.c b/src/panfrost/bifrost/bir.c index a40b33800f8..923815b1524 100644 --- a/src/panfrost/bifrost/bir.c +++ b/src/panfrost/bifrost/bir.c @@ -38,14 +38,15 @@ bi_has_outmod(bi_instruction *ins) return classy && floaty; } -/* Technically we should check the source type, not the dest - * type, but the type converting opcodes (i2f, f2i) don't - * actually support mods so it doesn't matter. */ +/* Have to check source for e.g. compares */ bool bi_has_source_mods(bi_instruction *ins) { - return bi_has_outmod(ins); + bool classy = bi_class_props[ins->type] & BI_MODS; + bool floaty = nir_alu_type_get_base_type(ins->src_types[0]) == nir_type_float; + + return classy && floaty; } /* A source is swizzled if the op is swizzlable, in 8-bit or |