mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 20:28:04 +02:00
r600g: fix range handling for tgsi input declarations v2
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
This commit is contained in:
parent
f8502b7e71
commit
7e04227f39
1 changed files with 7 additions and 3 deletions
|
|
@ -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++;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue