glsl: Use parse_program_resource_name to parse transform feedback varyings.
authorPaul Berry <stereotype441@gmail.com>
Tue, 29 Jan 2013 13:52:47 +0000 (05:52 -0800)
committerPaul Berry <stereotype441@gmail.com>
Mon, 4 Feb 2013 18:36:44 +0000 (10:36 -0800)
commit53febac02c382fa163a9ad7280fc5f4d2707a665
tree32af700cc40b057271d17f6a89851fa2c614a7b3
parentb4db34cc4c047427a21efb9bde03d7e125f70e55
glsl: Use parse_program_resource_name to parse transform feedback varyings.

Previously, transform feedback varyings were parsed in an ad-hoc
fashion that wasn't compatible with structs (or array of structs).
This patch makes it use parse_program_resource_name(), which correctly
handles both.

Note that parse_program_resource_name()'s technique for handling
mal-formed input strings is to simply let them through and rely on the
fact that a future name lookup will fail.  Because of this,
tfeedback_decl::init() no longer needs to return a boolean error
code--it always succeeds, and if the input was mal-formed the error
will be detected later.

NOTE: This is a candidate for the 9.1 branch.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/glsl/link_varyings.cpp
src/glsl/link_varyings.h