summaryrefslogtreecommitdiff
path: root/src/glsl/ast_expr.cpp
diff options
context:
space:
mode:
authorPaul Berry <stereotype441@gmail.com>2013-10-29 14:41:32 -0700
committerIan Romanick <ian.d.romanick@intel.com>2013-11-15 13:39:40 -0800
commit1b45f255b592692bdcd25b1f487a2f72c469ac63 (patch)
tree4d3156a2b381053bec3d498bce09eb579fcc211c /src/glsl/ast_expr.cpp
parent1a163c0b347a089c4db59bbc38d6fc87e2da9e50 (diff)
glsl: Rework interface block linking.
Previously, when doing intrastage and interstage interface block linking, we only checked the interface type; this prevented us from catching some link errors. We now check the following additional constraints: - For intrastage linking, the presence/absence of interface names must match. - For shader ins/outs, the interface names themselves must match when doing intrastage linking (note: it's not clear from the spec whether this is necessary, but Mesa's implementation currently relies on it). - Array vs. nonarray must be consistent, taking into account the special rules for vertex-geometry linkage. - Array sizes must be consistent (exception: during intrastage linking, an unsized array matches a sized array). Note: validate_interstage_interface_blocks currently handles both uniforms and in/out variables. As a result, if all three shader types are present (VS, GS, and FS), and a uniform interface block is mentioned in the VS and FS but not the GS, it won't be validated. I plan to address this in later patches. Fixes the following piglit tests in spec/glsl-1.50/linker: - interface-blocks-vs-fs-array-size-mismatch - interface-vs-array-to-fs-unnamed - interface-vs-unnamed-to-fs-array - intrastage-interface-unnamed-array v2: Simplify logic in intrastage_match() for handling array sizes. Make extra_array_level const. Use an unnamed temporary interface_block_definition in validate_interstage_interface_blocks()'s first call to definitions->store(). Cc: "10.0" <mesa-stable@lists.freedesktop.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> (cherry picked from commit f38ac41ed48fefe82360520c9d33ba9261a3e642)
Diffstat (limited to 'src/glsl/ast_expr.cpp')
0 files changed, 0 insertions, 0 deletions