nv40: swtnl fallback on unsupported array format
authorBen Skeggs <skeggsb@gmail.com>
Fri, 21 Mar 2008 11:09:29 +0000 (22:09 +1100)
committerBen Skeggs <skeggsb@gmail.com>
Fri, 21 Mar 2008 11:09:29 +0000 (22:09 +1100)
src/gallium/drivers/nv40/nv40_vbo.c

index fad423fdf8584bd463726eed7088210c41ab384e..4a5b81193902d8c4ff1f77c18c077d03e88e7e82 100644 (file)
@@ -423,8 +423,12 @@ nv40_vbo_validate(struct nv40_context *nv40)
                        continue;
                }
 
-               if (nv40_vbo_format_to_hw(ve->src_format, &type, &ncomp))
-                       assert(0);
+               if (nv40_vbo_format_to_hw(ve->src_format, &type, &ncomp)) {
+                       nv40->fallback_swtnl |= NV40_NEW_ARRAYS;
+                       so_ref(NULL, &vtxbuf);
+                       so_ref(NULL, &vtxfmt);
+                       return FALSE;
+               }
 
                so_reloc(vtxbuf, vb->buffer, vb->buffer_offset + ve->src_offset,
                         vb_flags | NOUVEAU_BO_LOW | NOUVEAU_BO_OR,