[Mesa-dev] TGSI declarations missing type info
Bryan Cain
bryancain3 at gmail.com
Sun Nov 13 12:43:14 PST 2011
On 11/13/2011 09:06 AM, Dave Airlie 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.
If you do add types to TGSI registers, it's worth noting that the
internal IR used by glsl_to_tgsi (glsl_to_tgsi_instruction) already the
types of all src and dst registers, and it's only lost when converting
that to TGSI. However, it was only intended to be good enough to
determine whether to emit an integer or float instruction, so there
might be some mistakes remaining somewhere that would need to be corrected.
Bryan
More information about the mesa-dev
mailing list