OSDN Git Service

glsl: Make it possible to ignore built-ins when matching signatures.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 24 Jul 2014 21:05:40 +0000 (14:05 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 4 Aug 2014 22:47:06 +0000 (15:47 -0700)
commit21129d4de300f1a934d02e30347c465520afef9e
tree499101703099b43852ce4119507131f9fd95550b
parentf82f2fb3dc770902f1657ab1c22e6004faa3afab
glsl: Make it possible to ignore built-ins when matching signatures.

Historically, we've implemented the rules for overriding built-in
functions by creating multiple ir_functions and relying on the symbol
table to hide the one containing built-in functions.  That works, but
has a few drawbacks, so the next patch will change it.

Instead, we'll have a single ir_function for a particular name, which
will contain both built-in and user-defined signatures.  Passing an
extra parameter to matching_signature makes it easy to ignore built-ins
when they're supposed to be hidden.

I didn't add the parameter to exact_matching_signature since it wasn't
necessary.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 files changed:
src/glsl/ast_function.cpp
src/glsl/builtin_functions.cpp
src/glsl/ir.h
src/glsl/ir_function.cpp
src/glsl/ir_reader.cpp
src/glsl/link_functions.cpp
src/glsl/linker.cpp
src/glsl/lower_packed_varyings.cpp
src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
src/mesa/program/ir_to_mesa.cpp
src/mesa/state_tracker/st_glsl_to_tgsi.cpp