glsl: Add image built-in function generator.
authorFrancisco Jerez <currojerez@riseup.net>
Tue, 26 Nov 2013 04:29:57 +0000 (20:29 -0800)
committerFrancisco Jerez <currojerez@riseup.net>
Wed, 12 Feb 2014 17:44:06 +0000 (18:44 +0100)
commite8dbe430aa77d6a775e087938bd19002f2a39e18
treec028efe3141cf3df85a567791c31a7833bba1419
parent87acc7c650e765751eb787db7d23cc242670c68a
glsl: Add image built-in function generator.

Because of the combinatorial explosion of different image built-ins
with different image dimensionalities and base data types, enumerating
all the 242 possibilities would be annoying and a waste of .text
space.  Instead use a special path in the built-in builder that loops
over all the known image types.

v2: Generate built-ins on GLSL version 4.20 too.  Rename
    '_has_float_data_type' to '_supports_float_data_type'.  Avoid
    duplicating enumeration of image built-ins in create_intrinsics()
    and create_builtins().
v3: Use a more orthodox approach for passing image built-in generator
    parameters.
v4: Cosmetic changes.

Acked-by: Paul Berry <stereotype441@gmail.com>
src/glsl/builtin_functions.cpp