mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
draw: Fix build after TGSI declaration interface changes.
This commit is contained in:
parent
4e33edfd06
commit
c2ff3a66a1
3 changed files with 43 additions and 46 deletions
|
|
@ -141,18 +141,18 @@ aa_transform_decl(struct tgsi_transform_context *ctx,
|
|||
if (decl->Declaration.File == TGSI_FILE_OUTPUT &&
|
||||
decl->Semantic.SemanticName == TGSI_SEMANTIC_COLOR &&
|
||||
decl->Semantic.SemanticIndex == 0) {
|
||||
aactx->colorOutput = decl->u.DeclarationRange.First;
|
||||
aactx->colorOutput = decl->DeclarationRange.First;
|
||||
}
|
||||
else if (decl->Declaration.File == TGSI_FILE_SAMPLER) {
|
||||
uint i;
|
||||
for (i = decl->u.DeclarationRange.First;
|
||||
i <= decl->u.DeclarationRange.Last; i++) {
|
||||
for (i = decl->DeclarationRange.First;
|
||||
i <= decl->DeclarationRange.Last; i++) {
|
||||
aactx->samplersUsed |= 1 << i;
|
||||
}
|
||||
}
|
||||
else if (decl->Declaration.File == TGSI_FILE_INPUT) {
|
||||
if ((int) decl->u.DeclarationRange.Last > aactx->maxInput)
|
||||
aactx->maxInput = decl->u.DeclarationRange.Last;
|
||||
if ((int) decl->DeclarationRange.Last > aactx->maxInput)
|
||||
aactx->maxInput = decl->DeclarationRange.Last;
|
||||
if (decl->Semantic.SemanticName == TGSI_SEMANTIC_GENERIC &&
|
||||
(int) decl->Semantic.SemanticIndex > aactx->maxGeneric) {
|
||||
aactx->maxGeneric = decl->Semantic.SemanticIndex;
|
||||
|
|
@ -160,8 +160,8 @@ aa_transform_decl(struct tgsi_transform_context *ctx,
|
|||
}
|
||||
else if (decl->Declaration.File == TGSI_FILE_TEMPORARY) {
|
||||
uint i;
|
||||
for (i = decl->u.DeclarationRange.First;
|
||||
i <= decl->u.DeclarationRange.Last; i++) {
|
||||
for (i = decl->DeclarationRange.First;
|
||||
i <= decl->DeclarationRange.Last; i++) {
|
||||
aactx->tempsUsed |= (1 << i);
|
||||
}
|
||||
}
|
||||
|
|
@ -225,34 +225,33 @@ aa_transform_inst(struct tgsi_transform_context *ctx,
|
|||
/* declare new generic input/texcoord */
|
||||
decl = tgsi_default_full_declaration();
|
||||
decl.Declaration.File = TGSI_FILE_INPUT;
|
||||
/* XXX this could be linear... */
|
||||
decl.Declaration.Interpolate = TGSI_INTERPOLATE_PERSPECTIVE;
|
||||
decl.Declaration.Semantic = 1;
|
||||
decl.Semantic.SemanticName = TGSI_SEMANTIC_GENERIC;
|
||||
decl.Semantic.SemanticIndex = aactx->maxGeneric + 1;
|
||||
decl.Declaration.Interpolate = 1;
|
||||
/* XXX this could be linear... */
|
||||
decl.Interpolation.Interpolate = TGSI_INTERPOLATE_PERSPECTIVE;
|
||||
decl.u.DeclarationRange.First =
|
||||
decl.u.DeclarationRange.Last = aactx->maxInput + 1;
|
||||
decl.DeclarationRange.First =
|
||||
decl.DeclarationRange.Last = aactx->maxInput + 1;
|
||||
ctx->emit_declaration(ctx, &decl);
|
||||
|
||||
/* declare new sampler */
|
||||
decl = tgsi_default_full_declaration();
|
||||
decl.Declaration.File = TGSI_FILE_SAMPLER;
|
||||
decl.u.DeclarationRange.First =
|
||||
decl.u.DeclarationRange.Last = aactx->freeSampler;
|
||||
decl.DeclarationRange.First =
|
||||
decl.DeclarationRange.Last = aactx->freeSampler;
|
||||
ctx->emit_declaration(ctx, &decl);
|
||||
|
||||
/* declare new temp regs */
|
||||
decl = tgsi_default_full_declaration();
|
||||
decl.Declaration.File = TGSI_FILE_TEMPORARY;
|
||||
decl.u.DeclarationRange.First =
|
||||
decl.u.DeclarationRange.Last = aactx->texTemp;
|
||||
decl.DeclarationRange.First =
|
||||
decl.DeclarationRange.Last = aactx->texTemp;
|
||||
ctx->emit_declaration(ctx, &decl);
|
||||
|
||||
decl = tgsi_default_full_declaration();
|
||||
decl.Declaration.File = TGSI_FILE_TEMPORARY;
|
||||
decl.u.DeclarationRange.First =
|
||||
decl.u.DeclarationRange.Last = aactx->colorTemp;
|
||||
decl.DeclarationRange.First =
|
||||
decl.DeclarationRange.Last = aactx->colorTemp;
|
||||
ctx->emit_declaration(ctx, &decl);
|
||||
|
||||
aactx->firstInstruction = FALSE;
|
||||
|
|
|
|||
|
|
@ -131,11 +131,11 @@ aa_transform_decl(struct tgsi_transform_context *ctx,
|
|||
if (decl->Declaration.File == TGSI_FILE_OUTPUT &&
|
||||
decl->Semantic.SemanticName == TGSI_SEMANTIC_COLOR &&
|
||||
decl->Semantic.SemanticIndex == 0) {
|
||||
aactx->colorOutput = decl->u.DeclarationRange.First;
|
||||
aactx->colorOutput = decl->DeclarationRange.First;
|
||||
}
|
||||
else if (decl->Declaration.File == TGSI_FILE_INPUT) {
|
||||
if ((int) decl->u.DeclarationRange.Last > aactx->maxInput)
|
||||
aactx->maxInput = decl->u.DeclarationRange.Last;
|
||||
if ((int) decl->DeclarationRange.Last > aactx->maxInput)
|
||||
aactx->maxInput = decl->DeclarationRange.Last;
|
||||
if (decl->Semantic.SemanticName == TGSI_SEMANTIC_GENERIC &&
|
||||
(int) decl->Semantic.SemanticIndex > aactx->maxGeneric) {
|
||||
aactx->maxGeneric = decl->Semantic.SemanticIndex;
|
||||
|
|
@ -143,8 +143,8 @@ aa_transform_decl(struct tgsi_transform_context *ctx,
|
|||
}
|
||||
else if (decl->Declaration.File == TGSI_FILE_TEMPORARY) {
|
||||
uint i;
|
||||
for (i = decl->u.DeclarationRange.First;
|
||||
i <= decl->u.DeclarationRange.Last; i++) {
|
||||
for (i = decl->DeclarationRange.First;
|
||||
i <= decl->DeclarationRange.Last; i++) {
|
||||
aactx->tempsUsed |= (1 << i);
|
||||
}
|
||||
}
|
||||
|
|
@ -193,27 +193,26 @@ aa_transform_inst(struct tgsi_transform_context *ctx,
|
|||
/* declare new generic input/texcoord */
|
||||
decl = tgsi_default_full_declaration();
|
||||
decl.Declaration.File = TGSI_FILE_INPUT;
|
||||
/* XXX this could be linear... */
|
||||
decl.Declaration.Interpolate = TGSI_INTERPOLATE_PERSPECTIVE;
|
||||
decl.Declaration.Semantic = 1;
|
||||
decl.Semantic.SemanticName = TGSI_SEMANTIC_GENERIC;
|
||||
decl.Semantic.SemanticIndex = aactx->maxGeneric + 1;
|
||||
decl.Declaration.Interpolate = 1;
|
||||
/* XXX this could be linear... */
|
||||
decl.Interpolation.Interpolate = TGSI_INTERPOLATE_PERSPECTIVE;
|
||||
decl.u.DeclarationRange.First =
|
||||
decl.u.DeclarationRange.Last = texInput;
|
||||
decl.DeclarationRange.First =
|
||||
decl.DeclarationRange.Last = texInput;
|
||||
ctx->emit_declaration(ctx, &decl);
|
||||
|
||||
/* declare new temp regs */
|
||||
decl = tgsi_default_full_declaration();
|
||||
decl.Declaration.File = TGSI_FILE_TEMPORARY;
|
||||
decl.u.DeclarationRange.First =
|
||||
decl.u.DeclarationRange.Last = tmp0;
|
||||
decl.DeclarationRange.First =
|
||||
decl.DeclarationRange.Last = tmp0;
|
||||
ctx->emit_declaration(ctx, &decl);
|
||||
|
||||
decl = tgsi_default_full_declaration();
|
||||
decl.Declaration.File = TGSI_FILE_TEMPORARY;
|
||||
decl.u.DeclarationRange.First =
|
||||
decl.u.DeclarationRange.Last = aactx->colorTemp;
|
||||
decl.DeclarationRange.First =
|
||||
decl.DeclarationRange.Last = aactx->colorTemp;
|
||||
ctx->emit_declaration(ctx, &decl);
|
||||
|
||||
aactx->firstInstruction = FALSE;
|
||||
|
|
|
|||
|
|
@ -132,20 +132,20 @@ pstip_transform_decl(struct tgsi_transform_context *ctx,
|
|||
|
||||
if (decl->Declaration.File == TGSI_FILE_SAMPLER) {
|
||||
uint i;
|
||||
for (i = decl->u.DeclarationRange.First;
|
||||
i <= decl->u.DeclarationRange.Last; i++) {
|
||||
for (i = decl->DeclarationRange.First;
|
||||
i <= decl->DeclarationRange.Last; i++) {
|
||||
pctx->samplersUsed |= 1 << i;
|
||||
}
|
||||
}
|
||||
else if (decl->Declaration.File == TGSI_FILE_INPUT) {
|
||||
pctx->maxInput = MAX2(pctx->maxInput, (int) decl->u.DeclarationRange.Last);
|
||||
pctx->maxInput = MAX2(pctx->maxInput, (int) decl->DeclarationRange.Last);
|
||||
if (decl->Semantic.SemanticName == TGSI_SEMANTIC_POSITION)
|
||||
pctx->wincoordInput = (int) decl->u.DeclarationRange.First;
|
||||
pctx->wincoordInput = (int) decl->DeclarationRange.First;
|
||||
}
|
||||
else if (decl->Declaration.File == TGSI_FILE_TEMPORARY) {
|
||||
uint i;
|
||||
for (i = decl->u.DeclarationRange.First;
|
||||
i <= decl->u.DeclarationRange.Last; i++) {
|
||||
for (i = decl->DeclarationRange.First;
|
||||
i <= decl->DeclarationRange.Last; i++) {
|
||||
pctx->tempsUsed |= (1 << i);
|
||||
}
|
||||
}
|
||||
|
|
@ -223,28 +223,27 @@ pstip_transform_inst(struct tgsi_transform_context *ctx,
|
|||
/* declare new position input reg */
|
||||
decl = tgsi_default_full_declaration();
|
||||
decl.Declaration.File = TGSI_FILE_INPUT;
|
||||
decl.Declaration.Interpolate = TGSI_INTERPOLATE_LINEAR; /* XXX? */
|
||||
decl.Declaration.Semantic = 1;
|
||||
decl.Semantic.SemanticName = TGSI_SEMANTIC_POSITION;
|
||||
decl.Semantic.SemanticIndex = 0;
|
||||
decl.Declaration.Interpolate = 1;
|
||||
decl.Interpolation.Interpolate = TGSI_INTERPOLATE_LINEAR; /* XXX? */
|
||||
decl.u.DeclarationRange.First =
|
||||
decl.u.DeclarationRange.Last = wincoordInput;
|
||||
decl.DeclarationRange.First =
|
||||
decl.DeclarationRange.Last = wincoordInput;
|
||||
ctx->emit_declaration(ctx, &decl);
|
||||
}
|
||||
|
||||
/* declare new sampler */
|
||||
decl = tgsi_default_full_declaration();
|
||||
decl.Declaration.File = TGSI_FILE_SAMPLER;
|
||||
decl.u.DeclarationRange.First =
|
||||
decl.u.DeclarationRange.Last = pctx->freeSampler;
|
||||
decl.DeclarationRange.First =
|
||||
decl.DeclarationRange.Last = pctx->freeSampler;
|
||||
ctx->emit_declaration(ctx, &decl);
|
||||
|
||||
/* declare new temp regs */
|
||||
decl = tgsi_default_full_declaration();
|
||||
decl.Declaration.File = TGSI_FILE_TEMPORARY;
|
||||
decl.u.DeclarationRange.First =
|
||||
decl.u.DeclarationRange.Last = pctx->texTemp;
|
||||
decl.DeclarationRange.First =
|
||||
decl.DeclarationRange.Last = pctx->texTemp;
|
||||
ctx->emit_declaration(ctx, &decl);
|
||||
|
||||
/* emit immediate = {1/32, 1/32, 1, 1}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue