From patchwork Mon Jul 25 13:56:41 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: 3094 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 0721623E54 for ; Mon, 25 Jul 2011 13:58:45 +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 B6B96A18471 for ; Mon, 25 Jul 2011 13:58:44 +0000 (UTC) Received: by qyk30 with SMTP id 30so2964732qyk.11 for ; Mon, 25 Jul 2011 06:58:44 -0700 (PDT) Received: by 10.229.25.212 with SMTP id a20mr3471141qcc.148.1311602324042; Mon, 25 Jul 2011 06:58:44 -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 hl14cs77947qcb; Mon, 25 Jul 2011 06:58:43 -0700 (PDT) Received: by 10.204.79.67 with SMTP id o3mr1385682bkk.19.1311602323061; Mon, 25 Jul 2011 06:58:43 -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 2si7042401fad.117.2011.07.25.06.58.42 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 25 Jul 2011 06:58:43 -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 6so6804055fxe.17 for ; Mon, 25 Jul 2011 06:58:42 -0700 (PDT) Received: by 10.223.52.155 with SMTP id i27mr6705026fag.139.1311602258721; Mon, 25 Jul 2011 06:57:38 -0700 (PDT) Received: from localhost (77.49.93.204.dsl.dyn.forthnet.gr [77.49.93.204]) by mx.google.com with ESMTPS id a24sm3806896fak.12.2011.07.25.06.57.37 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 25 Jul 2011 06:57:37 -0700 (PDT) From: alexandros.frantzis@linaro.org To: patches@linaro.org Subject: [PATCH 14/21] gl: Use GL_MAX_TEXTURE_IMAGE_UNITS to query the maximum texture units Date: Mon, 25 Jul 2011 16:56:41 +0300 Message-Id: <1311602208-5973-14-git-send-email-alexandros.frantzis@linaro.org> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1311602208-5973-1-git-send-email-alexandros.frantzis@linaro.org> References: <1311602208-5973-1-git-send-email-alexandros.frantzis@linaro.org> From: Alexandros Frantzis The previous used value, GL_MAX_TEXTURE_UNITS, is only appropriate for the fixed pipeline. It is replaced with GL_MAX_TEXTURE_IMAGE_UNITS that refers to the number of texture units available in the fragment shader. Signed-off-by: Chris Wilson --- src/cairo-gl-device.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/cairo-gl-device.c b/src/cairo-gl-device.c index 6dcf835..fb0a7dd 100644 --- a/src/cairo-gl-device.c +++ b/src/cairo-gl-device.c @@ -210,7 +210,7 @@ _cairo_gl_context_init (cairo_gl_context_t *ctx) ctx->max_texture_size = 0; glGetIntegerv (GL_MAX_TEXTURE_SIZE, &ctx->max_texture_size); ctx->max_textures = 0; - glGetIntegerv (GL_MAX_TEXTURE_UNITS, &ctx->max_textures); + glGetIntegerv (GL_MAX_TEXTURE_IMAGE_UNITS, &ctx->max_textures); for (n = 0; n < ARRAY_LENGTH (ctx->glyph_cache); n++) _cairo_gl_glyph_cache_init (&ctx->glyph_cache[n]);