[Mesa-dev] [PATCH 14/14] glsl: Add support for C-style initializers.
Matt Turner
mattst88 at gmail.com
Fri Jul 12 11:12:45 PDT 2013
On Thu, Jul 11, 2013 at 8:52 PM, Matt Turner <mattst88 at gmail.com> wrote:
>> I believe that all this grammar is correct, but do we have tests for
>> spurious curly braces? Things like
>>
>> vec4 v = {{{1, 2, 3, 4}}};
>
> No, I'll write one.
Nice call on this test. For vectors _mesa_ast_set_aggregate_type would
walk through the right and left hand sides and stop when it ran out of
things to look at in either. For your example, this would leave the
constructor_type NULL for {1, 2, 3, 4}, so it'd blow up in the ::hir
function.
I've mailed a fix and a piglit test.
Thanks!
Matt
More information about the mesa-dev
mailing list