Mesa (master): pan/bi: Fix off-by-one in RA
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Nov 25 13:26:48 UTC 2020
Module: Mesa
Branch: master
Commit: b9121624fc6d59ceef5685dfdd54331b68d52005
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b9121624fc6d59ceef5685dfdd54331b68d52005
Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date: Tue Nov 24 13:56:52 2020 -0500
pan/bi: Fix off-by-one in RA
Could result in trying to allocate R64 which is clearly wrong.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7615>
---
src/panfrost/bifrost/bi_ra.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/panfrost/bifrost/bi_ra.c b/src/panfrost/bifrost/bi_ra.c
index 3d82edcf094..e605e1d5e7b 100644
--- a/src/panfrost/bifrost/bi_ra.c
+++ b/src/panfrost/bifrost/bi_ra.c
@@ -76,7 +76,7 @@ bi_allocate_registers(bi_context *ctx, bool *success)
} else {
/* R0 - R63, all 32-bit */
l->class_start[BI_REG_CLASS_WORK] = 0;
- l->class_size[BI_REG_CLASS_WORK] = 64 * 4;
+ l->class_size[BI_REG_CLASS_WORK] = 63 * 4;
}
bi_foreach_instr_global(ctx, ins) {
More information about the mesa-commit
mailing list