mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
nv50/ir/nir: fix interpolation on explicit operations
Fixes a bunch of interpolate tests in the aosp GLES CTS Signed-off-by: Karol Herbst <kherbst@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5747>
This commit is contained in:
parent
77844690be
commit
5786c63be3
1 changed files with 12 additions and 2 deletions
|
|
@ -1692,11 +1692,21 @@ Converter::visit(nir_intrinsic_instr *insn)
|
|||
|
||||
// see load_barycentric_* handling
|
||||
if (prog->getType() == Program::TYPE_FRAGMENT) {
|
||||
mode = translateInterpMode(&vary, nvirOp);
|
||||
if (op == nir_intrinsic_load_interpolated_input) {
|
||||
ImmediateValue immMode;
|
||||
if (getSrc(&insn->src[0], 1)->getUniqueInsn()->src(0).getImmediate(immMode))
|
||||
mode |= immMode.reg.data.u32;
|
||||
mode = immMode.reg.data.u32;
|
||||
}
|
||||
if (mode == NV50_IR_INTERP_DEFAULT)
|
||||
mode |= translateInterpMode(&vary, nvirOp);
|
||||
else {
|
||||
if (vary.linear) {
|
||||
nvirOp = OP_LINTERP;
|
||||
mode |= NV50_IR_INTERP_LINEAR;
|
||||
} else {
|
||||
nvirOp = OP_PINTERP;
|
||||
mode |= NV50_IR_INTERP_PERSPECTIVE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue