OSDN Git Service

dri3: use invalidate.
authorAxel Davy <axel.davy@ens.fr>
Thu, 19 Jun 2014 03:27:31 +0000 (23:27 -0400)
committerDave Airlie <airlied@gmail.com>
Fri, 27 Jun 2014 01:39:34 +0000 (11:39 +1000)
This doesn't change anything to the intel DRI3 implementation,
but enables the gallium implementation to use dri2.stamp instead
of relying on the stamp shared with the st backend.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/glx/dri3_glx.c

index edad014..9d2a40f 100644 (file)
@@ -1308,9 +1308,14 @@ static const __DRIimageLoaderExtension imageLoaderExtension = {
    .flushFrontBuffer    = dri3_flush_front_buffer,
 };
 
+const __DRIuseInvalidateExtension dri3UseInvalidate = {
+   .base = { __DRI_USE_INVALIDATE, 1 }
+};
+
 static const __DRIextension *loader_extensions[] = {
    &imageLoaderExtension.base,
    &systemTimeExtension.base,
+   &dri3UseInvalidate.base,
    NULL
 };
 
@@ -1384,6 +1389,8 @@ dri3_swap_buffers(__GLXDRIdrawable *pdraw, int64_t target_msc, int64_t divisor,
          ++(*priv->stamp);
    }
 
+   (*psc->f->invalidate)(priv->driDrawable);
+
    return ret;
 }