From f3bdb93a8eb5115ec46a43c45c44db57b897ca94 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Fri, 4 Sep 2015 18:26:05 -0700 Subject: [PATCH] nir/types: Allow single-column matrices This can sometimes be a convenient way to build vectors. --- src/glsl/nir/nir_types.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- 2.30.2