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 <tarceri@itsqueeze.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5135>
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];
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);