summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2012-04-18 10:44:03 +0200
committerMichel Dänzer <[email protected]>2012-04-18 10:53:59 +0200
commit0ef90e52d1c1898ae1e4618536a85622689c0b19 (patch)
treec723b15261b28a70be4bf6ba11124a83b5376929 /src/gallium/drivers
parentbb7912642030756946e0028c381ef0a55b52ecca (diff)
radeonsi: Improve calculation of number of pixel shader interpolants.
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/radeonsi/evergreen_state.c30
1 files changed, 7 insertions, 23 deletions
diff --git a/src/gallium/drivers/radeonsi/evergreen_state.c b/src/gallium/drivers/radeonsi/evergreen_state.c
index 5048761fc7f..99cbbed5abc 100644
--- a/src/gallium/drivers/radeonsi/evergreen_state.c
+++ b/src/gallium/drivers/radeonsi/evergreen_state.c
@@ -1922,21 +1922,13 @@ void si_pipe_shader_ps(struct pipe_context *ctx, struct si_pipe_shader *shader)
db_shader_control = S_02880C_Z_ORDER(V_02880C_EARLY_Z_THEN_LATE_Z);
for (i = 0; i < rshader->ninput; i++) {
- /* evergreen NUM_INTERP only contains values interpolated into the LDS,
- POSITION goes via GPRs from the SC so isn't counted */
- if (rshader->input[i].name == TGSI_SEMANTIC_POSITION)
- pos_index = i;
- else if (rshader->input[i].name == TGSI_SEMANTIC_FACE)
- face_index = i;
- else {
- ninterp++;
- if (rshader->input[i].interpolate == TGSI_INTERPOLATE_LINEAR)
- have_linear = TRUE;
- if (rshader->input[i].interpolate == TGSI_INTERPOLATE_PERSPECTIVE)
- have_perspective = TRUE;
- if (rshader->input[i].centroid)
- have_centroid = TRUE;
- }
+ ninterp++;
+ if (rshader->input[i].interpolate == TGSI_INTERPOLATE_LINEAR)
+ have_linear = TRUE;
+ if (rshader->input[i].interpolate == TGSI_INTERPOLATE_PERSPECTIVE)
+ have_perspective = TRUE;
+ if (rshader->input[i].centroid)
+ have_centroid = TRUE;
}
for (i = 0; i < rshader->noutput; i++) {
@@ -1966,14 +1958,6 @@ void si_pipe_shader_ps(struct pipe_context *ctx, struct si_pipe_shader *shader)
exports_ps = 2;
}
- if (ninterp == 0) {
- ninterp = 1;
- have_perspective = TRUE;
- }
-
- if (!have_perspective && !have_linear)
- have_perspective = TRUE;
-
spi_ps_in_control = S_0286D8_NUM_INTERP(ninterp);
spi_baryc_cntl = 0;