From patchwork Mon Jul 25 14:06:53 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: alexandros.frantzis@linaro.org X-Patchwork-Id: 3105 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id B4D38241E1 for ; Mon, 25 Jul 2011 14:07:00 +0000 (UTC) Received: from mail-qy0-f180.google.com (mail-qy0-f180.google.com [209.85.216.180]) by fiordland.canonical.com (Postfix) with ESMTP id 7D223A184F7 for ; Mon, 25 Jul 2011 14:07:00 +0000 (UTC) Received: by qyk30 with SMTP id 30so2971124qyk.11 for ; Mon, 25 Jul 2011 07:07:00 -0700 (PDT) Received: by 10.229.68.200 with SMTP id w8mr3741502qci.114.1311602819867; Mon, 25 Jul 2011 07:06:59 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.229.217.78 with SMTP id hl14cs78217qcb; Mon, 25 Jul 2011 07:06:59 -0700 (PDT) Received: by 10.223.155.141 with SMTP id s13mr5115459faw.109.1311602818957; Mon, 25 Jul 2011 07:06:58 -0700 (PDT) Received: from mail-fx0-f44.google.com (mail-fx0-f44.google.com [209.85.161.44]) by mx.google.com with ESMTPS id l8si7047111fam.151.2011.07.25.07.06.58 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 25 Jul 2011 07:06:58 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.161.44 is neither permitted nor denied by best guess record for domain of alexandros.frantzis@linaro.org) client-ip=209.85.161.44; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.161.44 is neither permitted nor denied by best guess record for domain of alexandros.frantzis@linaro.org) smtp.mail=alexandros.frantzis@linaro.org Received: by fxe6 with SMTP id 6so6812833fxe.17 for ; Mon, 25 Jul 2011 07:06:58 -0700 (PDT) Received: by 10.223.20.154 with SMTP id f26mr6872337fab.104.1311602818511; Mon, 25 Jul 2011 07:06:58 -0700 (PDT) Received: from localhost (77.49.93.204.dsl.dyn.forthnet.gr [77.49.93.204]) by mx.google.com with ESMTPS id r12sm3813781fam.0.2011.07.25.07.06.57 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 25 Jul 2011 07:06:57 -0700 (PDT) From: alexandros.frantzis@linaro.org To: patches@linaro.org Subject: [PATCH 1/3] gl: Fail if GL implementation doesn't support shaders Date: Mon, 25 Jul 2011 17:06:53 +0300 Message-Id: <1311602815-6314-1-git-send-email-alexandros.frantzis@linaro.org> X-Mailer: git-send-email 1.7.5.4 From: Alexandros Frantzis The non-shaders implementation was never tuned for fixed-function GL implementation, the maintainers are not interested in supporting it, and the hardware is rather rare at this point. This lets us focus on the implementation for modern hardware, which needs plenty of work still. Reviewed-by: Eric Anholt --- src/cairo-gl-shaders.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/src/cairo-gl-shaders.c b/src/cairo-gl-shaders.c index 2b31bfc..6a42fd1 100644 --- a/src/cairo-gl-shaders.c +++ b/src/cairo-gl-shaders.c @@ -359,9 +359,15 @@ _cairo_gl_context_init_shaders (cairo_gl_context_t *ctx) (_cairo_gl_has_extension ("GL_ARB_shader_objects") && _cairo_gl_has_extension ("GL_ARB_fragment_shader") && _cairo_gl_has_extension ("GL_ARB_vertex_shader"))) + { ctx->shader_impl = &shader_impl_core_2_0; + } else + { ctx->shader_impl = NULL; + fprintf (stderr, "Error: The cairo gl backend requires shader support!\n"); + return CAIRO_STATUS_DEVICE_ERROR; + } memset (ctx->vertex_shaders, 0, sizeof (ctx->vertex_shaders));