diff options
author | Carl Worth <cworth@cworth.org> | 2014-10-22 16:58:26 -0700 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2015-01-16 13:47:40 -0800 |
commit | f87ffd5cc32dbfaff0a110fd7a94a92866c95f3b (patch) | |
tree | f3a61cc03c18153e2a3de143ba7cb7b83a2baac5 /src/glsl/glsl_types.h | |
parent | 127c9724924f9d93652540a9f3ff8306bb1aacd4 (diff) | |
download | external_mesa3d-f87ffd5cc32dbfaff0a110fd7a94a92866c95f3b.zip external_mesa3d-f87ffd5cc32dbfaff0a110fd7a94a92866c95f3b.tar.gz external_mesa3d-f87ffd5cc32dbfaff0a110fd7a94a92866c95f3b.tar.bz2 |
glsl: Add convenience function get_sampler_instance
This is similar to the existing functions get_instance,
get_array_instance, etc. for getting a type singleton. The new
get_sampler_instance() function will be used by the upcoming shader
cache.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'src/glsl/glsl_types.h')
-rw-r--r-- | src/glsl/glsl_types.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/glsl/glsl_types.h b/src/glsl/glsl_types.h index 474b129..441015c 100644 --- a/src/glsl/glsl_types.h +++ b/src/glsl/glsl_types.h @@ -244,6 +244,15 @@ struct glsl_type { unsigned columns); /** + * Get the instance of a sampler type + */ + static const glsl_type *get_sampler_instance(enum glsl_sampler_dim dim, + bool shadow, + bool array, + glsl_base_type type); + + + /** * Get the instance of an array type */ static const glsl_type *get_array_instance(const glsl_type *base, |