[Mesa-dev] gallium scaled types
Ian Romanick
idr at freedesktop.org
Tue Sep 13 09:30:13 PDT 2011
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 09/13/2011 11:23 AM, Jose Fonseca wrote:
> ----- 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.
Integer samplers can only be used with integer textures. This is a
case just like shadow samplers. If you use an integer texture with a
mismatched sampler type, you get undefined results, IIRC. I know that
it's not expected to work, and I don't think it will generate any sort
of error (since that requires validation at glBegin).
>> 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.
Not yet, but there surely will be someday.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk5vhRUACgkQX1gOwKyEAw8YtACeJBcAww4YHMR+ju0dAAjLpThd
Mk4AnA0/zdMwa1B1fs5BNgO2ha4sQwJQ
=7A5e
-----END PGP SIGNATURE-----
More information about the mesa-dev
mailing list