nv50: allow forcing PMPEG use, for ease of testing
authorIlia Mirkin <imirkin@alum.mit.edu>
Mon, 29 Jul 2013 23:28:45 +0000 (19:28 -0400)
committerMaarten Lankhorst <maarten.lankhorst@canonical.com>
Thu, 15 Aug 2013 13:15:23 +0000 (15:15 +0200)
This also allows people who don't want to install the binary blobs
required for VP2 to still get MPEG decoding.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nv50/nv50_context.c
src/gallium/drivers/nv50/nv50_screen.c

index 79a047391af681383154d54305c34fb8df07fd02..185d241e70fcc17fbe94a186d844e331f0bb9c00 100644 (file)
@@ -258,7 +258,8 @@ nv50_create(struct pipe_screen *pscreen, void *priv)
    draw_set_rasterize_stage(nv50->draw, nv50_draw_render_stage(nv50));
 #endif
 
-   if (screen->base.device->chipset < 0x84) {
+   if (screen->base.device->chipset < 0x84 ||
+       debug_get_bool_option("NOUVEAU_PMPEG", FALSE)) {
       /* PMPEG */
       nouveau_context_init_vdec(&nv50->base);
    } else if (screen->base.device->chipset < 0x98 ||
index 2951eb4156d596927c6031c2889897459dc7372a..0cbee5d677bcda0a2220c100806ce6162e5d6f65 100644 (file)
@@ -647,7 +647,8 @@ nv50_screen_create(struct nouveau_device *dev)
 
    nv50_screen_init_resource_functions(pscreen);
 
-   if (screen->base.device->chipset < 0x84) {
+   if (screen->base.device->chipset < 0x84 ||
+       debug_get_bool_option("NOUVEAU_PMPEG", FALSE)) {
       /* PMPEG */
       nouveau_screen_init_vdec(&screen->base);
    } else if (screen->base.device->chipset < 0x98 ||