On 10 April 2013 14:33, Ian Romanick <i...@freedesktop.org> wrote: > On 04/10/2013 01:32 PM, Kenneth Graunke wrote: > >> On 04/09/2013 09:01 PM, Paul Berry wrote: >> >>> The comment above glsl_type::name claimed that it could sometimes be >>> NULL. This was wrong--it is never NULL. Many error handling paths >>> would segfault if it were. >>> >>> Fix the comment and add assertions to validate that it really is never >>> NULL. >>> --- >>> src/glsl/glsl_types.cpp | 4 ++++ >>> src/glsl/glsl_types.h | 3 +-- >>> 2 files changed, 5 insertions(+), 2 deletions(-) >>> >> >> I could've sworn I've actually seen it be NULL for anonymous structures. >> What do those use? ""? >> > > They get a name like "#anon_struct_0001". See the ast_struct_specifier > constructor in glsl_parser_extras.cpp. It may be worth mentioning this > either in the commit message or in the code somewhere. >
I'll mention it in the commit message.
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev