[Mesa-dev] [PATCH 06/32] glsl: Parse interface array size
Chad Versace
chad.versace at linux.intel.com
Thu Jan 24 16:37:39 PST 2013
On 01/23/2013 01:54 PM, Paul Berry wrote:
> On 22 January 2013 00:51, Ian Romanick <idr at freedesktop.org> wrote:
>
>> From: Ian Romanick <ian.d.romanick at intel.com>
>>
>> For now, just drop the value on the floor.
>>
>> Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
>> ---
>> src/glsl/ast.h | 12 ++++++-----
>> src/glsl/glsl_parser.yy | 55
>> ++++++++++++++++++++++++++++++++++++++-----------
>> 2 files changed, 50 insertions(+), 17 deletions(-)
>>
>> diff --git a/src/glsl/ast.h b/src/glsl/ast.h
>> index bcec6bb..e525cb2 100644
>> --- a/src/glsl/ast.h
>> +++ b/src/glsl/ast.h
>> @@ -804,12 +804,12 @@ public:
>> class ast_uniform_block : public ast_node {
>> public:
>> ast_uniform_block(ast_type_qualifier layout,
>> - const char *block_name,
>> - ast_declarator_list *member_list,
>> - const char *instance_name)
>> - : layout(layout), block_name(block_name), instance_name(instance_name)
>> + const char *instance_name,
>> + ast_expression *array_size)
>> + : layout(layout), block_name(NULL), instance_name(instance_name),
>> + array_size(array_size)
>> {
>> - declarations.push_degenerate_list_at_head(&member_list->link);
>> + /* empty */
>> }
>>
>> virtual ir_rvalue *hir(exec_list *instructions,
>> @@ -820,6 +820,8 @@ public:
>> const char *instance_name;
>> /** List of ast_declarator_list * */
>> exec_list declarations;
>> +
>> + ast_expression *array_size;
>>
>
> It would be nice to have a comment here explaining that this member is NULL
> if the ast_uniform_block lacks array nature.
With Paul's comment about NULL,
Reviewed-by: Chad Versace <chad.versace at linux.intel.com>
More information about the mesa-dev
mailing list