nir,glsl_to_nir: use nir_fdot()

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8056>
This commit is contained in:
Rhys Perry
2021-01-13 15:11:57 +00:00
committed by Marge Bot
parent f6f9000f84
commit cfc4433015
4 changed files with 6 additions and 21 deletions

View File

@@ -2273,13 +2273,7 @@ nir_visitor::visit(ir_expression *ir)
}
break;
case ir_binop_dot:
switch (ir->operands[0]->type->vector_elements) {
case 2: result = nir_fdot2(&b, srcs[0], srcs[1]); break;
case 3: result = nir_fdot3(&b, srcs[0], srcs[1]); break;
case 4: result = nir_fdot4(&b, srcs[0], srcs[1]); break;
default:
unreachable("not reached");
}
result = nir_fdot(&b, srcs[0], srcs[1]);
break;
case ir_binop_vector_extract: {
result = nir_channel(&b, srcs[0], 0);