diff options
author | Paul Berry <[email protected]> | 2013-10-22 15:11:51 -0700 |
---|---|---|
committer | Paul Berry <[email protected]> | 2013-10-24 22:01:10 -0700 |
commit | 99512dc40d762d15d636ea711c496bd0350ef7f1 (patch) | |
tree | 679d5dffee517cf4816497f7a37a6e48305a576e /src/glsl/ast_to_hir.cpp | |
parent | e17d671d9f64fe135a10ec54dd5b5a6beacfd991 (diff) |
glsl: Keep track of centroid/interpolation mode for interface block members.
Fixes piglit tests:
- interface-block-interpolation-{array,named,unnamed}
- glsl-1.50-interface-block-centroid {array,named,unnamed}
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/glsl/ast_to_hir.cpp')
-rw-r--r-- | src/glsl/ast_to_hir.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index d216fee3839..8b49b8488a0 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -4525,6 +4525,9 @@ ast_process_structure_or_interface_block(exec_list *instructions, fields[i].type = field_type; fields[i].name = decl->identifier; fields[i].location = -1; + fields[i].interpolation = + interpret_interpolation_qualifier(qual, var_mode, state, &loc); + fields[i].centroid = qual->flags.q.centroid ? 1 : 0; if (qual->flags.q.row_major || qual->flags.q.column_major) { if (!qual->flags.q.uniform) { @@ -4789,6 +4792,10 @@ ast_interface_block::hir(exec_list *instructions, } else { fields[i].location = earlier_per_vertex->fields.structure[j].location; + fields[i].interpolation = + earlier_per_vertex->fields.structure[j].interpolation; + fields[i].centroid = + earlier_per_vertex->fields.structure[j].centroid; } } @@ -4924,6 +4931,8 @@ ast_interface_block::hir(exec_list *instructions, new(state) ir_variable(fields[i].type, ralloc_strdup(state, fields[i].name), var_mode); + var->interpolation = fields[i].interpolation; + var->centroid = fields[i].centroid; var->init_interface_type(block_type); if (redeclaring_per_vertex) { |