mesa/st: don't advertise NV_vdpau_interop if it doesn't work.
[mesa.git] / src / mesa / state_tracker / st_extensions.c
index 286c56a5563288acd1202796f8c12cef23078690..07bd1256743fe5a884cfd1b647eb64fec9aa5ac5 100644 (file)
@@ -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;
+   }
 }