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

Olivier Galibert galibert at pobox.com
Tue Jul 3 13:43:34 PDT 2012


On Tue, Jul 03, 2012 at 12:39:47PM -0700, Jose Fonseca wrote:
> Note that all registers are stored as floats (for convenience, and
> because LLVM has no unions), so integers are bitcasted into floats
> while storing/loading.  And I'm not sure if your patch would break
> that.

I did test the patch with a llvmpipe in a glsl 120/no native integer
setup.  draw_instanced worked.  I didn't try a full piglit though.


> I still think that having draw/gallivm guessing whether native integer support is intended or not is bad. Either:
> 1) TGSI is extended (e.g., more type annotations) so that native-integer support can inferred from it
> 2) draw/gallivm need to now if the driver has native-integer or not
> 
> I'm inclined towards 1), as TGSI should be self-documented. That is,
> it should not be necessary to know if the driver has or not native
> integer support to know whether system values should be assumed to
> be integers or floats...

It could be argued that dtype being TGSI_TYPE_FLOAT is the
documentation on what is expected.  But I'm quickly reaching the point
where I don't really care, just tell me what you want.  As long as
textureFetch stays the only issue between llvmpipe and 1.30 I'm ok.

Of course doing textureFetch right is going to require an interesting
overhaul of the texture allocations... need to finish fixing the gm45
interpolation/clipping first.

Best,

  OG.



More information about the mesa-dev mailing list