[Bug 34495] Selecting objects in Blender 2.56 slow with gallium r600 driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugs.freedesktop.org/show_bug.cgi?id=34495

--- Comment #30 from Pierre-Eric Pelloux-Prayer <pelloux@xxxxxxxxx> 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.
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux