Eric Anholt wrote:
> Module: Mesa
> Branch: master
> Commit: 2792baec343e5773ff51e93c1b6df8b63d3af4af
> URL:    
> http://cgit.freedesktop.org/mesa/mesa/commit/?id=2792baec343e5773ff51e93c1b6df8b63d3af4af
> 
> Author: Eric Anholt <e...@anholt.net>
> Date:   Tue Jan 26 18:04:03 2010 -0800
> 
> intel: Remove dead code from having to clip copyteximage source rect.
> 
> mesa core does it now.  If only it did so for other entrypoints.

There's actually a subtle reason why core Mesa doesn't do clipping for 
all the glDrawPixels/CopyPixels/etc functions.

The GL spec says that pixel-transfer ops such as histograms and minmax 
  are applied before fragments are clipped/culled.  Mesa allows the 
driver functions to take a crack at applying any/all pixel transfer 
operations (scale/bias, LUT, histogram, etc).  If the driver can do 
those things, great.  Otherwise a sw fallback is used.

If we clipped glDrawPixels (for example) in core Mesa before doing 
pixel transfer ops and before calling the driver function that would 
upset the histogram/minmax outcome.

That said, this is a pretty obscure case and we've never had a driver 
implement histograms.  But that's why.

There are utility functions such as _mesa_clip_pixels() that drivers 
can use to do clipping.

-Brian

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to