From ec8b18826a6deb18bda26aca0bfeb8fe5624b585 Mon Sep 17 00:00:00 2001 From: Austin Yuan Date: Wed, 1 Jul 2009 11:33:58 +0800 Subject: [PATCH] Added the patch from Zou Naihai to correct DRI2XXX --> VA_DRI2XXX Signed-off-by: Austin Yuan --- dri/dri2_util.c | 16 ++++++++-------- src/Makefile.am | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/dri/dri2_util.c b/dri/dri2_util.c index 2cdbbca..1d3c141 100644 --- a/dri/dri2_util.c +++ b/dri/dri2_util.c @@ -47,7 +47,7 @@ dri2CreateDrawable(VADriverContextP ctx, XID x_drawable) dri2_drawable->base.x_drawable = x_drawable; dri2_drawable->base.x = 0; dri2_drawable->base.y = 0; - DRI2CreateDrawable(ctx->x11_dpy, x_drawable); + VA_DRI2CreateDrawable(ctx->x11_dpy, x_drawable); return &dri2_drawable->base; } @@ -55,7 +55,7 @@ dri2CreateDrawable(VADriverContextP ctx, XID x_drawable) static void dri2DestroyDrawable(VADriverContextP ctx, struct dri_drawable *dri_drawable) { - DRI2DestroyDrawable(ctx->x11_dpy, dri_drawable->x_drawable); + VA_DRI2DestroyDrawable(ctx->x11_dpy, dri_drawable->x_drawable); free(dri_drawable); } @@ -73,7 +73,7 @@ dri2SwapBuffer(VADriverContextP ctx, struct dri_drawable *dri_drawable) xrect.height = dri2_drawable->height; region = XFixesCreateRegion(ctx->x11_dpy, &xrect, 1); - DRI2CopyRegion(ctx->x11_dpy, dri_drawable->x_drawable, region, + VA_DRI2CopyRegion(ctx->x11_dpy, dri_drawable->x_drawable, region, DRI2BufferFrontLeft, DRI2BufferBackLeft); XFixesDestroyRegion(ctx->x11_dpy, region); } @@ -91,7 +91,7 @@ dri2GetRenderingBuffer(VADriverContextP ctx, struct dri_drawable *dri_drawable) i = 0; attachments[i++] = __DRI_BUFFER_BACK_LEFT; attachments[i++] = __DRI_BUFFER_FRONT_LEFT; - buffers = DRI2GetBuffers(ctx->x11_dpy, dri_drawable->x_drawable, + buffers = VA_DRI2GetBuffers(ctx->x11_dpy, dri_drawable->x_drawable, &dri2_drawable->width, &dri2_drawable->height, attachments, i, &count); assert(buffers); @@ -148,14 +148,14 @@ isDRI2Connected(VADriverContextP ctx, char **driver_name) *driver_name = NULL; dri_state->fd = -1; dri_state->driConnectedFlag = VA_NONE; - if (!DRI2QueryExtension(ctx->x11_dpy, &event_base, &error_base)) + if (!VA_DRI2QueryExtension(ctx->x11_dpy, &event_base, &error_base)) goto err_out; - if (!DRI2QueryVersion(ctx->x11_dpy, &major, &minor)) + if (!VA_DRI2QueryVersion(ctx->x11_dpy, &major, &minor)) goto err_out; - if (!DRI2Connect(ctx->x11_dpy, RootWindow(ctx->x11_dpy, ctx->x11_screen), + if (!VA_DRI2Connect(ctx->x11_dpy, RootWindow(ctx->x11_dpy, ctx->x11_screen), driver_name, &device_name)) goto err_out; @@ -168,7 +168,7 @@ isDRI2Connected(VADriverContextP ctx, char **driver_name) if (drmGetMagic(dri_state->fd, &magic)) goto err_out; - if (!DRI2Authenticate(ctx->x11_dpy, RootWindow(ctx->x11_dpy, ctx->x11_screen), + if (!VA_DRI2Authenticate(ctx->x11_dpy, RootWindow(ctx->x11_dpy, ctx->x11_screen), magic)) goto err_out; diff --git a/src/Makefile.am b/src/Makefile.am index e695ed7..d098ed2 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -27,7 +27,7 @@ INCLUDES = \ libva_la_LTLIBRARIES = libva.la libva_ladir = $(libdir) libva_la_LDFLAGS = -version-number 0:30:4 -no-undefined -libva_la_LIBADD = $(LIBVA_LIBS) -ldl -lX11 -lXext ../dri/libva_dri.la +libva_la_LIBADD = $(LIBVA_LIBS) -ldl -lX11 -lXext ../dri/libva_dri.la -ldrm -lXfixes CFLAGS = -ansi -O2 nodist_libva_la_SOURCES = va_version.h -- 2.7.4