summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv50/nv50_screen.c
diff options
context:
space:
mode:
authorBen Skeggs <[email protected]>2009-02-20 09:32:47 +1000
committerBen Skeggs <[email protected]>2009-02-20 09:43:24 +1000
commit63a3a3762c8e1a67666d36b35fdb0ada8e4b7d08 (patch)
treed44240582f82712c446a1116afcc15d47b30ef7a /src/gallium/drivers/nv50/nv50_screen.c
parent9c9fcc83c03c8f944236a892d96305e98f0bffdd (diff)
nv50: rework for texture_transfer changes
Diffstat (limited to 'src/gallium/drivers/nv50/nv50_screen.c')
-rw-r--r--src/gallium/drivers/nv50/nv50_screen.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/gallium/drivers/nv50/nv50_screen.c b/src/gallium/drivers/nv50/nv50_screen.c
index 58d7a621a80..ee24405d36d 100644
--- a/src/gallium/drivers/nv50/nv50_screen.c
+++ b/src/gallium/drivers/nv50/nv50_screen.c
@@ -173,6 +173,14 @@ nv50_screen_create(struct pipe_winsys *ws, struct nouveau_winsys *nvws)
return NULL;
screen->nvws = nvws;
+ /* DMA engine object */
+ ret = nvws->grobj_alloc(nvws, 0x5039, &screen->m2mf);
+ if (ret) {
+ NOUVEAU_ERR("Error creating M2MF object: %d\n", ret);
+ nv50_screen_destroy(&screen->pipe);
+ return NULL;
+ }
+
/* 2D object */
ret = nvws->grobj_alloc(nvws, NV50_2D, &screen->eng2d);
if (ret) {
@@ -226,6 +234,15 @@ nv50_screen_create(struct pipe_winsys *ws, struct nouveau_winsys *nvws)
return NULL;
}
+ /* Static M2MF init */
+ so = so_new(32, 0);
+ so_method(so, screen->m2mf, 0x0180, 3);
+ so_data (so, screen->sync->handle);
+ so_data (so, screen->nvws->channel->vram->handle);
+ so_data (so, screen->nvws->channel->vram->handle);
+ so_emit(nvws, so);
+ so_ref (NULL, &so);
+
/* Static 2D init */
so = so_new(64, 0);
so_method(so, screen->eng2d, NV50_2D_DMA_NOTIFY, 4);
@@ -348,7 +365,7 @@ nv50_screen_create(struct pipe_winsys *ws, struct nouveau_winsys *nvws)
screen->pipe.is_format_supported = nv50_screen_is_format_supported;
nv50_screen_init_miptree_functions(&screen->pipe);
- nv50_surface_init_screen_functions(&screen->pipe);
+ nv50_transfer_init_screen_functions(&screen->pipe);
u_simple_screen_init(&screen->pipe);
return &screen->pipe;