nouveau: call notifier/grobj etc funcs directly
[mesa.git] / src / gallium / drivers / nv30 / nv30_vertprog.c
index eaf543b8f791568cbf78a43c3ed796505c1d5feb..aec39aae9c9e99e6f6692daf3cf7a58e09a460d4 100644 (file)
@@ -645,7 +645,6 @@ out_err:
 static boolean
 nv30_vertprog_validate(struct nv30_context *nv30)
 { 
-       struct nouveau_winsys *nvws = nv30->nvws;
        struct pipe_winsys *ws = nv30->pipe.winsys;
        struct nouveau_grobj *rankine = nv30->screen->rankine;
        struct nv30_vertex_program *vp;
@@ -669,15 +668,15 @@ nv30_vertprog_validate(struct nv30_context *nv30)
                struct nouveau_stateobj *so;
                uint vplen = vp->nr_insns;
 
-               if (nvws->res_alloc(heap, vplen, vp, &vp->exec)) {
+               if (nouveau_resource_alloc(heap, vplen, vp, &vp->exec)) {
                        while (heap->next && heap->size < vplen) {
                                struct nv30_vertex_program *evict;
                                
                                evict = heap->next->priv;
-                               nvws->res_free(&evict->exec);
+                               nouveau_resource_free(&evict->exec);
                        }
 
-                       if (nvws->res_alloc(heap, vplen, vp, &vp->exec))
+                       if (nouveau_resource_alloc(heap, vplen, vp, &vp->exec))
                                assert(0);
                }
 
@@ -694,15 +693,16 @@ nv30_vertprog_validate(struct nv30_context *nv30)
        if (vp->nr_consts && !vp->data) {
                struct nouveau_resource *heap = nv30->screen->vp_data_heap;
 
-               if (nvws->res_alloc(heap, vp->nr_consts, vp, &vp->data)) {
+               if (nouveau_resource_alloc(heap, vp->nr_consts, vp, &vp->data)) {
                        while (heap->next && heap->size < vp->nr_consts) {
                                struct nv30_vertex_program *evict;
                                
                                evict = heap->next->priv;
-                               nvws->res_free(&evict->data);
+                               nouveau_resource_free(&evict->data);
                        }
 
-                       if (nvws->res_alloc(heap, vp->nr_consts, vp, &vp->data))
+                       if (nouveau_resource_alloc(heap, vp->nr_consts, vp,
+                                                  &vp->data))
                                assert(0);
                }
 
@@ -804,8 +804,6 @@ nv30_vertprog_validate(struct nv30_context *nv30)
 void
 nv30_vertprog_destroy(struct nv30_context *nv30, struct nv30_vertex_program *vp)
 {
-       struct nouveau_winsys *nvws = nv30->screen->nvws;
-
        vp->translated = FALSE;
 
        if (vp->nr_insns) {
@@ -820,9 +818,9 @@ nv30_vertprog_destroy(struct nv30_context *nv30, struct nv30_vertex_program *vp)
                vp->nr_consts = 0;
        }
 
-       nvws->res_free(&vp->exec);
+       nouveau_resource_free(&vp->exec);
        vp->exec_start = 0;
-       nvws->res_free(&vp->data);
+       nouveau_resource_free(&vp->data);
        vp->data_start = 0;
        vp->data_start_min = 0;