On 11/06/2013 12:55 PM, Paul Berry wrote: [snip] > Ok, I think you are correct about the functions. But I believe for > variables, the ir_variable always appears in the IR before any > references to it. Can someone confirm this? (Ken or Ian perhaps?)
That's correct, and actually critical. Driver backends allocate storage space for variables when they see ir_variable declarations in the instruction stream. Later, when they encounter an ir_dereference_variable, they look up the storage for that variable, which must already exist. (i965 has assertions to verify this - if you dereference a variable that hasn't been declared yet, it will abort.) --Ken _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev