--- src/compiler/spirv/vtn_glsl450.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/compiler/spirv/vtn_glsl450.c b/src/compiler/spirv/vtn_glsl450.c index 6fa759b1bba..ffe12a71818 100644 --- a/src/compiler/spirv/vtn_glsl450.c +++ b/src/compiler/spirv/vtn_glsl450.c @@ -540,11 +540,17 @@ handle_glsl450_alu(struct vtn_builder *b, enum GLSLstd450 entrypoint, switch (entrypoint) { case GLSLstd450Radians: - val->ssa->def = nir_fmul(nb, src[0], nir_imm_float(nb, 0.01745329251)); + val->ssa->def = nir_fmul(nb, src[0], + nir_imm_floatN_t(nb, 0.01745329251, + src[0]->bit_size)); return; + case GLSLstd450Degrees: - val->ssa->def = nir_fmul(nb, src[0], nir_imm_float(nb, 57.2957795131)); + val->ssa->def = nir_fmul(nb, src[0], + nir_imm_floatN_t(nb, 57.2957795131, + src[0]->bit_size)); return; + case GLSLstd450Tan: val->ssa->def = nir_fdiv(nb, nir_fsin(nb, src[0]), nir_fcos(nb, src[0])); -- 2.14.1 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev