On 12 November 2015 at 00:09, Matt Turner <matts...@gmail.com> wrote: > On Wed, Nov 11, 2015 at 4:08 PM, Kenneth Graunke <kenn...@whitecape.org> > wrote: >> Actually, your earlier statement: >> "if file == BAD_FILE, no other fields mean anything." >> suggests that we should change fs_reg() to simply set BAD_FILE, and >> not bother initializing the other fields. That would eliminate one >> of the redundant memsets, and give us valgrind errors if we used >> an uninitialized value. If we do that, though, we should make >> equals() return true for two BAD_FILE registers. > > That's a really good idea. I'll give that a try. May I suggest that we do that on top (or as part of?) the series I've sent ?
On the topic of using mem{set,cmp,cpy} with C++ objects I believe that it's highly ill-advised. A quick grep shows ~85 and 45 references respectively in i965 and glsl. Seems like sorting these will be another lengthy series :-] Thanks Emil _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev