pan/va: Use validate_register_pair for BLEND pack

Instead of open-coding. Noticed by inspection.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17091>
This commit is contained in:
Alyssa Rosenzweig 2022-06-16 15:16:30 -04:00 committed by Marge Bot
parent b48933d641
commit d4377e1255

View file

@ -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);