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

Kenneth Graunke kenneth at whitecape.org
Sat Aug 13 23:25:16 UTC 2016


On Saturday, August 13, 2016 12:59:46 PM PDT 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>
> ---
>  src/mesa/drivers/dri/i965/brw_object_purgeable.c | 36 ++++++++++++++++++------
>  1 file changed, 27 insertions(+), 9 deletions(-)

Thanks Chris!

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160813/89cfbe47/attachment-0001.sig>


More information about the mesa-dev mailing list