NV34 and possibly other NV3x hardware has the capability of exposing the
NV25 graph class. This allows forcing nouveau_vieux to be used instead
of the gallium driver, primarily for testing purposes. (Among other
things, NV2x only ever came as AGP or inside an Xbox, never PCI/PCIe).
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
#ifdef HAVE_LIBDRM
+#include <stdlib.h>
#include <xf86drm.h>
#include <nouveau_drm.h>
is_nouveau_vieux(int fd)
{
int chipset = nouveau_chipset(fd);
- return chipset > 0 && chipset < 0x30;
+ return (chipset > 0 && chipset < 0x30) ||
+ (chipset < 0x40 && getenv("NOUVEAU_VIEUX") != NULL);
}
#else
dri_screen->max_gl_es1_version = 10;
break;
case 0x20:
+ case 0x30:
screen->driver = &nv20_driver;
dri_screen->max_gl_compat_version = 13;
dri_screen->max_gl_es1_version = 10;
/* Swizzled surface. */
if (context_chipset(ctx) < 0x20)
class = NV04_SURFACE_SWZ_CLASS;
- else
+ else if (context_chipset (ctx) < 0x30)
class = NV20_SURFACE_SWZ_CLASS;
+ else
+ class = NV30_SURFACE_SWZ_CLASS;
ret = nouveau_object_new(chan, handle++, class, NULL, 0, &hw->swzsurf);
if (ret)