[Mesa-dev] [PATCH 3/4] i965: Initialize the intel_context::bufmgr pointer earlier.

Paul Berry stereotype441 at gmail.com
Tue Aug 6 12:27:06 PDT 2013


On 1 August 2013 15:11, Kenneth Graunke <kenneth at whitecape.org> wrote:

> This prevents a crash in a future patch.
>
> _mesa_initialize_context() creates a default transform feedback object
> by calling the NewTransformFeedbackObject() driver hook.  Eventually,
> we'll want to subclass that and allocate a buffer object.  This means
> passing brw->bufmgr to drm_intel_alloc_bo(), and crashing if it isn't
> initialized yet.
>
> The buffer manager is actually already initialized; we just hadn't
> copied the pointer from intel_screet to intel_context quite early
>

s/screet/screen/

Other than that, series is:

Reviewed-by: Paul Berry <stereotype441 at gmail.com>


> enough.
>
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> ---
>  src/mesa/drivers/dri/i965/intel_context.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/intel_context.c
> b/src/mesa/drivers/dri/i965/intel_context.c
> index 7860e1f..461d493 100644
> --- a/src/mesa/drivers/dri/i965/intel_context.c
> +++ b/src/mesa/drivers/dri/i965/intel_context.c
> @@ -481,6 +481,7 @@ intelInitContext(struct brw_context *brw,
>     }
>
>     brw->intelScreen = intelScreen;
> +   brw->bufmgr = intelScreen->bufmgr;
>
>     if (!_mesa_initialize_context(&brw->ctx, api, mesaVis, shareCtx,
>                                   functions)) {
> @@ -540,8 +541,6 @@ intelInitContext(struct brw_context *brw,
>      */
>     brw->max_gtt_map_object_size = gtt_size / 4;
>
> -   brw->bufmgr = intelScreen->bufmgr;
> -
>     bo_reuse_mode = driQueryOptioni(&brw->optionCache, "bo_reuse");
>     switch (bo_reuse_mode) {
>     case DRI_CONF_BO_REUSE_DISABLED:
> --
> 1.8.3.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130806/1d79cefd/attachment.html>


More information about the mesa-dev mailing list