[Mesa-dev] [PATCH v4 2/4] r600 shader: Add extra function to evaluate array index

Gert Wollny gert.wollny at collabora.com
Tue Jul 17 08:24:41 UTC 2018


Am Montag, den 16.07.2018, 15:10 -0400 schrieb Ilia Mirkin:
> > From: Gert Wollny <gert.wollny at collabora.com>
[...]
> > 
> > The added function evaluates the array index according to the
> > function
> > 
> >     idx = floor(ai + 0.5);
> > 
[...]
> 
> Why not use RNDNE? Then you don't have to add the 0.5...

When I starten fixing these failures I used a texture offset "0.5" and
a sampler state to do the correct rounding - there "round to next even"
was not correct, but it actually does some n.6 rounding (i.e. not to
integer), but with cubemap arrays this approach is no longer an option
so I translated this to shader code to make it similar.

Because of the problems with the samler state rounding I assumed that
RNDNE is not what the tests expect for the corner case "1.5", but I
didn't really check. I'll recheck whether changing this keeps the tests
passing and resubmit a new patch set if this is the case,

thanks, 
Gert




More information about the mesa-dev mailing list