On Tuesday 30 December 2008 11:05:34 Alex wrote:
> Hello.
>
> I am very new to this mailing list so if I've missed something please
> nicely point it out.
>
> I am reading the source code of the Mesa Cell driver (branch "gallium-0.2")
> and get really confused.
>
> If I read correctly, there are two paths converting TGSI tokens to LLVM IR.
>
> The first one I called "SOA path" (please correct me if a name already
> exists), implemented in tgsi_to_llvmir(), using InstructionSoa and
> StorageSoa classes. If I understand correct, this rendering path is for the
> processor with SIMD ISA (quad), like general CPU, Cell, right?
>
> The second one I refer as non-SOA path, implemented in tgsi_to_llvm(),
> which uses the "non-SOA" version of class Instruction and Storage. This one
> supports sub-programs, function calls, loops, etc.
>
> But the second path is never used in the source code (tgsi_to_llvm() is not
> called anywhere). What is the status of this path? Is it still used and
> actively maintained?

It's not used anymore. 
Essentially both of those should be maintained (soa and aos). I started with 
aos because it's semantically a little simpler. I stopped playing it with 
though because soa was more important. The derivative instructions in fragment 
shaders make the aos layout implementation rather tricky. So to make it all 
simple soa is currently used for vertex and fragment shaders. 
Dependingly on which way the instruction set of modern gpus is going to head, 
aos will either become completely irrelevant soon (more likely) or aos will 
get more important. Either way as it stands we should concentrate on soa for 
now.

> PS: I am converting vs_3_0 tokens to LLVM IR and I think I should reference
> the second path, but I am so confused about the function arguments of the
> llvm::Function. How v#, c#, r# are passed to the shader and treated/layout
> in the LLVM IR?

They're all as well in soa. To be more specific as the comment mentions in 
tgsitollvm.cpp currently they are: [4 x <4 x float>] inputs, [4 x <4 x float>] 
output, [4 x [1 x float]] consts ("[]" in llvm notation denotes an array and 
"<>" denotes a vector)

z

------------------------------------------------------------------------------
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to