Mesa (main): pan/va: Use validate_register_pair for BLEND pack
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Jun 21 22:41:34 UTC 2022
Module: Mesa
Branch: main
Commit: d4377e12558be7e231a3346ee0fc1e316f190966
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d4377e12558be7e231a3346ee0fc1e316f190966
Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date: Thu Jun 16 15:16:30 2022 -0400
pan/va: Use validate_register_pair for BLEND pack
Instead of open-coding. Noticed by inspection.
Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17091>
---
src/panfrost/bifrost/valhall/va_pack.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/src/panfrost/bifrost/valhall/va_pack.c b/src/panfrost/bifrost/valhall/va_pack.c
index d762e42bf60..159e28f71ed 100644
--- a/src/panfrost/bifrost/valhall/va_pack.c
+++ b/src/panfrost/bifrost/valhall/va_pack.c
@@ -724,17 +724,7 @@ va_pack_instr(const bi_instr *I)
{
/* Source 0 - Blend descriptor (64-bit) */
hex |= ((uint64_t) va_pack_src(I->src[2])) << 0;
-
- /* Vaidate that it is a 64-bit register pair */
- assert(I->src[3].type == I->src[2].type);
-
- if (I->src[2].type == BI_INDEX_REGISTER) {
- assert(I->src[3].value & 1);
- assert(I->src[3].value == I->src[2].value + 1);
- } else {
- assert(I->src[3].offset & 1);
- assert(I->src[3].offset == I->src[2].offset + 1);
- }
+ va_validate_register_pair(I, 2);
/* Target */
assert((I->branch_offset & 0x7) == 0);
More information about the mesa-commit
mailing list