diff options
Diffstat (limited to 'glsl_types.cpp')
-rw-r--r-- | glsl_types.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/glsl_types.cpp b/glsl_types.cpp index 55d960320d..df9667f8dc 100644 --- a/glsl_types.cpp +++ b/glsl_types.cpp @@ -489,10 +489,12 @@ _mesa_glsl_initialize_constructors(exec_list *instructions, const glsl_type * glsl_type::get_instance(unsigned base_type, unsigned rows, unsigned columns) { + if (base_type == GLSL_TYPE_VOID) + return &void_type; + if ((rows < 1) || (rows > 4) || (columns < 1) || (columns > 4)) return error_type; - /* Treat GLSL vectors as Nx1 matrices. */ if (columns == 1) { |