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([
va/Makefile
va/va_version.h
va/x11/Makefile
va/android/Makefile
va/glx/Makefile
va/dummy/Makefile
dummy_drv_video/Makefile
i965_drv_video/Makefile
i965_drv_video/shaders/Makefile
......
......@@ -27,10 +27,8 @@ INCLUDES = \
LDADD = \
$(LIBVA_LT_LDFLAGS)
lib_LTLIBRARIES = \
libva.la \
libva-tpi.la \
libva-x11.la
libva_x11_backend = libva-x11.la
libva_x11_backenddir = x11
libva_ladir = $(libdir)
libva_la_LDFLAGS = $(LDADD) -no-undefined
......@@ -40,28 +38,46 @@ libva_tpi_ladir = $(libdir)
libva_tpi_la_LDFLAGS = $(LDADD) -no-undefined
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
lib_LTLIBRARIES += libva-dummy.la
libva_dummy_backend = libva-dummy.la
libva_dummy_backenddir = dummy
libva_dummy_la_SOURCES =
libva_dummy_la_LIBADD = $(libvacorelib) dummy/libva_dummy.la $(LIBVA_LIBS) $(DRM_LIBS)
libva_dummy_la_LDFLAGS = $(LDADD)
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
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_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
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)
if (!check_extension("GL_ARB_texture_non_power_of_two", gl_extensions))
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))
return 0;
return 1;
......@@ -332,7 +332,7 @@ gl_create_context(VADriverContextP ctx, OpenGLContextStateP parent)
if (!cs)
goto error;
cs->display = ctx->x11_dpy;
cs->display = (Display *)ctx->native_dpy;
cs->window = parent ? parent->window : None;
cs->context = NULL;
......@@ -349,7 +349,7 @@ gl_create_context(VADriverContextP ctx, OpenGLContextStateP parent)
goto choose_fbconfig;
fbconfigs = glXGetFBConfigs(
ctx->x11_dpy,
(Display *)ctx->native_dpy,
ctx->x11_screen,
&n_fbconfigs
);
......@@ -359,7 +359,7 @@ gl_create_context(VADriverContextP ctx, OpenGLContextStateP parent)
/* Find out a GLXFBConfig compatible with the parent context */
for (n = 0; n < n_fbconfigs; n++) {
status = glXGetFBConfigAttrib(
ctx->x11_dpy,
(Display *)ctx->native_dpy,
fbconfigs[n],
GLX_FBCONFIG_ID, &val
);
......@@ -372,7 +372,7 @@ gl_create_context(VADriverContextP ctx, OpenGLContextStateP parent)
else {
choose_fbconfig:
fbconfigs = glXChooseFBConfig(
ctx->x11_dpy,
(Display *)ctx->native_dpy,
ctx->x11_screen,
fbconfig_attrs, &n_fbconfigs
);
......@@ -384,7 +384,7 @@ gl_create_context(VADriverContextP ctx, OpenGLContextStateP parent)
}
cs->context = glXCreateNewContext(
ctx->x11_dpy,
(Display *)ctx->native_dpy,
fbconfigs[n],
GLX_RGBA_TYPE,
parent ? parent->context : NULL,
......@@ -461,12 +461,12 @@ static int create_tfp_surface(VADriverContextP ctx, VASurfaceGLXP pSurfaceGLX)
int *attrib;
int n_fbconfig_attrs;
root_window = RootWindow(ctx->x11_dpy, ctx->x11_screen);
XGetWindowAttributes(ctx->x11_dpy, root_window, &wattr);
root_window = RootWindow((Display *)ctx->native_dpy, ctx->x11_screen);
XGetWindowAttributes((Display *)ctx->native_dpy, root_window, &wattr);
if (wattr.depth != 24 && wattr.depth != 32)
return 0;
pixmap = XCreatePixmap(
ctx->x11_dpy,
(Display *)ctx->native_dpy,
root_window,
width,
height,
......@@ -500,7 +500,7 @@ static int create_tfp_surface(VADriverContextP ctx, VASurfaceGLXP pSurfaceGLX)
*attrib++ = GL_NONE;
fbconfig = glXChooseFBConfig(
ctx->x11_dpy,
(Display *)ctx->native_dpy,
ctx->x11_screen,
fbconfig_attrs,
&n_fbconfig_attrs
......@@ -524,7 +524,7 @@ static int create_tfp_surface(VADriverContextP ctx, VASurfaceGLXP pSurfaceGLX)
x11_trap_errors();
glx_pixmap = glXCreatePixmap(
ctx->x11_dpy,
(Display *)ctx->native_dpy,
fbconfig[0],
pixmap,
pixmap_attrs
......@@ -550,12 +550,12 @@ static void destroy_tfp_surface(VADriverContextP ctx, VASurfaceGLXP pSurfaceGLX)
}
if (pSurfaceGLX->glx_pixmap) {
glXDestroyPixmap(ctx->x11_dpy, pSurfaceGLX->glx_pixmap);
glXDestroyPixmap((Display *)ctx->native_dpy, pSurfaceGLX->glx_pixmap);
pSurfaceGLX->glx_pixmap = None;
}
if (pSurfaceGLX->pixmap) {
XFreePixmap(ctx->x11_dpy, pSurfaceGLX->pixmap);
XFreePixmap((Display *)ctx->native_dpy, pSurfaceGLX->pixmap);
pSurfaceGLX->pixmap = None;
}
}
......@@ -572,12 +572,12 @@ static int bind_pixmap(VADriverContextP ctx, VASurfaceGLXP pSurfaceGLX)
x11_trap_errors();
pOpenGLVTable->glx_bind_tex_image(
ctx->x11_dpy,
(Display *)ctx->native_dpy,
pSurfaceGLX->glx_pixmap,
GLX_FRONT_LEFT_EXT,
NULL
);
XSync(ctx->x11_dpy, False);
XSync((Display *)ctx->native_dpy, False);
if (x11_untrap_errors() != 0) {
va_glx_error_message("failed to bind pixmap\n");
return 0;
......@@ -597,11 +597,11 @@ static int unbind_pixmap(VADriverContextP ctx, VASurfaceGLXP pSurfaceGLX)
x11_trap_errors();
pOpenGLVTable->glx_release_tex_image(
ctx->x11_dpy,
(Display *)ctx->native_dpy,
pSurfaceGLX->glx_pixmap,
GLX_FRONT_LEFT_EXT
);
XSync(ctx->x11_dpy, False);
XSync((Display *)ctx->native_dpy, False);
if (x11_untrap_errors() != 0) {
va_glx_error_message("failed to release pixmap\n");
return 0;
......@@ -929,13 +929,13 @@ associate_surface(
status = ctx->vtable.vaPutSurface(
ctx,
surface,
pSurfaceGLX->pixmap,
(void *)pSurfaceGLX->pixmap,
0, 0, pSurfaceGLX->width, pSurfaceGLX->height,
0, 0, pSurfaceGLX->width, pSurfaceGLX->height,
NULL, 0,
flags
);
XSync(ctx->x11_dpy, False);
XSync((Display *)ctx->native_dpy, False);
if (x11_untrap_errors() != 0)
return VA_STATUS_ERROR_OPERATION_FAILED;
if (status != VA_STATUS_SUCCESS)
......@@ -1057,7 +1057,7 @@ VAStatus va_glx_init_context(VADriverContextP ctx)
vtable->vaDestroySurfaceGLX = vaDestroySurfaceGLX_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;
if (glx_major < 1 || (glx_major == 1 && glx_minor < 3)) { /* GLX 1.3 */
va_glx_error_message("GLX version 1.3 expected but only "
......
......@@ -31,7 +31,7 @@
* @param[in] ctx the VA driver context
* @return VA_STATUS_SUCCESS if successful
*/
VAStatus va_glx_init_context(VADriverContextP ctx)
ATTRIBUTE_HIDDEN;
VAStatus va_glx_init_context(VADriverContextP ctx);
/* ATTRIBUTE_HIDDEN; */
#endif /* VA_GLX_IMPL_H */
......@@ -397,7 +397,7 @@ struct VADriverContext
void *handle; /* dlopen handle */
void *dri_state;
void *glx; /* opaque for GLX code */
void *glx; /* opaque for GLX code */
};
#define VA_DISPLAY_MAGIC 0x56414430 /* VAD0 */
......@@ -421,7 +421,7 @@ struct VADisplayContext
char **driver_name
);
void *opaque; /* opaque for display extensions (e.g. GLX) */
void *opaque; /* opaque for display extensions (e.g. GLX) */
};
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