From: Marek Olšák Date: Sat, 4 Jul 2020 21:43:50 +0000 (-0400) Subject: glsl: fix evaluating float16 constant expression matrices X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=82caff5bc3612bb7f8498f8c194256276d9bfe7c;p=mesa.git glsl: fix evaluating float16 constant expression matrices Reviewed-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/compiler/glsl/ir_constant_expression.cpp b/src/compiler/glsl/ir_constant_expression.cpp index 595cc821797..855b7884fb7 100644 --- a/src/compiler/glsl/ir_constant_expression.cpp +++ b/src/compiler/glsl/ir_constant_expression.cpp @@ -935,6 +935,12 @@ ir_dereference_array::constant_expression_value(void *mem_ctx, ir_constant_data data = { { 0 } }; switch (column_type->base_type) { + case GLSL_TYPE_FLOAT16: + for (unsigned i = 0; i < column_type->vector_elements; i++) + data.f16[i] = array->value.f16[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];