summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2012-05-18 15:01:10 +0200
committerMichel Dänzer <[email protected]>2012-05-18 15:01:10 +0200
commitdd9d6194599e08cc23d3a7cc354cfd0366d2caae (patch)
treeb4fa61a564ec93e16936cccb3d53d028846afedf /src/gallium/drivers
parente8a86d36f3b007ae6fca9353a3a4cda1456ae1d4 (diff)
radeonsi: Fix parameter cache offsets for fragment shader inputs.
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/radeonsi/evergreen_state.c2
-rw-r--r--src/gallium/drivers/radeonsi/radeonsi_pipe.h2
-rw-r--r--src/gallium/drivers/radeonsi/radeonsi_shader.c2
3 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/evergreen_state.c b/src/gallium/drivers/radeonsi/evergreen_state.c
index f943f088cd0..c7bd6c1fe25 100644
--- a/src/gallium/drivers/radeonsi/evergreen_state.c
+++ b/src/gallium/drivers/radeonsi/evergreen_state.c
@@ -2238,7 +2238,7 @@ void si_update_spi_map(struct r600_context *rctx)
for (j = 0; j < vs->noutput; j++) {
if (ps->input[i].name == vs->output[j].name &&
ps->input[i].sid == vs->output[j].sid) {
- tmp |= S_028644_OFFSET(ps->input[i].sid);
+ tmp |= S_028644_OFFSET(vs->output[j].param_offset);
break;
}
}
diff --git a/src/gallium/drivers/radeonsi/radeonsi_pipe.h b/src/gallium/drivers/radeonsi/radeonsi_pipe.h
index 366dd0c51fd..7d6b13a4683 100644
--- a/src/gallium/drivers/radeonsi/radeonsi_pipe.h
+++ b/src/gallium/drivers/radeonsi/radeonsi_pipe.h
@@ -170,9 +170,9 @@ struct r600_shader_io {
unsigned gpr;
unsigned done;
int sid;
+ unsigned param_offset;
unsigned interpolate;
boolean centroid;
- unsigned lds_pos; /* for evergreen */
};
struct r600_shader {
diff --git a/src/gallium/drivers/radeonsi/radeonsi_shader.c b/src/gallium/drivers/radeonsi/radeonsi_shader.c
index 396b94ad357..e3623e02f4f 100644
--- a/src/gallium/drivers/radeonsi/radeonsi_shader.c
+++ b/src/gallium/drivers/radeonsi/radeonsi_shader.c
@@ -381,6 +381,7 @@ static void si_llvm_emit_epilogue(struct lp_build_tgsi_context * bld_base)
case TGSI_SEMANTIC_COLOR:
if (si_shader_ctx->type == TGSI_PROCESSOR_VERTEX) {
target = V_008DFC_SQ_EXP_PARAM + param_count;
+ shader->output[i].param_offset = param_count;
param_count++;
} else {
target = V_008DFC_SQ_EXP_MRT + color_count;
@@ -389,6 +390,7 @@ static void si_llvm_emit_epilogue(struct lp_build_tgsi_context * bld_base)
break;
case TGSI_SEMANTIC_GENERIC:
target = V_008DFC_SQ_EXP_PARAM + param_count;
+ shader->output[i].param_offset = param_count;
param_count++;
break;
default: