vl: Add support for max level query v2
[mesa.git] / src / gallium / state_trackers / vdpau / query.c
index 2281dcfd60f96460956b77d52bb82e76a974f815..a6b34c719b71e7b5c8a512c821c381f48aa6b731 100644 (file)
@@ -176,13 +176,13 @@ vlVdpDecoderQueryCapabilities(VdpDevice device, VdpDecoderProfile profile,
       *is_supported = false;
       return VDP_STATUS_OK;
    }
-   
+
    pipe_mutex_lock(dev->mutex);
    *is_supported = pscreen->get_video_param(pscreen, p_profile, PIPE_VIDEO_CAP_SUPPORTED);
    if (*is_supported) {
       *max_width = pscreen->get_video_param(pscreen, p_profile, PIPE_VIDEO_CAP_MAX_WIDTH); 
       *max_height = pscreen->get_video_param(pscreen, p_profile, PIPE_VIDEO_CAP_MAX_HEIGHT);
-      *max_level = 16;
+      *max_level = pscreen->get_video_param(pscreen, p_profile, PIPE_VIDEO_CAP_MAX_LEVEL);
       *max_macroblocks = (*max_width/16)*(*max_height/16);
    } else {
       *max_width = 0;