From 00e4314f6d605e467b9a386cacab7eec48b9e429 Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Fri, 17 Jan 2014 21:41:38 -0500 Subject: [PATCH] st/vdpau: don't return a device if the screen doesn't support NPOT MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit NV3x cards don't support NPOT textures. Technically this restriction could be worked around, but since it also doesn't expose any video decoding hw, just turn it off entirely. Signed-off-by: Ilia Mirkin Cc: 10.0 Reviewed-by: Christian König --- src/gallium/state_trackers/vdpau/device.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gallium/state_trackers/vdpau/device.c b/src/gallium/state_trackers/vdpau/device.c index e029a9fc05f..def1e2a0662 100644 --- a/src/gallium/state_trackers/vdpau/device.c +++ b/src/gallium/state_trackers/vdpau/device.c @@ -72,6 +72,11 @@ vdp_imp_device_create_x11(Display *display, int screen, VdpDevice *device, goto no_context; } + if (!pscreen->get_param(pscreen, PIPE_CAP_NPOT_TEXTURES)) { + ret = VDP_STATUS_NO_IMPLEMENTATION; + goto no_context; + } + *device = vlAddDataHTAB(dev); if (*device == 0) { ret = VDP_STATUS_ERROR; -- 2.30.2