On Monday, January 23, 2017 9:13:38 AM PST Jason Ekstrand wrote:
> On Mon, Jan 23, 2017 at 4:59 AM, Ilia Mirkin <imir...@alum.mit.edu> wrote:
> 
> > On Mon, Jan 23, 2017 at 1:42 AM, Kenneth Graunke <kenn...@whitecape.org>
> > wrote:
> > > +      *ymin = MIN2(ndc_gb_ymin, ndc_gb_ymax);
> >
> > Should this be limited on the negative end of the range?
> >
> > > +      *ymax = MIN2(MAX2(ndc_gb_ymin, ndc_gb_ymax), 16383);
> >
> > And should this be a different value for gen6? Perhaps based on gb_size?
> >
> 
> I don't think so.  It's a limit on some hardware for unknown reasons.  That
> said, Ken, it would be really nice to get an actual PRM citation because I
> can't find it anywhere.

I'm going to drop this bonus clamp.  It's attempting to implement a
workaround (WaGuardbandSize) which is only documented in the BSpec
(I believe it was added after the PRMs were published).   I believe
it was trying to fix some Windows test, but it wasn't terribly clear
what the issue was.  The documentation doesn't indicate whether it
should be done in screen space or NDC space.

I believe the Windows driver attempts to do it in screen space, but
actually ends up clamping things to [-16385, 16385] because of what
looks like an off-by-one bug...so it doesn't match the documentation
either.  Plus, their viewport transform code is a bit different than
Jason's - it just applies the transform, but doesn't consider the
framebuffer.  It might be that Jason's transform is enough to fix
the issue.  Unclear.

More importantly, implementing the clamping in screenspace like I
intended to do (but botched) causes GL45-CTS.gtf21.GL2FixedTests.clip.clip
to remain broken, and fixing that was kind of the point of all this.

I'll send a v2 of this patch.

--Ken

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to