On Sun, 2011-11-13 at 14:43 -0600, Bryan Cain wrote: > 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. >
I'd certainly support the idea of adding type information to TGSI. It would mean that any SM4-to-TGSI translator would have to do type inference, but afaik SM4 is the only place where that would have to happen -- all other potential sources of TGSI either have type information (like IR as noted above), or are pretty much float-only (like SM3). Keith _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev