summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
authorEmil Velikov <emil.velikov@collabora.com>2017-05-02 17:53:17 +0100
committerEmil Velikov <emil.l.velikov@gmail.com>2017-05-19 19:46:41 +0100
commit369e5dd939b4af6c653d6cbbe9be257a9c2c950e (patch)
treec30ed65c3c5d4c56c245d333f06f1f5aadfcc0dd /src/gallium/state_trackers
parent05043e0e8e0bd5e3019f480557d452b4c165f8f2 (diff)
auxiliary/vl: use vl_*_screen_create stubs when building w/o platform
Provide a dummy stub when the user has opted w/o said platform, thus we can build the binaries without unnecessarily requiring X11/other headers. In order to avoid build and link-time issues, we remove the HAVE_DRI3 guards in the VA and VDPAU state-trackers. With this change st/va will return VA_STATUS_ERROR_ALLOCATION_FAILED instead of VA_STATUS_ERROR_UNIMPLEMENTED. That is fine since upstream users of libva such as vlc and mpv do little error checking, let alone distinguish between the two. Cc: Leo Liu <leo.liu@amd.com> Cc: Guttula, Suresh <Suresh.Guttula@amd.com> Cc: mesa-stable@lists.freedesktop.org Cc: Christian König <christian.koenig@amd.com> Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/va/context.c2
-rw-r--r--src/gallium/state_trackers/vdpau/device.c2
2 files changed, 0 insertions, 4 deletions
diff --git a/src/gallium/state_trackers/va/context.c b/src/gallium/state_trackers/va/context.c
index 4224ed7f048..5159fceac91 100644
--- a/src/gallium/state_trackers/va/context.c
+++ b/src/gallium/state_trackers/va/context.c
@@ -118,9 +118,7 @@ VA_DRIVER_INIT_FUNC(VADriverContextP ctx)
return VA_STATUS_ERROR_UNIMPLEMENTED;
case VA_DISPLAY_GLX:
case VA_DISPLAY_X11:
-#if defined(HAVE_DRI3)
drv->vscreen = vl_dri3_screen_create(ctx->native_dpy, ctx->x11_screen);
-#endif
if (!drv->vscreen)
drv->vscreen = vl_dri2_screen_create(ctx->native_dpy, ctx->x11_screen);
if (!drv->vscreen)
diff --git a/src/gallium/state_trackers/vdpau/device.c b/src/gallium/state_trackers/vdpau/device.c
index 3ae3da3be1d..eae9f04ee10 100644
--- a/src/gallium/state_trackers/vdpau/device.c
+++ b/src/gallium/state_trackers/vdpau/device.c
@@ -63,9 +63,7 @@ vdp_imp_device_create_x11(Display *display, int screen, VdpDevice *device,
pipe_reference_init(&dev->reference, 1);
-#if defined(HAVE_DRI3)
dev->vscreen = vl_dri3_screen_create(display, screen);
-#endif
if (!dev->vscreen)
dev->vscreen = vl_dri2_screen_create(display, screen);
if (!dev->vscreen) {