[Mesa-dev] TGSI declarations missing type info

Marek Olšák maraeo at gmail.com
Sun Nov 13 08:10:56 PST 2011


I am guessing there is no type info because TGSI shaders are allowed
to use uint, sint, and float instructions on the same register without
type conversions (it would be possible to generate such usage with
GL_ARB_shader_bit_enconding, also GL_NV_gpu_program4 has typeless
registers too). I think GLSL has types because it's a typed language,
not because it's needed for the underlying implementation. Do all
drivers need such info or is it just llvmpipe that would make use of
it?

It's like you said: Right now TGSI temporaries are like unions in C.
Only the instructions are typed (MAX vs IMAX vs UMAX).

Marek

On Sun, Nov 13, 2011 at 4:06 PM, Dave Airlie <airlied at gmail.com> wrote:
> Hi guys,
>
> Just been looking at llvmpipe integer support and it seems like we
> lose some information about the type of data stored into temporaries,
>
> after st_glsl_to_cpp we no longer know what type the temporaries are,
> and llvm would really like to know and I can't see any reason that
> TGSI doesn't contain the info. Having untyped temp decls means we'd
> have to allocate some sort of "union" via aliases I guess in llvmpipe
> for all temps so we can store int/float in them.
>
> I've attached a run of glsl-vs-loop from llvmpipe with integer opcodes
> forced on. (llvmpipe-int-test branch of my repo).
>
> Dave.
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
>


More information about the mesa-dev mailing list