glx/dri3: Add additional check for gpu offloading case
authorAxel Davy <axel.davy@ens.fr>
Thu, 30 Apr 2015 22:20:34 +0000 (00:20 +0200)
committerAxel Davy <axel.davy@ens.fr>
Mon, 11 May 2015 17:31:44 +0000 (19:31 +0200)
Checks blitImage is implemented.
Initially having the __DRIimageExtension extension
at version 9 at least meant blitImage was supported.
However some implementation do advertise version >= 9
without implementing it.

CC: 10.5 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
src/glx/dri3_glx.c

index ff77a91b15f6562cdd5480fee9630e562d53997a..dfb0093395f75488947cd2ca5df70d91f8896573 100644 (file)
@@ -1985,6 +1985,11 @@ dri3_create_screen(int screen, struct glx_display * priv)
       goto handle_error;
    }
 
+   if (psc->is_different_gpu && !psc->image->blitImage) {
+      ErrorMessageF("Different GPU, but blitImage not implemented for this driver\n");
+      goto handle_error;
+   }
+
    if (!psc->is_different_gpu && (
        !psc->texBuffer || psc->texBuffer->base.version < 2 ||
        !psc->texBuffer->setTexBuffer2