On 17 September 2013 12:18, Paul Berry <stereotype...@gmail.com> wrote:
> On 15 September 2013 00:10, Francisco Jerez <curroje...@riseup.net> wrote: > >> >> /** >> + * Return the amount of atomic counter storage required for a type. >> + */ >> + unsigned atomic_size() const >> + { >> + if (base_type == GLSL_TYPE_ATOMIC_UINT) >> + return ATOMIC_COUNTER_SIZE; >> + else if (is_array()) >> + return length * element_type()->atomic_size(); >> + else >> + return 0; >> + } >> > > Can atomic counters appear inside structs? If so, we probably need an > is_record() case here. If not, it would be nice to have a comment > explaining why it's unnecessary. > I also notice that most of your uses of atomic_size() in this patch series are merely to see whether the type contains any atomics. You might consider adding a contains_atomic() function (like we've already done with contains_sampler() and contains_integer()) just for code clarity.
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev