From 82caff5bc3612bb7f8498f8c194256276d9bfe7c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sat, 4 Jul 2020 17:43:50 -0400 Subject: [PATCH] glsl: fix evaluating float16 constant expression matrices Reviewed-by: Alyssa Rosenzweig Part-of: --- src/compiler/glsl/ir_constant_expression.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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]; -- 2.30.2