nv50: make sure static buffers (constbuf, tex control etc) get on reloc list
authorBen Skeggs <skeggsb@gmail.com>
Tue, 17 Jun 2008 13:55:23 +0000 (23:55 +1000)
committerBen Skeggs <skeggsb@gmail.com>
Sun, 29 Jun 2008 05:46:19 +0000 (15:46 +1000)
src/gallium/drivers/nv50/nv50_screen.c
src/gallium/drivers/nv50/nv50_screen.h
src/gallium/drivers/nv50/nv50_state_validate.c

index 18f22c59609209bc8b8da3ef1266a38c12e4fdda..5b4c5f96ac3df66268e91d10c8e83197cf264b7b 100644 (file)
@@ -273,7 +273,7 @@ nv50_screen_create(struct pipe_winsys *ws, struct nouveau_winsys *nvws)
        so_data  (so, 1);
 
        so_emit(nvws, so);
-       so_ref(NULL, &so);
+       so_ref(so, &screen->static_init);
        nvws->push_flush(nvws, 0, NULL);
 
        screen->pipe.winsys = ws;
index 08d1f450891ff8b3923e8873161901b26584c37a..400ddcef06d86355bcd07c39e95cdccababfe59b 100644 (file)
@@ -18,6 +18,8 @@ struct nv50_screen {
 
        struct pipe_buffer *tic;
        struct pipe_buffer *tsc;
+
+       struct nouveau_stateobj *static_init;
 };
 
 static INLINE struct nv50_screen *
index d99cdc73cac93090192a824663a26ebba2f58e12..8229bce89ee57a0b957c90f586c1465ba3255380 100644 (file)
@@ -151,6 +151,7 @@ nv50_state_emit(struct nv50_context *nv50)
        so_emit_reloc_markers(nvws, nv50->state.vertprog);
        so_emit_reloc_markers(nvws, nv50->state.fragprog);
        so_emit_reloc_markers(nvws, nv50->state.vtxbuf);
+       so_emit_reloc_markers(nvws, nv50->screen->static_init);
 }
 
 boolean