From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 27901] GLSL cos/sin functions broken on Mesa R600 driver Date: Thu, 20 May 2010 17:40:22 -0700 (PDT) Message-ID: <20100521004022.38AFB13004E@annarchy.freedesktop.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from annarchy.freedesktop.org (annarchy.freedesktop.org [131.252.210.176]) by gabe.freedesktop.org (Postfix) with ESMTP id 4FBA59E73D for ; Thu, 20 May 2010 17:40:22 -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: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org https://bugs.freedesktop.org/show_bug.cgi?id=27901 --- Comment #8 from Alain Perrot 2010-05-20 17:40:21 PDT --- Created an attachment (id=35777) View: https://bugs.freedesktop.org/attachment.cgi?id=35777 Review: https://bugs.freedesktop.org/review?bug=27901&attachment=35777 Alternative assemble_TRIG fix I can confirm that your patch seems to work for me too. By the way, you beat me at posting a working patch here :-) I also figured out that the 0.5 special constant was an issue in your patch, and I managed to get a working assemble_TRIG function which implements the following instruction sequence (lightly different of yours) to normalize the angle: MULADD tmp.x, angle, 1/(2*PI), 0.5 FRACT tmp.x, tmp.x ADD tmp.y, tmp.x, 1 CNDGE tmp.x, tmp.x, tmp.x, tmp.y MULADD tmp.x, tmp.x, 2*PI, -PI I don't known if it is better or worse than yours beside the fact that it use only one helper variable. I attached my patch (updated to use the same extended value of PI than yours) which fix the assemble_TRIG function, but not the assemble_SCS one. -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.