diff options
author | Marek Olšák <[email protected]> | 2020-07-04 17:43:50 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2020-07-07 22:02:06 -0400 |
commit | 82caff5bc3612bb7f8498f8c194256276d9bfe7c (patch) | |
tree | 20dd20d69b34c866fbf195842c4298b5f195d4dc | |
parent | 50c27a0a1701005ab514d8c110241e01420b92a6 (diff) |
glsl: fix evaluating float16 constant expression matrices
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5746>
-rw-r--r-- | src/compiler/glsl/ir_constant_expression.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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]; |