diff options
author | Francisco Jerez <currojerez@riseup.net> | 2013-11-25 13:50:47 -0800 |
---|---|---|
committer | Francisco Jerez <currojerez@riseup.net> | 2014-02-12 18:39:48 +0100 |
commit | 8a2508ee0726b349318c1e05122edbe5a545480a (patch) | |
tree | ca1edcc3a8600433286fdfb2d212af7bdf5823ec /src/glsl/glsl_types.h | |
parent | 9e611fc72dc80abd7bc1fec7863eb1fccb833930 (diff) | |
download | external_mesa3d-8a2508ee0726b349318c1e05122edbe5a545480a.zip external_mesa3d-8a2508ee0726b349318c1e05122edbe5a545480a.tar.gz external_mesa3d-8a2508ee0726b349318c1e05122edbe5a545480a.tar.bz2 |
glsl: Add image type to the GLSL IR.
v2: Reuse the glsl_sampler_dim enum for images. Reuse the
glsl_type::sampler_* fields instead of creating new ones specific
to image types. Reuse the same constructor as for samplers adding
a new 'base_type' argument.
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Diffstat (limited to 'src/glsl/glsl_types.h')
-rw-r--r-- | src/glsl/glsl_types.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/glsl/glsl_types.h b/src/glsl/glsl_types.h index f88758a..6b38e09 100644 --- a/src/glsl/glsl_types.h +++ b/src/glsl/glsl_types.h @@ -53,6 +53,7 @@ enum glsl_base_type { GLSL_TYPE_FLOAT, GLSL_TYPE_BOOL, GLSL_TYPE_SAMPLER, + GLSL_TYPE_IMAGE, GLSL_TYPE_ATOMIC_UINT, GLSL_TYPE_STRUCT, GLSL_TYPE_INTERFACE, @@ -89,8 +90,9 @@ struct glsl_type { unsigned sampler_dimensionality:3; /**< \see glsl_sampler_dim */ unsigned sampler_shadow:1; unsigned sampler_array:1; - unsigned sampler_type:2; /**< Type of data returned using this sampler. - * only \c GLSL_TYPE_FLOAT, \c GLSL_TYPE_INT, + unsigned sampler_type:2; /**< Type of data returned using this + * sampler or image. Only \c + * GLSL_TYPE_FLOAT, \c GLSL_TYPE_INT, * and \c GLSL_TYPE_UINT are valid. */ unsigned interface_packing:2; @@ -564,8 +566,8 @@ private: glsl_base_type base_type, unsigned vector_elements, unsigned matrix_columns, const char *name); - /** Constructor for sampler types */ - glsl_type(GLenum gl_type, + /** Constructor for sampler or image types */ + glsl_type(GLenum gl_type, glsl_base_type base_type, enum glsl_sampler_dim dim, bool shadow, bool array, unsigned type, const char *name); |