Commit ec8b1882 authored by Austin Yuan's avatar Austin Yuan

Added the patch from Zou Naihai to correct DRI2XXX --> VA_DRI2XXX

Signed-off-by: default avatarAustin Yuan <shengquan.yuan@intel.com>
parent 4d1cfde4
...@@ -47,7 +47,7 @@ dri2CreateDrawable(VADriverContextP ctx, XID x_drawable) ...@@ -47,7 +47,7 @@ dri2CreateDrawable(VADriverContextP ctx, XID x_drawable)
dri2_drawable->base.x_drawable = x_drawable; dri2_drawable->base.x_drawable = x_drawable;
dri2_drawable->base.x = 0; dri2_drawable->base.x = 0;
dri2_drawable->base.y = 0; dri2_drawable->base.y = 0;
DRI2CreateDrawable(ctx->x11_dpy, x_drawable); VA_DRI2CreateDrawable(ctx->x11_dpy, x_drawable);
return &dri2_drawable->base; return &dri2_drawable->base;
} }
...@@ -55,7 +55,7 @@ dri2CreateDrawable(VADriverContextP ctx, XID x_drawable) ...@@ -55,7 +55,7 @@ dri2CreateDrawable(VADriverContextP ctx, XID x_drawable)
static void static void
dri2DestroyDrawable(VADriverContextP ctx, struct dri_drawable *dri_drawable) 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); free(dri_drawable);
} }
...@@ -73,7 +73,7 @@ dri2SwapBuffer(VADriverContextP ctx, struct dri_drawable *dri_drawable) ...@@ -73,7 +73,7 @@ dri2SwapBuffer(VADriverContextP ctx, struct dri_drawable *dri_drawable)
xrect.height = dri2_drawable->height; xrect.height = dri2_drawable->height;
region = XFixesCreateRegion(ctx->x11_dpy, &xrect, 1); 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); DRI2BufferFrontLeft, DRI2BufferBackLeft);
XFixesDestroyRegion(ctx->x11_dpy, region); XFixesDestroyRegion(ctx->x11_dpy, region);
} }
...@@ -91,7 +91,7 @@ dri2GetRenderingBuffer(VADriverContextP ctx, struct dri_drawable *dri_drawable) ...@@ -91,7 +91,7 @@ dri2GetRenderingBuffer(VADriverContextP ctx, struct dri_drawable *dri_drawable)
i = 0; i = 0;
attachments[i++] = __DRI_BUFFER_BACK_LEFT; attachments[i++] = __DRI_BUFFER_BACK_LEFT;
attachments[i++] = __DRI_BUFFER_FRONT_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, &dri2_drawable->width, &dri2_drawable->height,
attachments, i, &count); attachments, i, &count);
assert(buffers); assert(buffers);
...@@ -148,14 +148,14 @@ isDRI2Connected(VADriverContextP ctx, char **driver_name) ...@@ -148,14 +148,14 @@ isDRI2Connected(VADriverContextP ctx, char **driver_name)
*driver_name = NULL; *driver_name = NULL;
dri_state->fd = -1; dri_state->fd = -1;
dri_state->driConnectedFlag = VA_NONE; 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; goto err_out;
if (!DRI2QueryVersion(ctx->x11_dpy, &major, &minor)) if (!VA_DRI2QueryVersion(ctx->x11_dpy, &major, &minor))
goto err_out; 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)) driver_name, &device_name))
goto err_out; goto err_out;
...@@ -168,7 +168,7 @@ isDRI2Connected(VADriverContextP ctx, char **driver_name) ...@@ -168,7 +168,7 @@ isDRI2Connected(VADriverContextP ctx, char **driver_name)
if (drmGetMagic(dri_state->fd, &magic)) if (drmGetMagic(dri_state->fd, &magic))
goto err_out; 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)) magic))
goto err_out; goto err_out;
......
...@@ -27,7 +27,7 @@ INCLUDES = \ ...@@ -27,7 +27,7 @@ INCLUDES = \
libva_la_LTLIBRARIES = libva.la libva_la_LTLIBRARIES = libva.la
libva_ladir = $(libdir) libva_ladir = $(libdir)
libva_la_LDFLAGS = -version-number 0:30:4 -no-undefined 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 CFLAGS = -ansi -O2
nodist_libva_la_SOURCES = va_version.h nodist_libva_la_SOURCES = va_version.h
......
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