nouveau: add valid range tracking to nouveau_buffer
[mesa.git] / src / gallium / drivers / nouveau / nv50 / nv50_resource.c
index 7fbb0a92bf68725469a97e6d6360668c2ece93e6..d289b4a24e80e25f1d4e2ca2e4bb32066684c438 100644 (file)
@@ -68,6 +68,8 @@ nv50_surface_create(struct pipe_context *pipe,
                    struct pipe_resource *pres,
                    const struct pipe_surface *templ)
 {
+   /* surfaces are assumed to be miptrees all over the place. */
+   assert(pres->target != PIPE_BUFFER);
    if (unlikely(pres->target == PIPE_BUFFER))
       return nv50_surface_from_buffer(pipe, pres, templ);
    return nv50_miptree_surface_new(pipe, pres, templ);