From: Rico Schüller Date: Wed, 21 Aug 2013 08:06:42 +0000 (+0200) Subject: vl/query: Only support VDP_CHROMA_TYPE_420 for 12 bit formats. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d8d90ecf30d9fe9c5b59bb4e5591818545f0ca1a;p=mesa.git vl/query: Only support VDP_CHROMA_TYPE_420 for 12 bit formats. Reviewed-by: Christian König --- diff --git a/src/gallium/state_trackers/vdpau/query.c b/src/gallium/state_trackers/vdpau/query.c index 72b1fe91b83..1d352528ce1 100644 --- a/src/gallium/state_trackers/vdpau/query.c +++ b/src/gallium/state_trackers/vdpau/query.c @@ -122,6 +122,11 @@ vlVdpVideoSurfaceQueryGetPutBitsYCbCrCapabilities(VdpDevice device, VdpChromaTyp pipe_mutex_lock(dev->mutex); switch(bits_ycbcr_format) { + case VDP_YCBCR_FORMAT_NV12: + case VDP_YCBCR_FORMAT_YV12: + *is_supported = surface_chroma_type == VDP_CHROMA_TYPE_420; + break; + case VDP_YCBCR_FORMAT_UYVY: case VDP_YCBCR_FORMAT_YUYV: *is_supported = surface_chroma_type == VDP_CHROMA_TYPE_422; @@ -133,7 +138,7 @@ vlVdpVideoSurfaceQueryGetPutBitsYCbCrCapabilities(VdpDevice device, VdpChromaTyp break; default: - *is_supported = true; + *is_supported = false; break; }