On Tue, 12 Jun 2012 12:07:09 -0700, Kenneth Graunke <kenn...@whitecape.org> 
wrote:
> With fixes and updates from Ben Widawsky and comments from Paul Berry.
> 
> This should not be pushed until libdrm 2.4.36 is released with Ben's
> hardware context support.
> 
> I haven't hooked up the context destroy function yet as I'm not entirely
> sure about tear-down, but they will be freed on fd close, so it should
> only be a problem for long running processes that open and destroy many
> GL contexts.

What's wrong with just freeing our context at brw_destroy_context()?  We
definietly have to manually free the stuff, since some apps (web
browsers) will have many context create/destroy cycles.

> diff --git a/src/mesa/drivers/dri/intel/intel_context.c 
> b/src/mesa/drivers/dri/intel/intel_context.c
> index c2f7d29..fc244c1 100644
> --- a/src/mesa/drivers/dri/intel/intel_context.c
> +++ b/src/mesa/drivers/dri/intel/intel_context.c
> @@ -593,6 +593,8 @@ intelInitContext(struct intel_context *intel,
>     if (intelScreen->bufmgr == NULL)
>        return false;
>  
> +   intel->hw_ctx = NULL;

it's rzalloced, so we don't manually zero most of our data.

Attachment: pgpZDn9w2CM96.pgp
Description: PGP signature

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to