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:
parent
ae9ec54f68
commit
fc2f57ed76
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue