unsigned mask : 4; /* vec4 mask */
unsigned linear : 1; /* linearly interpolated if true (and not flat) */
unsigned flat : 1;
+ unsigned sc : 1; /* special colour interpolation mode (SHADE_MODEL) */
unsigned centroid : 1;
unsigned patch : 1; /* patch constant value */
unsigned regular : 1; /* driver-specific meaning (e.g. input in sreg) */
case TGSI_INTERPOLATE_CONSTANT:
info->in[i].flat = 1;
break;
+ case TGSI_INTERPOLATE_COLOR:
+ info->in[i].sc = 1;
+ break;
case TGSI_INTERPOLATE_LINEAR:
- if (sn != TGSI_SEMANTIC_COLOR) // GL_NICEST
- info->in[i].linear = 1;
+ info->in[i].linear = 1;
break;
default:
break;
static inline uint8_t
translateInterpMode(const struct nv50_ir_varying *var, operation& op)
{
- uint8_t mode;
+ uint8_t mode = NV50_IR_INTERP_PERSPECTIVE;
if (var->flat)
mode = NV50_IR_INTERP_FLAT;
if (var->linear)
mode = NV50_IR_INTERP_LINEAR;
else
- mode = NV50_IR_INTERP_PERSPECTIVE;
+ if (var->sc)
+ mode = NV50_IR_INTERP_SC;
- op = (mode == NV50_IR_INTERP_PERSPECTIVE) ? OP_PINTERP : OP_LINTERP;
+ op = (mode == NV50_IR_INTERP_PERSPECTIVE || mode == NV50_IR_INTERP_SC)
+ ? OP_PINTERP : OP_LINTERP;
if (var->centroid)
mode |= NV50_IR_INTERP_CENTROID;
assert(prog->getType() != Program::TYPE_FRAGMENT);
}
break;
- case OP_PINTERP:
- if (i->getSrc(0)->reg.data.offset >= 0x280 &&
- i->getSrc(0)->reg.data.offset < 0x2c0)
- i->setInterpolate(i->getSampleMode() | NV50_IR_INTERP_SC);
- break;
default:
break;
}