[Mesa-dev] [PATCH] mesa/st: don't advertise NV_vdpau_interop if it doesn't work.

Ilia Mirkin imirkin at alum.mit.edu
Mon Sep 8 07:00:03 PDT 2014


On Mon, Sep 8, 2014 at 9:50 AM, Christian König <deathsimple at vodafone.de> wrote:
> From: Christian König <christian.koenig at amd.com>
>
> As long as we don't have a workaround for frame based
> decoding in VDPAU we should not advertise NV_vdpau_interop.
>
> v2: fix commit message, check if get_video_param is present
>
> Signed-off-by: Christian König <christian.koenig at amd.com>
> Cc: mesa-stable at lists.freedesktop.org

Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>

> ---
>  src/mesa/state_tracker/st_extensions.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
> index 286c56a..07bd125 100644
> --- a/src/mesa/state_tracker/st_extensions.c
> +++ b/src/mesa/state_tracker/st_extensions.c
> @@ -620,7 +620,6 @@ void st_init_extensions(struct pipe_screen *screen,
>     extensions->NV_fog_distance = GL_TRUE;
>     extensions->NV_texture_env_combine4 = GL_TRUE;
>     extensions->NV_texture_rectangle = GL_TRUE;
> -   extensions->NV_vdpau_interop = GL_TRUE;
>
>     extensions->OES_EGL_image = GL_TRUE;
>     extensions->OES_EGL_image_external = GL_TRUE;
> @@ -885,4 +884,11 @@ void st_init_extensions(struct pipe_screen *screen,
>                                     PIPE_BIND_SAMPLER_VIEW)) {
>        extensions->ARB_ES3_compatibility = GL_TRUE;
>     }
> +
> +   if (screen->get_video_param &&
> +       screen->get_video_param(screen, PIPE_VIDEO_PROFILE_UNKNOWN,
> +                               PIPE_VIDEO_ENTRYPOINT_BITSTREAM,
> +                               PIPE_VIDEO_CAP_SUPPORTS_INTERLACED)) {
> +      extensions->NV_vdpau_interop = GL_TRUE;
> +   }
>  }
> --
> 1.9.1
>


More information about the mesa-dev mailing list