glsl: Add helper methods to glsl_type for dealing with images.
authorFrancisco Jerez <currojerez@riseup.net>
Mon, 25 Nov 2013 22:03:06 +0000 (14:03 -0800)
committerFrancisco Jerez <currojerez@riseup.net>
Wed, 12 Feb 2014 17:43:37 +0000 (18:43 +0100)
commit107d03a6d5b63687361b2b4d2876ef52b082cbb5
treed324b5e64917a4deb3f282a5112e2205454210fd
parent8a2508ee0726b349318c1e05122edbe5a545480a
glsl: Add helper methods to glsl_type for dealing with images.

Add predicates to query if a GLSL type is or contains an image.
Rename sampler_coordinate_components() to coordinate_components().

v2: Use assert instead of unreachable.
v3: No need to use a separate code-path for images in
    coordinate_components() after merging image and sampler fields in
    the glsl_type structure.

Reviewed-by: Paul Berry <stereotype441@gmail.com>
src/glsl/builtin_functions.cpp
src/glsl/glsl_types.cpp
src/glsl/glsl_types.h
src/glsl/tests/sampler_types_test.cpp