[Mesa-dev] gallium scaled types

Dave Airlie airlied at gmail.com
Tue Sep 13 13:37:57 PDT 2011

> On the contrary, I think that putting norm and scaled/int in the same sack is talking apples and oranges...   Normalization, like fixed-point integers, affects the interpretation of the 32bit integer in memory, namely the scale factor that it should be multiplied. Whereas  the only difference between _SSCALED and _SINT is the final data type (int vs float) -- the value is exactly the same (modulo rounding errors).
> The pure vs non-pure integer is really a "policy" flag, which means please do not implicetly convert this to a float at any point of the vertex pipeline. And I believe that policy flags should be outside enum pipe_format.

While I'm tending to agree with you Jose, the other thing that we
haven't discussed yet is that we need to add new pack/unpack
interfaces to u_format for all these types anyways to get a integer
clean path (no float converts in the pipeline), increasing the size of
the u_format_table anyways. With separate types we could overload the
float pack/unpack. ones most likely.

Thanks for helping on this, I've been quite happy to try both ways in
code so far and I'm not really sure which one is a winner yet.


More information about the mesa-dev mailing list