Mesa (master): pan/bi: Pack fp16 ATEST
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Apr 27 15:06:57 UTC 2020
Module: Mesa
Branch: master
Commit: 462af10bb785fa99b082207229cd39313ab08773
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=462af10bb785fa99b082207229cd39313ab08773
Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date: Thu Apr 23 19:03:35 2020 -0400
pan/bi: Pack fp16 ATEST
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4766>
---
src/panfrost/bifrost/bi_pack.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/panfrost/bifrost/bi_pack.c b/src/panfrost/bifrost/bi_pack.c
index 0d2b9fb2e03..c17664362c5 100644
--- a/src/panfrost/bifrost/bi_pack.c
+++ b/src/panfrost/bifrost/bi_pack.c
@@ -1146,13 +1146,13 @@ bi_pack_add_st_vary(bi_clause *clause, bi_instruction *ins, struct bi_registers
static unsigned
bi_pack_add_atest(bi_clause *clause, bi_instruction *ins, struct bi_registers *regs)
{
- /* TODO: fp16 */
- assert(ins->src_types[1] == nir_type_float32);
+ bool fp16 = (ins->src_types[1] == nir_type_float16);
struct bifrost_add_atest pack = {
.src0 = bi_get_src(ins, regs, 0, false),
.src1 = bi_get_src(ins, regs, 1, false),
- .component = 1, /* Set for fp32 */
+ .half = fp16,
+ .component = fp16 ? ins->swizzle[1][0] : 1, /* Set for fp32 */
.op = BIFROST_ADD_OP_ATEST,
};
More information about the mesa-commit
mailing list