mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
r600_shader.c: check returned value of eg_get_interpolator_index
Like done in another place in that same file. CID 1250588 Signed-off-by: Julien Isorce <jisorce@oblong.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
020b3f0c46
commit
ad13bd2e51
1 changed files with 4 additions and 2 deletions
|
|
@ -1113,7 +1113,8 @@ static int allocate_system_value_inputs(struct r600_shader_ctx *ctx, int gpr_off
|
|||
|
||||
interpolate = ctx->info.input_interpolate[inst->Src[0].Register.Index];
|
||||
k = eg_get_interpolator_index(interpolate, location);
|
||||
ctx->eg_interpolators[k].enabled = true;
|
||||
if (k >= 0)
|
||||
ctx->eg_interpolators[k].enabled = true;
|
||||
}
|
||||
} else if (parse.FullToken.Token.Type == TGSI_TOKEN_TYPE_DECLARATION) {
|
||||
struct tgsi_full_declaration *d = &parse.FullToken.FullDeclaration;
|
||||
|
|
@ -1209,7 +1210,8 @@ static int evergreen_gpr_count(struct r600_shader_ctx *ctx)
|
|||
|
||||
interpolate = ctx->info.input_interpolate[inst->Src[0].Register.Index];
|
||||
k = eg_get_interpolator_index(interpolate, location);
|
||||
ctx->eg_interpolators[k].enabled = true;
|
||||
if (k >= 0)
|
||||
ctx->eg_interpolators[k].enabled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue