libagx: simplify index patch expression

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
This commit is contained in:
Alyssa Rosenzweig 2024-11-04 15:07:36 -04:00 committed by Marge Bot
parent 5e4e8df95a
commit 6030b204d5

View file

@ -305,13 +305,10 @@ PatchIndexValue(private struct CHWTessellator *ctx, int index)
return index + ctx->IndexPatchCtx.insidePointIndexDeltaToRealValue;
}
} else if (ctx->bUsingPatchedIndices2) {
if (index >= ctx->IndexPatchCtx2.baseIndexToInvert) {
if (index == ctx->IndexPatchCtx2.cornerCaseBadValue)
return ctx->IndexPatchCtx2.cornerCaseReplacementValue;
else
return ctx->IndexPatchCtx2.indexInversionEndPoint - index;
} else if (index == ctx->IndexPatchCtx2.cornerCaseBadValue) {
if (index == ctx->IndexPatchCtx2.cornerCaseBadValue) {
return ctx->IndexPatchCtx2.cornerCaseReplacementValue;
} else if (index >= ctx->IndexPatchCtx2.baseIndexToInvert) {
return ctx->IndexPatchCtx2.indexInversionEndPoint - index;
}
}