Commit 7376e698 authored by Austin Yuan's avatar Austin Yuan

Fix build issue

Signed-off-by: default avatarAustin Yuan <shengquan.yuan@gmail.com>
parent deb99d31
...@@ -153,7 +153,8 @@ AC_OUTPUT([ ...@@ -153,7 +153,8 @@ AC_OUTPUT([
va/Makefile va/Makefile
va/va_version.h va/va_version.h
va/x11/Makefile va/x11/Makefile
va/android/Makefile va/glx/Makefile
va/dummy/Makefile
dummy_drv_video/Makefile dummy_drv_video/Makefile
i965_drv_video/Makefile i965_drv_video/Makefile
i965_drv_video/shaders/Makefile i965_drv_video/shaders/Makefile
......
...@@ -27,10 +27,8 @@ INCLUDES = \ ...@@ -27,10 +27,8 @@ INCLUDES = \
LDADD = \ LDADD = \
$(LIBVA_LT_LDFLAGS) $(LIBVA_LT_LDFLAGS)
lib_LTLIBRARIES = \ libva_x11_backend = libva-x11.la
libva.la \ libva_x11_backenddir = x11
libva-tpi.la \
libva-x11.la
libva_ladir = $(libdir) libva_ladir = $(libdir)
libva_la_LDFLAGS = $(LDADD) -no-undefined libva_la_LDFLAGS = $(LDADD) -no-undefined
...@@ -40,28 +38,46 @@ libva_tpi_ladir = $(libdir) ...@@ -40,28 +38,46 @@ libva_tpi_ladir = $(libdir)
libva_tpi_la_LDFLAGS = $(LDADD) -no-undefined libva_tpi_la_LDFLAGS = $(LDADD) -no-undefined
libva_tpi_la_LIBADD = $(libvacorelib) -ldl libva_tpi_la_LIBADD = $(libvacorelib) -ldl
libva_x11_la_SOURCES =
libva_x11_la_LIBADD = $(libvacorelib) x11/libva_x11.la $(LIBVA_LIBS) $(X11_LIBS) $(XEXT_LIBS) $(DRM_LIBS) $(XFIXES_LIBS)
libva_x11_la_LDFLAGS = $(LDADD)
libva_x11_la_DEPENDENCIES = $(libvacorelib) x11/libva_x11.la
SUBDIRS = x11
if BUILD_DUMMY_BACKEND if BUILD_DUMMY_BACKEND
lib_LTLIBRARIES += libva-dummy.la libva_dummy_backend = libva-dummy.la
libva_dummy_backenddir = dummy
libva_dummy_la_SOURCES = libva_dummy_la_SOURCES =
libva_dummy_la_LIBADD = $(libvacorelib) dummy/libva_dummy.la $(LIBVA_LIBS) $(DRM_LIBS) libva_dummy_la_LIBADD = $(libvacorelib) dummy/libva_dummy.la $(LIBVA_LIBS) $(DRM_LIBS)
libva_dummy_la_LDFLAGS = $(LDADD) libva_dummy_la_LDFLAGS = $(LDADD)
libva_dummy_la_DEPENDENCIES = $(libvacorelib) dummy/libva_dummy.la libva_dummy_la_DEPENDENCIES = $(libvacorelib) dummy/libva_dummy.la
else
libva_dummy_backend =
libva_dummy_backenddir =
endif
if USE_GLX
libva_glx_backend = libva-glx.la
libva_glx_backenddir = glx
SUBDIRS += dummy libva_glx_la_SOURCES =
libva_glx_la_LIBADD = $(libvacorelib) glx/libva_glx.la libva-x11.la $(GL_DEPS_LIBS) -ldl
libva_glx_la_LDFLAGS = $(LDADD)
libva_glx_la_DEPENDENCIES = $(libvacorelib) glx/libva_glx.la libva-x11.la
else
libva_glx_backend =
libva_glx_backenddir =
endif endif
libva_x11_la_SOURCES =
libva_x11_la_LIBADD = $(libvacorelib) x11/libva_x11.la $(LIBVA_LIBS) $(X11_LIBS) $(XEXT_LIBS) $(DRM_LIBS) $(XFIXES_LIBS)
libva_x11_la_LDFLAGS = $(LDADD)
libva_x11_la_DEPENDENCIES = $(libvacorelib) x11/libva_x11.la
libva_la_SOURCES = va.c va_trace.c libva_la_SOURCES = va.c va_trace.c
libva_tpi_la_SOURCES = va_tpi.c libva_tpi_la_SOURCES = va_tpi.c
lib_LTLIBRARIES = libva.la libva-tpi.la $(libva_x11_backend) $(libva_dummy_backend) $(libva_glx_backend)
SUBDIRS = $(libva_x11_backenddir) $(libva_dummy_backenddir) $(libva_glx_backenddir)
libvaincludedir = ${includedir}/va libvaincludedir = ${includedir}/va
libvainclude_HEADERS = va.h va_tpi.h va_x11.h va_backend.h va_backend_tpi.h va_dummy.h va_version.h libvainclude_HEADERS = va.h va_tpi.h va_x11.h va_backend.h va_backend_tpi.h va_dummy.h va_version.h
......
...@@ -199,7 +199,7 @@ static int check_tfp_extensions(VADriverContextP ctx) ...@@ -199,7 +199,7 @@ static int check_tfp_extensions(VADriverContextP ctx)
if (!check_extension("GL_ARB_texture_non_power_of_two", gl_extensions)) if (!check_extension("GL_ARB_texture_non_power_of_two", gl_extensions))
return 0; return 0;
glx_extensions = glXQueryExtensionsString(ctx->x11_dpy, ctx->x11_screen); glx_extensions = glXQueryExtensionsString((Display *)ctx->native_dpy, ctx->x11_screen);
if (!check_extension("GLX_EXT_texture_from_pixmap", glx_extensions)) if (!check_extension("GLX_EXT_texture_from_pixmap", glx_extensions))
return 0; return 0;
return 1; return 1;
...@@ -332,7 +332,7 @@ gl_create_context(VADriverContextP ctx, OpenGLContextStateP parent) ...@@ -332,7 +332,7 @@ gl_create_context(VADriverContextP ctx, OpenGLContextStateP parent)
if (!cs) if (!cs)
goto error; goto error;
cs->display = ctx->x11_dpy; cs->display = (Display *)ctx->native_dpy;
cs->window = parent ? parent->window : None; cs->window = parent ? parent->window : None;
cs->context = NULL; cs->context = NULL;
...@@ -349,7 +349,7 @@ gl_create_context(VADriverContextP ctx, OpenGLContextStateP parent) ...@@ -349,7 +349,7 @@ gl_create_context(VADriverContextP ctx, OpenGLContextStateP parent)
goto choose_fbconfig; goto choose_fbconfig;
fbconfigs = glXGetFBConfigs( fbconfigs = glXGetFBConfigs(
ctx->x11_dpy, (Display *)ctx->native_dpy,
ctx->x11_screen, ctx->x11_screen,
&n_fbconfigs &n_fbconfigs
); );
...@@ -359,7 +359,7 @@ gl_create_context(VADriverContextP ctx, OpenGLContextStateP parent) ...@@ -359,7 +359,7 @@ gl_create_context(VADriverContextP ctx, OpenGLContextStateP parent)
/* Find out a GLXFBConfig compatible with the parent context */ /* Find out a GLXFBConfig compatible with the parent context */
for (n = 0; n < n_fbconfigs; n++) { for (n = 0; n < n_fbconfigs; n++) {
status = glXGetFBConfigAttrib( status = glXGetFBConfigAttrib(
ctx->x11_dpy, (Display *)ctx->native_dpy,
fbconfigs[n], fbconfigs[n],
GLX_FBCONFIG_ID, &val GLX_FBCONFIG_ID, &val
); );
...@@ -372,7 +372,7 @@ gl_create_context(VADriverContextP ctx, OpenGLContextStateP parent) ...@@ -372,7 +372,7 @@ gl_create_context(VADriverContextP ctx, OpenGLContextStateP parent)
else { else {
choose_fbconfig: choose_fbconfig:
fbconfigs = glXChooseFBConfig( fbconfigs = glXChooseFBConfig(
ctx->x11_dpy, (Display *)ctx->native_dpy,
ctx->x11_screen, ctx->x11_screen,
fbconfig_attrs, &n_fbconfigs fbconfig_attrs, &n_fbconfigs
); );
...@@ -384,7 +384,7 @@ gl_create_context(VADriverContextP ctx, OpenGLContextStateP parent) ...@@ -384,7 +384,7 @@ gl_create_context(VADriverContextP ctx, OpenGLContextStateP parent)
} }
cs->context = glXCreateNewContext( cs->context = glXCreateNewContext(
ctx->x11_dpy, (Display *)ctx->native_dpy,
fbconfigs[n], fbconfigs[n],
GLX_RGBA_TYPE, GLX_RGBA_TYPE,
parent ? parent->context : NULL, parent ? parent->context : NULL,
...@@ -461,12 +461,12 @@ static int create_tfp_surface(VADriverContextP ctx, VASurfaceGLXP pSurfaceGLX) ...@@ -461,12 +461,12 @@ static int create_tfp_surface(VADriverContextP ctx, VASurfaceGLXP pSurfaceGLX)
int *attrib; int *attrib;
int n_fbconfig_attrs; int n_fbconfig_attrs;
root_window = RootWindow(ctx->x11_dpy, ctx->x11_screen); root_window = RootWindow((Display *)ctx->native_dpy, ctx->x11_screen);
XGetWindowAttributes(ctx->x11_dpy, root_window, &wattr); XGetWindowAttributes((Display *)ctx->native_dpy, root_window, &wattr);
if (wattr.depth != 24 && wattr.depth != 32) if (wattr.depth != 24 && wattr.depth != 32)
return 0; return 0;
pixmap = XCreatePixmap( pixmap = XCreatePixmap(
ctx->x11_dpy, (Display *)ctx->native_dpy,
root_window, root_window,
width, width,
height, height,
...@@ -500,7 +500,7 @@ static int create_tfp_surface(VADriverContextP ctx, VASurfaceGLXP pSurfaceGLX) ...@@ -500,7 +500,7 @@ static int create_tfp_surface(VADriverContextP ctx, VASurfaceGLXP pSurfaceGLX)
*attrib++ = GL_NONE; *attrib++ = GL_NONE;
fbconfig = glXChooseFBConfig( fbconfig = glXChooseFBConfig(
ctx->x11_dpy, (Display *)ctx->native_dpy,
ctx->x11_screen, ctx->x11_screen,
fbconfig_attrs, fbconfig_attrs,
&n_fbconfig_attrs &n_fbconfig_attrs
...@@ -524,7 +524,7 @@ static int create_tfp_surface(VADriverContextP ctx, VASurfaceGLXP pSurfaceGLX) ...@@ -524,7 +524,7 @@ static int create_tfp_surface(VADriverContextP ctx, VASurfaceGLXP pSurfaceGLX)
x11_trap_errors(); x11_trap_errors();
glx_pixmap = glXCreatePixmap( glx_pixmap = glXCreatePixmap(
ctx->x11_dpy, (Display *)ctx->native_dpy,
fbconfig[0], fbconfig[0],
pixmap, pixmap,
pixmap_attrs pixmap_attrs
...@@ -550,12 +550,12 @@ static void destroy_tfp_surface(VADriverContextP ctx, VASurfaceGLXP pSurfaceGLX) ...@@ -550,12 +550,12 @@ static void destroy_tfp_surface(VADriverContextP ctx, VASurfaceGLXP pSurfaceGLX)
} }
if (pSurfaceGLX->glx_pixmap) { if (pSurfaceGLX->glx_pixmap) {
glXDestroyPixmap(ctx->x11_dpy, pSurfaceGLX->glx_pixmap); glXDestroyPixmap((Display *)ctx->native_dpy, pSurfaceGLX->glx_pixmap);
pSurfaceGLX->glx_pixmap = None; pSurfaceGLX->glx_pixmap = None;
} }
if (pSurfaceGLX->pixmap) { if (pSurfaceGLX->pixmap) {
XFreePixmap(ctx->x11_dpy, pSurfaceGLX->pixmap); XFreePixmap((Display *)ctx->native_dpy, pSurfaceGLX->pixmap);
pSurfaceGLX->pixmap = None; pSurfaceGLX->pixmap = None;
} }
} }
...@@ -572,12 +572,12 @@ static int bind_pixmap(VADriverContextP ctx, VASurfaceGLXP pSurfaceGLX) ...@@ -572,12 +572,12 @@ static int bind_pixmap(VADriverContextP ctx, VASurfaceGLXP pSurfaceGLX)
x11_trap_errors(); x11_trap_errors();
pOpenGLVTable->glx_bind_tex_image( pOpenGLVTable->glx_bind_tex_image(
ctx->x11_dpy, (Display *)ctx->native_dpy,
pSurfaceGLX->glx_pixmap, pSurfaceGLX->glx_pixmap,
GLX_FRONT_LEFT_EXT, GLX_FRONT_LEFT_EXT,
NULL NULL
); );
XSync(ctx->x11_dpy, False); XSync((Display *)ctx->native_dpy, False);
if (x11_untrap_errors() != 0) { if (x11_untrap_errors() != 0) {
va_glx_error_message("failed to bind pixmap\n"); va_glx_error_message("failed to bind pixmap\n");
return 0; return 0;
...@@ -597,11 +597,11 @@ static int unbind_pixmap(VADriverContextP ctx, VASurfaceGLXP pSurfaceGLX) ...@@ -597,11 +597,11 @@ static int unbind_pixmap(VADriverContextP ctx, VASurfaceGLXP pSurfaceGLX)
x11_trap_errors(); x11_trap_errors();
pOpenGLVTable->glx_release_tex_image( pOpenGLVTable->glx_release_tex_image(
ctx->x11_dpy, (Display *)ctx->native_dpy,
pSurfaceGLX->glx_pixmap, pSurfaceGLX->glx_pixmap,
GLX_FRONT_LEFT_EXT GLX_FRONT_LEFT_EXT
); );
XSync(ctx->x11_dpy, False); XSync((Display *)ctx->native_dpy, False);
if (x11_untrap_errors() != 0) { if (x11_untrap_errors() != 0) {
va_glx_error_message("failed to release pixmap\n"); va_glx_error_message("failed to release pixmap\n");
return 0; return 0;
...@@ -929,13 +929,13 @@ associate_surface( ...@@ -929,13 +929,13 @@ associate_surface(
status = ctx->vtable.vaPutSurface( status = ctx->vtable.vaPutSurface(
ctx, ctx,
surface, surface,
pSurfaceGLX->pixmap, (void *)pSurfaceGLX->pixmap,
0, 0, pSurfaceGLX->width, pSurfaceGLX->height, 0, 0, pSurfaceGLX->width, pSurfaceGLX->height,
0, 0, pSurfaceGLX->width, pSurfaceGLX->height, 0, 0, pSurfaceGLX->width, pSurfaceGLX->height,
NULL, 0, NULL, 0,
flags flags
); );
XSync(ctx->x11_dpy, False); XSync((Display *)ctx->native_dpy, False);
if (x11_untrap_errors() != 0) if (x11_untrap_errors() != 0)
return VA_STATUS_ERROR_OPERATION_FAILED; return VA_STATUS_ERROR_OPERATION_FAILED;
if (status != VA_STATUS_SUCCESS) if (status != VA_STATUS_SUCCESS)
...@@ -1057,7 +1057,7 @@ VAStatus va_glx_init_context(VADriverContextP ctx) ...@@ -1057,7 +1057,7 @@ VAStatus va_glx_init_context(VADriverContextP ctx)
vtable->vaDestroySurfaceGLX = vaDestroySurfaceGLX_impl_libva; vtable->vaDestroySurfaceGLX = vaDestroySurfaceGLX_impl_libva;
vtable->vaCopySurfaceGLX = vaCopySurfaceGLX_impl_libva; vtable->vaCopySurfaceGLX = vaCopySurfaceGLX_impl_libva;
if (!glXQueryVersion(ctx->x11_dpy, &glx_major, &glx_minor)) if (!glXQueryVersion((Display *)ctx->native_dpy, &glx_major, &glx_minor))
return VA_STATUS_ERROR_UNIMPLEMENTED; return VA_STATUS_ERROR_UNIMPLEMENTED;
if (glx_major < 1 || (glx_major == 1 && glx_minor < 3)) { /* GLX 1.3 */ if (glx_major < 1 || (glx_major == 1 && glx_minor < 3)) { /* GLX 1.3 */
va_glx_error_message("GLX version 1.3 expected but only " va_glx_error_message("GLX version 1.3 expected but only "
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
* @param[in] ctx the VA driver context * @param[in] ctx the VA driver context
* @return VA_STATUS_SUCCESS if successful * @return VA_STATUS_SUCCESS if successful
*/ */
VAStatus va_glx_init_context(VADriverContextP ctx) VAStatus va_glx_init_context(VADriverContextP ctx);
ATTRIBUTE_HIDDEN; /* ATTRIBUTE_HIDDEN; */
#endif /* VA_GLX_IMPL_H */ #endif /* VA_GLX_IMPL_H */
...@@ -397,7 +397,7 @@ struct VADriverContext ...@@ -397,7 +397,7 @@ struct VADriverContext
void *handle; /* dlopen handle */ void *handle; /* dlopen handle */
void *dri_state; void *dri_state;
void *glx; /* opaque for GLX code */ void *glx; /* opaque for GLX code */
}; };
#define VA_DISPLAY_MAGIC 0x56414430 /* VAD0 */ #define VA_DISPLAY_MAGIC 0x56414430 /* VAD0 */
...@@ -421,7 +421,7 @@ struct VADisplayContext ...@@ -421,7 +421,7 @@ struct VADisplayContext
char **driver_name char **driver_name
); );
void *opaque; /* opaque for display extensions (e.g. GLX) */ void *opaque; /* opaque for display extensions (e.g. GLX) */
}; };
typedef VAStatus (*VADriverInit) ( typedef VAStatus (*VADriverInit) (
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment