[Mesa-dev] [PATCH] st/mesa: fix WPOS adjustment
Marek Olšák
maraeo at gmail.com
Tue Apr 19 03:47:18 PDT 2011
2011/4/19 Michel Dänzer <michel at daenzer.net>
> On Die, 2011-04-19 at 12:00 +0200, Christoph Bumiller wrote:
> > On 16.04.2011 18:50, Christoph Bumiller wrote:
> > > I hope the new version is correct, the commit message describes why I
> > > did the first change, and the second change is described in a comment.
> > >
> > > Note that the MAD for inversion uses Height - 1 instead of Height.
> > >
> > > With this, piglit glsl-arb-fragment-coord-conventions and
> > > fbo-depth-sample-compare pass on nvc0.
> > >
> > > I was assuming that integer pixel centers for size 100 range from 0 to
> > > 99 and half-integer pixel centers from 0.5 to 99.5.
> > >
> > Attached a better version of the patch, potentially saving an
> > instruction and avoiding precision issues with NEAREST filtering that
> > made piglit's blending-in-shader fail.
> >
> > The only other location I found STATE_FB_WPOS_Y_TRANSFORM used was
> > r600 classic, which should also work more correctly now since (at
> > least according to gallium caps) it uses half-integer pixel center,
> > and for H=100, 0.5 * -1 + 99 obviously isn't the desired 99.5.
>
> FWIW, this fixes compiz alpha-blurred contents being off by one
> vertically on r300g. Thanks!
>
If that's true, it should be a candidate for 7.10 as well.
Marek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20110419/c46559f7/attachment.htm>
More information about the mesa-dev
mailing list