We could constant interpolated values now and set have_perspective
if nothing else is set to avoid a GPU hang.
Signed-off-by: Dave Airlie <airlied@redhat.com>
else if (rshader->input[i].name == TGSI_SEMANTIC_FACE)
face_index = i;
else {
- if (rshader->input[i].interpolate == TGSI_INTERPOLATE_LINEAR ||
- rshader->input[i].interpolate == TGSI_INTERPOLATE_PERSPECTIVE)
- ninterp++;
+ ninterp++;
if (rshader->input[i].interpolate == TGSI_INTERPOLATE_LINEAR)
have_linear = TRUE;
if (rshader->input[i].interpolate == TGSI_INTERPOLATE_PERSPECTIVE)
have_perspective = TRUE;
}
+ if (!have_perspective && !have_linear)
+ have_perspective = TRUE;
+
spi_ps_in_control_0 = S_0286CC_NUM_INTERP(ninterp) |
S_0286CC_PERSP_GRADIENT_ENA(have_perspective) |
S_0286CC_LINEAR_GRADIENT_ENA(have_linear);