[Mesa-dev] [PATCH 15/18] i965: Drop region usage from DRI2 winsys-allocated buffers.

Chad Versace chad.versace at linux.intel.com
Thu May 1 10:46:01 PDT 2014


> On Tue, Apr 29, 2014 at 4:34 PM, Eric Anholt <eric at anholt.net> wrote:

> > -   intel_region_release(&intelBuffer->region);
> > +   drm_intel_bo_unreference(&intelBuffer->bo);
> >     free(intelBuffer);

This hunk passes garbage to drm_intel_bo_unreference(). Here's the GCC warning.

    intel_screen.c: In function 'intelReleaseBuffer':
    intel_screen.c:1428:4: warning: passing argument 1 of 'drm_intel_bo_unreference' from incompatible pointer type [enabled by default]
        drm_intel_bo_unreference(&intelBuffer->bo);
        ^
    In file included from brw_context.h:51:0,
                     from intel_batchbuffer.h:6,
                     from intel_screen.c:95:
    /usr/include/libdrm/intel_bufmgr.h:123:6: note: expected 'struct drm_intel_bo *' but argument is of type 'struct drm_intel_bo **'
     void drm_intel_bo_unreference(drm_intel_bo *bo);

Fix that and this patch is
Reviewed-by: Chad Versace <chad.versace at linux.intel.com>


More information about the mesa-dev mailing list