st/vdpau: don't return a device if the screen doesn't support NPOT
authorIlia Mirkin <imirkin@alum.mit.edu>
Sat, 18 Jan 2014 02:41:38 +0000 (21:41 -0500)
committerIlia Mirkin <imirkin@alum.mit.edu>
Mon, 20 Jan 2014 01:01:48 +0000 (20:01 -0500)
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 <imirkin@alum.mit.edu>
Cc: 10.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Christian König <christian.koenig@amd.com>
src/gallium/state_trackers/vdpau/device.c

index e029a9fc05fcbaf12626edbf53b57de088480015..def1e2a0662e2795af61aca85664d78ee7561ef9 100644 (file)
@@ -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;