nvfx: don't use hw index buffers on nv3x and nv44
authorLuca Barbieri <luca@luca-barbieri.com>
Mon, 12 Apr 2010 18:36:44 +0000 (20:36 +0200)
committerLuca Barbieri <luca@luca-barbieri.com>
Mon, 12 Apr 2010 18:39:09 +0000 (20:39 +0200)
They only apparently work on nv40 grclass cards, and this was the
previous behavior of the driver.

This really needs to be investigated more.

src/gallium/drivers/nvfx/nvfx_screen.c
src/gallium/drivers/nvfx/nvfx_vbo.c

index 0950dc87b410bfbc5e023512b957c8a9d25db502..55bcf6abca0ab68fa097d3d754ca44008937b196 100644 (file)
@@ -70,8 +70,9 @@ nvfx_screen_get_param(struct pipe_screen *pscreen, int param)
        case PIPE_CAP_BLEND_EQUATION_SEPARATE:
                return !!screen->is_nv4x;
        case NOUVEAU_CAP_HW_VTXBUF:
-       case NOUVEAU_CAP_HW_IDXBUF:
                return !screen->force_swtnl;
+       case NOUVEAU_CAP_HW_IDXBUF:
+               return !screen->force_swtnl && nvfx->screen->eng3d->grclass == NV40TCL;
        case PIPE_CAP_MAX_COMBINED_SAMPLERS:
                return 16;
        case PIPE_CAP_INDEP_BLEND_ENABLE:
index f40e24061ffae8b7e257fecb20205dfc10a24610..bb8a2b63f05e5191fc3601c064f48d54cda09f40 100644 (file)
@@ -90,7 +90,7 @@ nvfx_vbo_set_idxbuf(struct nvfx_context *nvfx, struct pipe_resource *ib,
                return FALSE;
        }
 
-       if (!pscreen->get_param(pscreen, NOUVEAU_CAP_HW_IDXBUF) || ib_size == 1)
+       if (nvfx->screen->eng3d->grclass != NV40TCL || ib_size == 1)
                return FALSE;
 
        switch (ib_size) {