st/mesa: conditionally enable GL_NV_vdpau_interop
Only enable it when we compile the state tracker as well. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
This commit is contained in:
@@ -1735,6 +1735,7 @@ AM_CONDITIONAL(HAVE_ST_XVMC, test "x$enable_xvmc" = xyes)
|
|||||||
if test "x$enable_vdpau" = xyes; then
|
if test "x$enable_vdpau" = xyes; then
|
||||||
PKG_CHECK_MODULES([VDPAU], [vdpau >= $VDPAU_REQUIRED])
|
PKG_CHECK_MODULES([VDPAU], [vdpau >= $VDPAU_REQUIRED])
|
||||||
gallium_st="$gallium_st vdpau"
|
gallium_st="$gallium_st vdpau"
|
||||||
|
DEFINES="$DEFINES -DHAVE_ST_VDPAU"
|
||||||
fi
|
fi
|
||||||
AM_CONDITIONAL(HAVE_ST_VDPAU, test "x$enable_vdpau" = xyes)
|
AM_CONDITIONAL(HAVE_ST_VDPAU, test "x$enable_vdpau" = xyes)
|
||||||
|
|
||||||
|
@@ -1067,12 +1067,14 @@ void st_init_extensions(struct pipe_screen *screen,
|
|||||||
extensions->ARB_ES3_compatibility = GL_TRUE;
|
extensions->ARB_ES3_compatibility = GL_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_ST_VDPAU
|
||||||
if (screen->get_video_param &&
|
if (screen->get_video_param &&
|
||||||
screen->get_video_param(screen, PIPE_VIDEO_PROFILE_UNKNOWN,
|
screen->get_video_param(screen, PIPE_VIDEO_PROFILE_UNKNOWN,
|
||||||
PIPE_VIDEO_ENTRYPOINT_BITSTREAM,
|
PIPE_VIDEO_ENTRYPOINT_BITSTREAM,
|
||||||
PIPE_VIDEO_CAP_SUPPORTS_INTERLACED)) {
|
PIPE_VIDEO_CAP_SUPPORTS_INTERLACED)) {
|
||||||
extensions->NV_vdpau_interop = GL_TRUE;
|
extensions->NV_vdpau_interop = GL_TRUE;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (screen->get_shader_param(screen, PIPE_SHADER_VERTEX,
|
if (screen->get_shader_param(screen, PIPE_SHADER_VERTEX,
|
||||||
PIPE_SHADER_CAP_DOUBLES) &&
|
PIPE_SHADER_CAP_DOUBLES) &&
|
||||||
|
@@ -49,6 +49,8 @@
|
|||||||
#include "st_format.h"
|
#include "st_format.h"
|
||||||
#include "st_cb_flush.h"
|
#include "st_cb_flush.h"
|
||||||
|
|
||||||
|
#ifdef HAVE_ST_VDPAU
|
||||||
|
|
||||||
static void
|
static void
|
||||||
st_vdpau_map_surface(struct gl_context *ctx, GLenum target, GLenum access,
|
st_vdpau_map_surface(struct gl_context *ctx, GLenum target, GLenum access,
|
||||||
GLboolean output, struct gl_texture_object *texObj,
|
GLboolean output, struct gl_texture_object *texObj,
|
||||||
@@ -180,9 +182,13 @@ st_vdpau_unmap_surface(struct gl_context *ctx, GLenum target, GLenum access,
|
|||||||
st_flush(st, NULL, 0);
|
st_flush(st, NULL, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
st_init_vdpau_functions(struct dd_function_table *functions)
|
st_init_vdpau_functions(struct dd_function_table *functions)
|
||||||
{
|
{
|
||||||
|
#ifdef HAVE_ST_VDPAU
|
||||||
functions->VDPAUMapSurface = st_vdpau_map_surface;
|
functions->VDPAUMapSurface = st_vdpau_map_surface;
|
||||||
functions->VDPAUUnmapSurface = st_vdpau_unmap_surface;
|
functions->VDPAUUnmapSurface = st_vdpau_unmap_surface;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user