From mboxrd@z Thu Jan 1 00:00:00 1970 From: Brian Paul Subject: Re: [PATCH 1/3] r600: add span support for 2D tiling Date: Thu, 27 May 2010 09:51:43 -0600 Message-ID: <4BFE950F.3090208@vmware.com> References: <1274829174-17491-1-git-send-email-alexdeucher@gmail.com> <1274829174-17491-2-git-send-email-alexdeucher@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from smtp-outbound-2.vmware.com (smtp-outbound-2.vmware.com [65.115.85.73]) by gabe.freedesktop.org (Postfix) with ESMTP id DA8B99EC83 for ; Thu, 27 May 2010 08:51:43 -0700 (PDT) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Alex Deucher Cc: "dri-devel@lists.freedesktop.org" List-Id: dri-devel@lists.freedesktop.org Alex Deucher wrote: > On Thu, May 27, 2010 at 10:55 AM, Matt Turner wrote: >>> +static inline GLint r600_log2(GLint n) >>> +{ >>> + GLint log2 = 0; >>> + >>> + while (n >>= 1) >>> + ++log2; >>> + return log2; >>> +} >> Does mesa not provide something like this? > > The only one I could find was a gallium utility function. There's a logbase2() function in teximage.c but it might not be equivalent. -Brian