Fixes crash with mediump lowering in:
dEQP-GLES2.functional.shaders.loops.do_while_constant_iterations.basic_mediump_float_fragment
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5746>
case GLSL_TYPE_INT:
iter = new(mem_ctx) ir_constant(iter_value + bias[i]);
break;
+ case GLSL_TYPE_INT16:
+ iter = new(mem_ctx) ir_constant(uint16_t(iter_value + bias[i]));
+ break;
case GLSL_TYPE_UINT:
iter = new(mem_ctx) ir_constant(unsigned(iter_value + bias[i]));
break;
+ case GLSL_TYPE_UINT16:
+ iter = new(mem_ctx) ir_constant(uint16_t(iter_value + bias[i]));
+ break;
case GLSL_TYPE_FLOAT:
iter = new(mem_ctx) ir_constant(float(iter_value + bias[i]));
break;
+ case GLSL_TYPE_FLOAT16:
+ iter = new(mem_ctx) ir_constant(float16_t(float(iter_value + bias[i])));
+ break;
case GLSL_TYPE_DOUBLE:
iter = new(mem_ctx) ir_constant(double(iter_value + bias[i]));
break;