[Mesa-dev] gallium scaled types
Jose Fonseca
jfonseca at vmware.com
Tue Sep 13 09:23:05 PDT 2011
----- Original Message -----
> I've attached a rough outline of a patch to add a bind_as_integer
> flag
> for vertex elements, sampler views and surfaces.
I don't mind "as_integer" but I wonder if "as_float" (i.e. the negative), wouldn't be more generic (so it could be used for doubles too [1]).
> I wonder if the sampler view and surfaces are always going to be bind
> as integer for SCALED types, in which case maybe we can just state
> that somewhere and move on.
It looks like it.
GLSL defines
gvec4 texture (gsampler2D sampler, vec2 ...)
where g is '', 'i', 'u'.
But in section 8.7, "Texture Lookup Functions" of GLSLangSpec.3.30.6.clean.pdf it has a table relating texture internal formats with the vector types, and doesn't allow converting between different type.
> I've also shown the clear color code in softpipe where it pick the
> correct clear color depending on the surface type.
>
> I've started hacking on u_blitter and r600g to no avail yet to try
> and
> get some of the -integer tests passing.
Jose
[1] although this is academic, given that there doesn't seem to be double sample support.
More information about the mesa-dev
mailing list