Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
vector_elements(vector_elements), matrix_columns(matrix_columns),
length(0)
{
+ /* Values of these types must fit in the two bits of
+ * glsl_type::sampled_type.
+ */
+ STATIC_ASSERT((unsigned(GLSL_TYPE_UINT) & 3) == unsigned(GLSL_TYPE_UINT));
+ STATIC_ASSERT((unsigned(GLSL_TYPE_INT) & 3) == unsigned(GLSL_TYPE_INT));
+ STATIC_ASSERT((unsigned(GLSL_TYPE_FLOAT) & 3) == unsigned(GLSL_TYPE_FLOAT));
+
mtx_lock(&glsl_type::mutex);
init_ralloc_type_ctx();
#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,