From 795d8dff89c7e6841f61e3b9851de95765f4d001 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Wed, 29 Jun 2016 15:17:16 -0700 Subject: glsl: Document and enforce restriction on type values Signed-off-by: Ian Romanick Reviewed-by: Dave Airlie --- src/compiler/glsl_types.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/compiler/glsl_types.h') 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, -- cgit v1.1