[Mesa-dev] [PATCH] i965: Do not used purged bo after calling glObjectUnpurgeable

Chris Wilson chris at chris-wilson.co.uk
Sat Aug 13 12:07:26 UTC 2016


On Sat, Aug 13, 2016 at 12:59:46PM +0100, Chris Wilson wrote:
> If the buffer has been freed by the kernel under memory pressure, it is
> invalid to try and access the backing storage for that buffer in the
> future - the backing storage is not recreated automatically. As such we
> need to mark the GL object as being freed for unretained buffers and so
> recreate the object on next use.
> 
> Futhermore from the GL_APPLE_object_purgeable:
> 
>     "In contrast, by calling ObjectUnpurgeableAPPLE with an <option> of
>     UNDEFINED_APPLE, the application is indicating that it intends to
>     recreate the contents of the storage from scratch.  Further, the
>     application is is stating that it would like the GL to do only the
>     minimal amount of work set PURGEABLE_APPLE to FALSE.   If
>     ObjectUnpurgeableAPPLE is called with the <option> set to
>     UNDEFINED_APPLE, then ObjectUnpurgeableAPPLE will return the value
>     UNDEFINED_APPLE."
> 
> we must always report GL_UNDEFINED_APPLE when called with
> glObjectUnpurgeable(GL_UNDEFINED_APPLE).
> 
> Testcase: piglit/object_purgeable-api-*
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54909
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the mesa-dev mailing list