From mboxrd@z Thu Jan 1 00:00:00 1970
From: bugzilla-daemon@freedesktop.org
Subject: [Bug 34495] Selecting objects in Blender 2.56 slow with gallium r600
driver
Date: Fri, 1 Jul 2011 10:28:11 -0700 (PDT)
Message-ID: <20110701172812.015E013004F@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 15DEB9E7A9
for ;
Fri, 1 Jul 2011 10:28:12 -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=34495
--- Comment #30 from Pierre-Eric Pelloux-Prayer 2011-07-01 10:28:11 PDT ---
(In reply to comment #28)
> Yes but you're reading exacly the same buffer for each entry
The FBO is read once, but it contains ctx->Select.BatchEntryCount entries (each
entry is a square of size : _OffscreenSurfaceWidth * _OffscreenSurfaceHeight,
the total FBO width is _OffscreenSurfaceWidth * BatchSize)
By the way the glReadBack could be changed from :
_mesa_ReadPixels(0, 0, fboW, fboH, GL_DEPTH_COMPONENT, GL_FLOAT, buffer);
to :
_mesa_ReadPixels(0, 0, _OffscreenSurfaceWidth * ctx->Select.BatchEntryCount,
fboH, GL_DEPTH_COMPONENT, GL_FLOAT, buffer);
In the loop, we're reading this value :
float z = buffer[y * fboW + xOffset + x];
with xOffset being modified according to the current entry being read (ie point
at the correct square)
So I keep thinking this is correct :-)
> This got me thinking, and I think I know why. I believe currently minZ and maxZ
> values returned will almost always be incorrect.
Yup, you're right...
> [...] I think that in order to correctly do this we
> would have to have 2 fbos.
Hmm... this would further complicate the process but maybe that's the only
solution. I have to think about it too :-)
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.