frontends/va: fix undefined ref error

When building with "-Dvideo-codecs=h264dec,h265dec,av1dec" va/encode.c
won't be built but it's still required because it's used from
picture.c

Fixes: c4f05bdf60 ("frontends/va: include picture_*.c based on selected codec")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit 82a51ba9b3)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
This commit is contained in:
Pierre-Eric Pelloux-Prayer 2026-02-16 15:12:31 +01:00 committed by Eric Engestrom
parent 020b960d03
commit f1a3aa4036
2 changed files with 18 additions and 4 deletions

View file

@ -4494,7 +4494,7 @@
"description": "frontends/va: fix undefined ref error",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "c4f05bdf607b276cd18e7c86d2459e3dc8faffc1",
"notes": null

View file

@ -664,10 +664,8 @@ PROC void vlVaHandleSliceParameterBufferAV1(vlVaContext *context, vlVaBuffer *bu
#undef TAIL
#undef TAIL_S
VAStatus vlVaHandleEncBufferType(vlVaDriver *drv, vlVaContext *context, vlVaBuffer *buf);
void vlVaHandleVAEncMiscParameterTypeQualityLevel(struct pipe_enc_quality_modes *p, vlVaQualityBits *in);
#if VIDEO_CODEC_H264ENC
#define HAS_ENCODE
#define PROC
#define TAIL
#else
@ -688,6 +686,7 @@ PROC VAStatus vlVaHandleVAEncMiscParameterTypeHRDH264(vlVaContext *context, VAEn
#undef TAIL
#if VIDEO_CODEC_H265ENC
#define HAS_ENCODE
#define PROC
#define TAIL
#else
@ -709,6 +708,7 @@ PROC VAStatus vlVaHandleVAEncMiscParameterTypeTemporalLayerHEVC(vlVaContext *con
#if VA_CHECK_VERSION(1, 16, 0)
#if VIDEO_CODEC_AV1ENC
#define HAS_ENCODE
#define PROC
#define TAIL
#else
@ -727,4 +727,18 @@ PROC VAStatus vlVaHandleVAEncSliceParameterBufferTypeAV1(vlVaDriver *drv, vlVaCo
#undef PROC
#undef TAIL
#endif
#ifdef HAS_ENCODE
#define PROC
#define TAIL
#else
#define PROC static inline
#define TAIL {return VA_STATUS_ERROR_UNIMPLEMENTED;}
#endif
PROC VAStatus vlVaHandleEncBufferType(vlVaDriver *drv, vlVaContext *context, vlVaBuffer *buf) TAIL;
#undef PROC
#undef TAIL
void vlVaHandleVAEncMiscParameterTypeQualityLevel(struct pipe_enc_quality_modes *p, vlVaQualityBits *in);
#endif //VA_PRIVATE_H