diff options
author | Vadim Girlin <[email protected]> | 2013-04-02 19:32:26 +0400 |
---|---|---|
committer | Vadim Girlin <[email protected]> | 2013-04-02 19:34:14 +0400 |
commit | 7e04227f3967fd4c4dd7a088cb42197d916925a5 (patch) | |
tree | b4568e15515ba11fe72c086c17fed6d69bf2c33c /src | |
parent | f8502b7e719ca62930b90192fadfe696ebf3cd97 (diff) |
r600g: fix range handling for tgsi input declarations v2
Signed-off-by: Vadim Girlin <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/r600/r600_shader.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c index 57cf17b1734..e74ed54443d 100644 --- a/src/gallium/drivers/r600/r600_shader.c +++ b/src/gallium/drivers/r600/r600_shader.c @@ -893,12 +893,12 @@ static int select_twoside_color(struct r600_shader_ctx *ctx, int front, int back static int tgsi_declaration(struct r600_shader_ctx *ctx) { struct tgsi_full_declaration *d = &ctx->parse.FullToken.FullDeclaration; - unsigned i; - int r; + int r, i, j, count = d->Range.Last - d->Range.First + 1; switch (d->Declaration.File) { case TGSI_FILE_INPUT: - i = ctx->shader->ninput++; + i = ctx->shader->ninput; + ctx->shader->ninput += count; ctx->shader->input[i].name = d->Semantic.Name; ctx->shader->input[i].sid = d->Semantic.Index; ctx->shader->input[i].interpolate = d->Interp.Interpolate; @@ -922,6 +922,10 @@ static int tgsi_declaration(struct r600_shader_ctx *ctx) return r; } } + for (j = 1; j < count; ++j) { + ctx->shader->input[i + j] = ctx->shader->input[i]; + ctx->shader->input[i + j].gpr += j; + } break; case TGSI_FILE_OUTPUT: i = ctx->shader->noutput++; |