diff options
author | Luca Barbieri <[email protected]> | 2010-08-23 16:43:04 +0200 |
---|---|---|
committer | Luca Barbieri <[email protected]> | 2010-08-23 17:12:31 +0200 |
commit | c907b947130c884de09e48e1ecbeecc9afc9f75b (patch) | |
tree | e1b394b9114b33673353458faaba8f790f8271f7 /src/gallium/drivers/nvfx/nvfx_context.c | |
parent | ea709696185846c876581e1c41a21921826823ec (diff) |
nvfx: emit bo relocations only when needed
Should improve performance, possibly significantly.
Diffstat (limited to 'src/gallium/drivers/nvfx/nvfx_context.c')
-rw-r--r-- | src/gallium/drivers/nvfx/nvfx_context.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/nvfx/nvfx_context.c b/src/gallium/drivers/nvfx/nvfx_context.c index 2f775f92cf5..5a2fa14c887 100644 --- a/src/gallium/drivers/nvfx/nvfx_context.c +++ b/src/gallium/drivers/nvfx/nvfx_context.c @@ -46,6 +46,9 @@ nvfx_destroy(struct pipe_context *pipe) if (nvfx->draw) draw_destroy(nvfx->draw); + if(nvfx->screen->cur_ctx == nvfx) + nvfx->screen->cur_ctx = NULL; + FREE(nvfx); } @@ -72,8 +75,6 @@ nvfx_create(struct pipe_screen *pscreen, void *priv) nvfx->pipe.clear = nvfx_clear; nvfx->pipe.flush = nvfx_flush; - screen->base.channel->user_private = nvfx; - nvfx->is_nv4x = screen->is_nv4x; /* TODO: it seems that nv30 might have fixed function clipping usable with vertex programs * However, my code for that doesn't work, so use vp clipping for all cards, which works. @@ -103,6 +104,7 @@ nvfx_create(struct pipe_screen *pscreen, void *priv) nvfx->hw_pointsprite_control = -1; nvfx->hw_vp_output = -1; nvfx->use_vertex_buffers = -1; + nvfx->relocs_needed = NVFX_RELOCATE_ALL; LIST_INITHEAD(&nvfx->render_cache); |