mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 02:10:11 +01:00
pan/bi: Add one-source f32->f16 op
This really has a second op for vectorization but we don't handle this quite yet... Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4382>
This commit is contained in:
parent
197c6414ea
commit
2fd8b2e6d4
1 changed files with 8 additions and 1 deletions
|
|
@ -642,7 +642,14 @@ bi_pack_fma_convert(bi_instruction *ins, struct bi_registers *regs)
|
|||
}
|
||||
} else if (from_size == 32 && to_size == 16) {
|
||||
if (from_base == nir_type_float) {
|
||||
/* float32_to_float16 */
|
||||
/* TODO: second vectorized source? */
|
||||
struct bifrost_fma_2src pack = {
|
||||
.src0 = bi_get_src(ins, regs, 0, true),
|
||||
.src1 = BIFROST_SRC_STAGE, /* 0 */
|
||||
.op = BIFROST_FMA_FLOAT32_TO_16
|
||||
};
|
||||
|
||||
RETURN_PACKED(pack);
|
||||
} else {
|
||||
/* XXX: No int32_to_int16? */
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue