r600: Update GPR count when adding a GDS instruction

CC: mesa-stable

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36554>
(cherry picked from commit db8c3aae8d)
This commit is contained in:
Gert Wollny 2025-08-04 17:04:07 +02:00 committed by Eric Engestrom
parent 410937d8e8
commit 97c81c02cb
2 changed files with 8 additions and 1 deletions

View file

@ -3944,7 +3944,7 @@
"description": "r600: Update GPR count when adding a GDS instruction",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -1584,6 +1584,13 @@ int r600_bytecode_add_gds(struct r600_bytecode *bc, const struct r600_bytecode_g
bc->index_loaded[gds->uav_index_mode - 1]);
}
if (gds->src_gpr >= bc->ngpr) {
bc->ngpr = gds->src_gpr + 1;
}
if (gds->dst_gpr >= bc->ngpr) {
bc->ngpr = gds->dst_gpr + 1;
}
if (bc->cf_last == NULL ||
bc->cf_last->op != CF_OP_GDS ||
bc->force_add_cf) {