diff options
author | Francisco Jerez <currojerez@riseup.net> | 2010-02-17 18:56:42 +0100 |
---|---|---|
committer | Francisco Jerez <currojerez@riseup.net> | 2010-02-17 23:36:29 +0100 |
commit | 56dcd011b5ec33190f268cf546a4c68f81f5ebd0 (patch) | |
tree | 9d617916a5a9442435a935ea55ed2b9c9130609b /src/mesa/drivers/dri/nouveau/nouveau_screen.c | |
parent | 52e3f0949d47c846e3508a135afd75c439f2c49d (diff) |
dri/nouveau: Some multithreaded rendering fixes.
Diffstat (limited to 'src/mesa/drivers/dri/nouveau/nouveau_screen.c')
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nouveau_screen.c | 42 |
1 files changed, 5 insertions, 37 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_screen.c b/src/mesa/drivers/dri/nouveau/nouveau_screen.c index 3f9f3a3567..71e57e17e6 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_screen.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_screen.c @@ -40,16 +40,6 @@ static const __DRIextension *nouveau_screen_extensions[]; static void nouveau_destroy_screen(__DRIscreen *dri_screen); -static void -nouveau_channel_flush_notify(struct nouveau_channel *chan) -{ - struct nouveau_screen *screen = chan->user_private; - struct nouveau_context *nctx = screen->context; - - if (nctx && nctx->fallback < SWRAST) - nouveau_state_emit(&nctx->base); -} - static const __DRIconfig ** nouveau_get_configs(void) { @@ -118,39 +108,24 @@ nouveau_init_screen2(__DRIscreen *dri_screen) goto fail; } - ret = nouveau_channel_alloc(screen->device, 0xbeef0201, 0xbeef0202, - &screen->chan); - if (ret) { - nouveau_error("Error initializing the FIFO.\n"); - goto fail; - } - screen->chan->flush_notify = nouveau_channel_flush_notify; - screen->chan->user_private = screen; - - /* Do the card specific initialization */ + /* Choose the card specific function pointers. */ switch (screen->device->chipset & 0xf0) { case 0x00: - ret = nv04_screen_init(screen); + screen->driver = &nv04_driver; break; case 0x10: - ret = nv10_screen_init(screen); + screen->driver = &nv10_driver; break; case 0x20: - ret = nv20_screen_init(screen); + screen->driver = &nv20_driver; break; default: assert(0); } - if (!ret) { - nouveau_error("Error initializing the hardware.\n"); - goto fail; - } configs = nouveau_get_configs(); - if (!configs) { - nouveau_error("Error creating the framebuffer configs.\n"); + if (!configs) goto fail; - } return configs; fail: @@ -167,13 +142,6 @@ nouveau_destroy_screen(__DRIscreen *dri_screen) if (!screen) return; - screen->driver->screen_destroy(screen); - - if (screen->chan) { - screen->chan->flush_notify = NULL; - nouveau_channel_free(&screen->chan); - } - if (screen->device) nouveau_device_close(&screen->device); |