[Mesa-dev] Question: glsl shader input/output for arrays of arrays

Timothy Arceri t_arceri at yahoo.com.au
Tue Apr 29 20:01:13 PDT 2014



>Hi all,
>

>First of all sorry for the newbie question but I'm having trouble figuring out what I need to do next for the >arrays of arrays implementation. I'm just looking for some quick pointers in the right direction.
>

>I'm currently looking at what needs to be done to update ir_set_program_inouts.cpp my current thinking is I >need flatten any multidimensional array indices into a single 1D index for marking as used in the bitfield >which is fine (please correct me if I'm heading in the wrong direction). However for this to work obviously the >elements order is important, where is the code that assocates the locations in for example the InputsRead >bitfield with an array itself in other words how to I make sure a flattened index is marking the correct spot as >read? I'm assuming this code would also need to be updated for multidimensional arrays.

ok looks like the code I'm looking for is in lower_packed_varyings.cpp I'm still wondering however if it would be better to just leave this alone and simply flatten input/output/uniform mulitdimensional arrays at an earlier point.


>Or am I totally off track? Maybe all of this could be avoided by using some kind of lowering pass to flattern >multidimensional arrays to single dimensional arrays (or 2D array for gemotry shaders input) before >ir_set_program_inouts is called and any linking is done? This would probably solve any issues with uniform >linking also.

>

>I hope my questions make sense. If not people feel free to ignore my questions and just point me in the right >direction.
>

>Thanks,
>Tim



_______________________________________________
mesa-dev mailing list
mesa-dev at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140429/5b4ad4d4/attachment.html>


More information about the mesa-dev mailing list