From: Ian Romanick Date: Wed, 20 May 2020 20:39:57 +0000 (-0700) Subject: glsl: Remove integer matrix support from ir_dereference_array::constant_expression_value X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=685e79a64bbd6ead6f21b21ec47f55e06a8ce624;p=mesa.git glsl: Remove integer matrix support from ir_dereference_array::constant_expression_value It looks like this code has existed since day 1, but I have no idea why. There have never been integer matrices in GLSL. Reviewed-by: Timothy Arceri Reviewed-by: Sagar Ghuge Part-of: --- diff --git a/src/compiler/glsl/ir_constant_expression.cpp b/src/compiler/glsl/ir_constant_expression.cpp index 759924ed9e1..33b097aafd4 100644 --- a/src/compiler/glsl/ir_constant_expression.cpp +++ b/src/compiler/glsl/ir_constant_expression.cpp @@ -867,13 +867,6 @@ ir_dereference_array::constant_expression_value(void *mem_ctx, ir_constant_data data = { { 0 } }; switch (column_type->base_type) { - case GLSL_TYPE_UINT: - case GLSL_TYPE_INT: - for (unsigned i = 0; i < column_type->vector_elements; i++) - data.u[i] = array->value.u[mat_idx + i]; - - break; - case GLSL_TYPE_FLOAT: for (unsigned i = 0; i < column_type->vector_elements; i++) data.f[i] = array->value.f[mat_idx + i]; @@ -887,8 +880,7 @@ ir_dereference_array::constant_expression_value(void *mem_ctx, break; default: - assert(!"Should not get here."); - break; + unreachable("Matrix types are either float or double."); } return new(mem_ctx) ir_constant(column_type, &data);