radeonsi/vcn: Don't use chroma in AV1 encode with RGB input

Fixes: 64eab1f3ae

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Reviewed-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24170>
This commit is contained in:
David Rosca 2023-07-16 17:34:20 +02:00 committed by Marge Bot
parent 2cb4c6aef0
commit cfd24047a1

View File

@ -892,7 +892,8 @@ static void radeon_enc_av1_encode_params(struct radeon_encoder *enc)
enc->enc_pic.enc_params.allowed_max_bitstream_size = enc->bs_size;
enc->enc_pic.enc_params.input_pic_luma_pitch = enc->luma->u.gfx9.surf_pitch;
enc->enc_pic.enc_params.input_pic_chroma_pitch = enc->chroma->u.gfx9.surf_pitch;
enc->enc_pic.enc_params.input_pic_chroma_pitch = enc->chroma ?
enc->chroma->u.gfx9.surf_pitch : enc->luma->u.gfx9.surf_pitch;
enc->enc_pic.enc_params.input_pic_swizzle_mode = enc->luma->u.gfx9.swizzle_mode;
RADEON_ENC_BEGIN(enc->cmd.enc_params);
@ -907,7 +908,8 @@ static void radeon_enc_av1_encode_params(struct radeon_encoder *enc)
RADEON_ENC_CS(0);
} else {
RADEON_ENC_READ(enc->handle, RADEON_DOMAIN_VRAM, enc->luma->u.gfx9.surf_offset);
RADEON_ENC_READ(enc->handle, RADEON_DOMAIN_VRAM, enc->chroma->u.gfx9.surf_offset);
RADEON_ENC_READ(enc->handle, RADEON_DOMAIN_VRAM, enc->chroma ?
enc->chroma->u.gfx9.surf_offset : enc->luma->u.gfx9.surf_pitch);
}
RADEON_ENC_CS(enc->enc_pic.enc_params.input_pic_luma_pitch);