mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 11:28:05 +02:00
swr: color interpolation is also supposed to get perspective division
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Tim Rowley <timothy.o.rowley@intel.com>
This commit is contained in:
parent
7cbfe59cf3
commit
f6f644ea12
1 changed files with 4 additions and 2 deletions
|
|
@ -457,7 +457,8 @@ BuilderSWR::CompileFS(struct swr_context *ctx, swr_jit_fs_key &key)
|
||||||
|
|
||||||
// load/compute w
|
// load/compute w
|
||||||
Value *vw = nullptr, *pAttribs;
|
Value *vw = nullptr, *pAttribs;
|
||||||
if (interpMode == TGSI_INTERPOLATE_PERSPECTIVE) {
|
if (interpMode == TGSI_INTERPOLATE_PERSPECTIVE ||
|
||||||
|
interpMode == TGSI_INTERPOLATE_COLOR) {
|
||||||
pAttribs = pPerspAttribs;
|
pAttribs = pPerspAttribs;
|
||||||
switch (interpLoc) {
|
switch (interpLoc) {
|
||||||
case TGSI_INTERPOLATE_LOC_CENTER:
|
case TGSI_INTERPOLATE_LOC_CENTER:
|
||||||
|
|
@ -596,7 +597,8 @@ BuilderSWR::CompileFS(struct swr_context *ctx, swr_jit_fs_key &key)
|
||||||
Value *interp1 = FMUL(vb, vj);
|
Value *interp1 = FMUL(vb, vj);
|
||||||
interp = FADD(interp, interp1);
|
interp = FADD(interp, interp1);
|
||||||
interp = FADD(interp, vc);
|
interp = FADD(interp, vc);
|
||||||
if (interpMode == TGSI_INTERPOLATE_PERSPECTIVE)
|
if (interpMode == TGSI_INTERPOLATE_PERSPECTIVE ||
|
||||||
|
interpMode == TGSI_INTERPOLATE_COLOR)
|
||||||
interp = FMUL(interp, vw);
|
interp = FMUL(interp, vw);
|
||||||
inputs[attrib][channel] = wrap(interp);
|
inputs[attrib][channel] = wrap(interp);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue