glsl: fix evaluating float16 constant expression matrices
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5746>
This commit is contained in:
@@ -935,6 +935,12 @@ ir_dereference_array::constant_expression_value(void *mem_ctx,
|
|||||||
ir_constant_data data = { { 0 } };
|
ir_constant_data data = { { 0 } };
|
||||||
|
|
||||||
switch (column_type->base_type) {
|
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:
|
case GLSL_TYPE_FLOAT:
|
||||||
for (unsigned i = 0; i < column_type->vector_elements; i++)
|
for (unsigned i = 0; i < column_type->vector_elements; i++)
|
||||||
data.f[i] = array->value.f[mat_idx + i];
|
data.f[i] = array->value.f[mat_idx + i];
|
||||||
|
Reference in New Issue
Block a user