diff options
Diffstat (limited to 'src/mesa/drivers/dri/nouveau/nouveau_context.c')
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nouveau_context.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c index 0ace139b88..53a121420d 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c @@ -119,6 +119,7 @@ nouveau_context_init(struct gl_context *ctx, struct nouveau_screen *screen, nouveau_state_init(ctx); nouveau_bo_state_init(ctx); + nouveau_scratch_init(ctx); _mesa_meta_init(ctx); _swrast_CreateContext(ctx); _vbo_CreateContext(ctx); @@ -163,6 +164,7 @@ nouveau_context_deinit(struct gl_context *ctx) if (nctx->hw.chan) nouveau_channel_free(&nctx->hw.chan); + nouveau_scratch_destroy(ctx); nouveau_bo_state_destroy(ctx); _mesa_free_context_data(ctx); } @@ -312,7 +314,7 @@ nouveau_context_make_current(__DRIcontext *dri_ctx, __DRIdrawable *dri_draw, GLboolean nouveau_context_unbind(__DRIcontext *dri_ctx) { - /* Unset current context and dispath table */ + /* Unset current context and dispatch table */ _mesa_make_current(NULL, NULL, NULL); return GL_TRUE; @@ -325,10 +327,12 @@ nouveau_fallback(struct gl_context *ctx, enum nouveau_fallback mode) nctx->fallback = MAX2(HWTNL, mode); - if (mode < SWRAST) + if (mode < SWRAST) { nouveau_state_emit(ctx); - else + nouveau_bo_state_emit(ctx); + } else { FIRE_RING(context_chan(ctx)); + } } static void @@ -365,5 +369,6 @@ nouveau_validate_framebuffer(struct gl_context *ctx) validate_framebuffer(dri_ctx, dri_read, &dri_ctx->dri2.read_stamp); - nouveau_state_emit(ctx); + if (ctx->NewState & _NEW_BUFFERS) + _mesa_update_state(ctx); } |