llvmpipe: minor optimization in lp_linear_init_interp()

Skip multiplying by 1/w when it's 1.0.

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>
This commit is contained in:
Brian Paul 2022-06-22 12:29:24 -06:00 committed by Marge Bot
parent ae9ec54f68
commit fc2f57ed76
1 changed files with 1 additions and 1 deletions

View File

@ -141,7 +141,7 @@ lp_linear_init_interp(struct lp_linear_interp *interp,
memset(dsdx_fp, 0, sizeof(dsdx_fp));
memset(dsdy_fp, 0, sizeof(dsdy_fp));
if (perspective) {
if (perspective && oow != 1.0f) {
for (unsigned j = 0; j < 4; j++) {
if (usage_mask & (1<<j)) {
s0[j] = a0[j] * oow;