diff options
author | Alyssa Rosenzweig <[email protected]> | 2020-04-15 11:45:49 -0400 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2020-04-17 16:25:35 -0400 |
commit | 1647884cec58577024c0ff5e22d276b9e8e741f6 (patch) | |
tree | ad5f9cd9e576d72bbe7ca371ad0695b60c4ac326 /src/panfrost | |
parent | d772bf01011fc41d14093892a46541dcb2b9b6db (diff) |
pan/bi: Workaround constant packing errata
Incomplete fix.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
Diffstat (limited to 'src/panfrost')
-rw-r--r-- | src/panfrost/bifrost/bi_pack.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/panfrost/bifrost/bi_pack.c b/src/panfrost/bifrost/bi_pack.c index edeb050aae1..f135cab5c02 100644 --- a/src/panfrost/bifrost/bi_pack.c +++ b/src/panfrost/bifrost/bi_pack.c @@ -1261,18 +1261,23 @@ bi_pack_constants(bi_context *ctx, bi_clause *clause, /* TODO: Pos */ assert(index == 0 && clause->bundle_count == 1); + assert(only); + + uint64_t hi = clause->constants[index + 0] >> 60ull; struct bifrost_fmt_constant quad = { .pos = 0, /* TODO */ .tag = done ? BIFROST_FMTC_FINAL : BIFROST_FMTC_CONSTANTS, .imm_1 = clause->constants[index + 0] >> 4, - .imm_2 = only ? 0 : clause->constants[index + 1] >> 4 + .imm_2 = ((hi < 8) ? (hi << 60ull) : 0) >> 4, }; /* XXX: On G71, Connor observed that the difference of the top 4 bits * of the second constant with the first must be less than 8, otherwise - * we have to swap them. I am not able to reproduce this on G52, - * further investigation needed. Possibly an errata. XXX */ + * we have to swap them. On G52, I'm able to reproduce a similar issue + * but with a different workaround (modeled above with a single + * constant, unclear how to workaround for multiple constants.) Further + * investigation needed. Possibly an errata. XXX */ util_dynarray_append(emission, struct bifrost_fmt_constant, quad); |