spirv: Use bfdot for SpvOpDot with BFloat16

Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34105>
This commit is contained in:
Caio Oliveira 2025-03-18 09:36:55 -07:00 committed by Marge Bot
parent 2807097690
commit e0b195cadb

View file

@ -799,7 +799,9 @@ vtn_handle_alu(struct vtn_builder *b, SpvOp opcode,
}
case SpvOpDot:
dest->def = nir_fdot(&b->nb, src[0], src[1]);
dest->def = glsl_type_is_bfloat_16(dest_type) ?
nir_bfdot(&b->nb, src[0], src[1]) :
nir_fdot(&b->nb, src[0], src[1]);
break;
case SpvOpIAddCarry: