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

Timothy Arceri t_arceri at yahoo.com.au
Tue Apr 29 16:24:26 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.

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140429/37194eeb/attachment-0001.html>


More information about the mesa-dev mailing list