From patchwork Fri Mar 19 15:25:16 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: bugzilla-daemon@freedesktop.org X-Patchwork-Id: 86972 Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o2JFQVWL003312 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 19 Mar 2010 15:27:07 GMT Received: from localhost ([127.0.0.1] helo=sfs-ml-4.v29.ch3.sourceforge.com) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1Nse4j-0000hz-Dn; Fri, 19 Mar 2010 15:25:25 +0000 Received: from sfi-mx-1.v28.ch3.sourceforge.com ([172.29.28.121] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1Nse4h-0000hm-Se for dri-devel@lists.sourceforge.net; Fri, 19 Mar 2010 15:25:23 +0000 X-ACL-Warn: Received: from gabe.freedesktop.org ([131.252.210.177]) by sfi-mx-1.v28.ch3.sourceforge.com with esmtp (Exim 4.69) id 1Nse4g-00037I-RB for dri-devel@lists.sourceforge.net; Fri, 19 Mar 2010 15:25:23 +0000 Received: from annarchy.freedesktop.org (annarchy.freedesktop.org [131.252.210.176]) by gabe.freedesktop.org (Postfix) with ESMTP id 087249E774 for ; Fri, 19 Mar 2010 08:25:17 -0700 (PDT) Received: by annarchy.freedesktop.org (Postfix, from userid 33) id C5158130118; Fri, 19 Mar 2010 08:25:16 -0700 (PDT) From: bugzilla-daemon@freedesktop.org To: dri-devel@lists.sourceforge.net Subject: [Bug 27199] Division by Zero error with glDrawRangeElementsEXT() X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: newchanged X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Mesa X-Bugzilla-Component: Drivers/DRI/r300 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rankincj@googlemail.com X-Bugzilla-Status: NEW X-Bugzilla-Priority: medium X-Bugzilla-Assigned-To: dri-devel@lists.sourceforge.net X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: In-Reply-To: References: MIME-Version: 1.0 Message-Id: <20100319152516.C5158130118@annarchy.freedesktop.org> Date: Fri, 19 Mar 2010 08:25:16 -0700 (PDT) X-Spam-Score: 0.0 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 0.0 AWL AWL: From: address is in the auto white-list X-Headers-End: 1Nse4g-00037I-RB X-BeenThere: dri-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.sourceforge.net X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Fri, 19 Mar 2010 15:27:07 +0000 (UTC) --- a/src/mesa/drivers/dri/r300/r300_cmdbuf.c +++ b/src/mesa/drivers/dri/r300/r300_cmdbuf.c @@ -424,7 +424,7 @@ static void emit_zb_offset(GLcontext *ctx, struct radeon_sta uint32_t dw = atom->check(ctx, atom); rrb = radeon_get_depthbuffer(&r300->radeon); - if (!rrb) + if (!rrb || (rrb->cpp == 0)) return;