[Mesa-dev] Mesa (master): draw: fix flat shading and screen-space linear interpolation in clipper

Jose Fonseca jfonseca at vmware.com
Wed Jul 11 08:26:21 PDT 2012



----- Original Message -----
> On Wed, Jul 11, 2012 at 4:23 PM, Jose Fonseca <jfonseca at vmware.com>
> wrote:
> >
> > When NativeIntegers is FALSE, Mesa generates this VS:
> >
> >   DCL SV[0], INSTANCEID
> >   ...
> >   ARL ADDR[0].x, SV[0].xxxx
> >
> > If INSTANCEID is an integer this is wrong, as it is reading a float
> > where there's an integer. (e.g., for INSTANCEID =1 ARRD[0] would
> > have round(0.0000000001) zero).
> >
> > But, if I modify mesa statetracker to insert the U2F as necessary
> > evertyhing will work as expected
> >
> >   DCL SV[0], INSTANCEID
> >   ...
> >   U2F TEMP[0].x, SV[0].xxxx
> >   ARL ADDR[0].x, TEMP[0].xxxx
> >
> > This is essencially what Olivier patch did, but without guessing.
> > Mesa state tracker can known everything it needs to do the "right
> > thing", i.e., INSTANCEID is integer.
> 
> I see. However if PIPE_SHADER_CAP_INTEGERS is 0, I2F and U2F are
> unsupported instructions. 

No. 

  PIPE_SHADER_CAP_INTEGERS is 0 for *PS* (i915)

  PIPE_SHADER_CAP_INTEGERS is 1 for *VS* (draw)

Therefore a I2F/U2F is not an unsupported function in draw.

Everything's just fine AFAICT.

I really don't want TGSI semantics to vary (having draw calling PIPE_SHADER_CAP_INTEGERS to understand the meaning of INSTANCEID).

Jose


More information about the mesa-dev mailing list