diff options
author | Dave Airlie <[email protected]> | 2011-09-15 12:39:26 +0100 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2011-09-16 09:26:57 +0100 |
commit | 2dfabdd0a479a29d23aa6b10a0b6bfeb48e956b2 (patch) | |
tree | 0be0c4bdd32de19fad48405bfc543259f251bd0c /src/gallium | |
parent | 21c5607e64ca4ef68730d8e846d8e7744ecdd024 (diff) |
r600g: take constantly interpolated values into a/c
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 <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/r600/evergreen_state.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c index 0e7e635ce8e..3b7844f0fa4 100644 --- a/src/gallium/drivers/r600/evergreen_state.c +++ b/src/gallium/drivers/r600/evergreen_state.c @@ -2230,9 +2230,7 @@ void evergreen_pipe_shader_ps(struct pipe_context *ctx, struct r600_pipe_shader 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) @@ -2274,6 +2272,9 @@ void evergreen_pipe_shader_ps(struct pipe_context *ctx, struct r600_pipe_shader 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); |