diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2016-06-29 15:17:16 -0700 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2016-07-05 17:55:29 -0700 |
commit | 795d8dff89c7e6841f61e3b9851de95765f4d001 (patch) | |
tree | 7c70cf664246ad82caced3afc547eadc3d1038e0 /src/compiler/glsl_types.h | |
parent | 3119871bd9558e5881466b70a4c366d2f83bba82 (diff) | |
download | external_mesa3d-795d8dff89c7e6841f61e3b9851de95765f4d001.zip external_mesa3d-795d8dff89c7e6841f61e3b9851de95765f4d001.tar.gz external_mesa3d-795d8dff89c7e6841f61e3b9851de95765f4d001.tar.bz2 |
glsl: Document and enforce restriction on type values
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/compiler/glsl_types.h')
-rw-r--r-- | src/compiler/glsl_types.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compiler/glsl_types.h b/src/compiler/glsl_types.h index c3a0185..7c4827d 100644 --- a/src/compiler/glsl_types.h +++ b/src/compiler/glsl_types.h @@ -47,6 +47,9 @@ _mesa_glsl_release_types(void); #endif enum glsl_base_type { + /* Note: GLSL_TYPE_UINT, GLSL_TYPE_INT, and GLSL_TYPE_FLOAT must be 0, 1, + * and 2 so that they will fit in the 2 bits of glsl_type::sampled_type. + */ GLSL_TYPE_UINT = 0, GLSL_TYPE_INT, GLSL_TYPE_FLOAT, |