From: Alyssa Rosenzweig Date: Thu, 16 Jun 2022 19:16:30 +0000 (-0400) Subject: pan/va: Use validate_register_pair for BLEND pack X-Git-Tag: upstream/22.3.5~7100 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d4377e12558be7e231a3346ee0fc1e316f190966;p=platform%2Fupstream%2Fmesa.git pan/va: Use validate_register_pair for BLEND pack Instead of open-coding. Noticed by inspection. Signed-off-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/panfrost/bifrost/valhall/va_pack.c b/src/panfrost/bifrost/valhall/va_pack.c index d762e42..159e28f 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);