aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2011-10-02 01:55:58 +0200
committerMarek Olšák <[email protected]>2011-10-04 04:22:22 +0200
commit024ac93e60921295ee7a49de1782eeaffd597fa0 (patch)
treeb67c3e16481771a782c023ade36dc7de222062d8 /src
parent5f4f07f4eaeb5a4a39a6567a92b1b42604d398c4 (diff)
r600g: fix parsing TGSI declarations
It was a lucky coincidence that it worked.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/r600/r600_shader.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c
index 39b48c4167b..12803559472 100644
--- a/src/gallium/drivers/r600/r600_shader.c
+++ b/src/gallium/drivers/r600/r600_shader.c
@@ -339,7 +339,7 @@ static int tgsi_declaration(struct r600_shader_ctx *ctx)
ctx->shader->input[i].sid = d->Semantic.Index;
ctx->shader->input[i].interpolate = d->Declaration.Interpolate;
ctx->shader->input[i].centroid = d->Declaration.Centroid;
- ctx->shader->input[i].gpr = ctx->file_offset[TGSI_FILE_INPUT] + i;
+ ctx->shader->input[i].gpr = ctx->file_offset[TGSI_FILE_INPUT] + d->Range.First;
if (ctx->type == TGSI_PROCESSOR_FRAGMENT && ctx->bc->chip_class >= EVERGREEN) {
/* turn input into interpolate on EG */
if (ctx->shader->input[i].name != TGSI_SEMANTIC_POSITION &&
@@ -357,7 +357,7 @@ static int tgsi_declaration(struct r600_shader_ctx *ctx)
i = ctx->shader->noutput++;
ctx->shader->output[i].name = d->Semantic.Name;
ctx->shader->output[i].sid = d->Semantic.Index;
- ctx->shader->output[i].gpr = ctx->file_offset[TGSI_FILE_OUTPUT] + i;
+ ctx->shader->output[i].gpr = ctx->file_offset[TGSI_FILE_OUTPUT] + d->Range.First;
ctx->shader->output[i].interpolate = d->Declaration.Interpolate;
if (ctx->type == TGSI_PROCESSOR_VERTEX) {
/* these don't count as vertex param exports */