From: Jason Ekstrand Date: Sat, 5 Sep 2015 01:26:05 +0000 (-0700) Subject: nir/types: Allow single-column matrices X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f3bdb93a8eb5115ec46a43c45c44db57b897ca94;p=mesa.git nir/types: Allow single-column matrices This can sometimes be a convenient way to build vectors. --- diff --git a/src/glsl/nir/nir_types.cpp b/src/glsl/nir/nir_types.cpp index 809a7cff79c..69cfac18587 100644 --- a/src/glsl/nir/nir_types.cpp +++ b/src/glsl/nir/nir_types.cpp @@ -252,7 +252,7 @@ glsl_vector_type(enum glsl_base_type base_type, unsigned components) const glsl_type * glsl_matrix_type(enum glsl_base_type base_type, unsigned rows, unsigned columns) { - assert(rows > 1 && rows <= 4 && columns > 1 && columns <= 4); + assert(rows > 1 && rows <= 4 && columns >= 1 && columns <= 4); return glsl_type::get_instance(base_type, rows, columns); }