nv50/ir/nir: convert 8/16 bit src to 32 bit for {i,u}2f64
Converting signed and unsigned integers from 8/16 bit sources to a 64 bit floating point destination (i2f64 / u2f64) isn't possible, hence convert the source to 32 bit first. Reviewed-by: Karol Herbst <kherbst@redhat.com> Signed-off-by: Danilo Krummrich <dakr@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18109>
This commit is contained in:
@@ -3291,6 +3291,15 @@ Converter::lowerBitSizeCB(const nir_instr *instr, void *data)
|
||||
|
||||
return 0;
|
||||
}
|
||||
case nir_op_i2f64:
|
||||
case nir_op_u2f64: {
|
||||
DataType stype = instance->getSTypes(alu)[0];
|
||||
|
||||
if (isIntType(stype) && (typeSizeof(stype) <= 2))
|
||||
return 32;
|
||||
|
||||
return 0;
|
||||
}
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user