mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 11:38:05 +02:00
r600: limit loops when trying to merge alu groups
On Cayman bank_swizzle[4] is never counted up, so add an additional condition to make sure the loop is finished at one point. This is a hot-fix, the logic below should be improved. Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Filip Gawin <filip@gawin.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17484>
This commit is contained in:
parent
6165701b2e
commit
8222840e3f
1 changed files with 2 additions and 1 deletions
|
|
@ -593,6 +593,7 @@ static int check_and_set_bank_swizzle(const struct r600_bytecode *bc,
|
|||
int i, r = 0, forced = 1;
|
||||
boolean scalar_only = bc->gfx_level == CAYMAN ? false : true;
|
||||
int max_slots = bc->gfx_level == CAYMAN ? 4 : 5;
|
||||
int max_checks = max_slots * 1000;
|
||||
|
||||
for (i = 0; i < max_slots; i++) {
|
||||
if (slots[i]) {
|
||||
|
|
@ -618,8 +619,8 @@ static int check_and_set_bank_swizzle(const struct r600_bytecode *bc,
|
|||
bank_swizzle[i] = slots[i]->bank_swizzle;
|
||||
|
||||
bank_swizzle[4] = SQ_ALU_SCL_210;
|
||||
while(bank_swizzle[4] <= SQ_ALU_SCL_221) {
|
||||
|
||||
while(bank_swizzle[4] <= SQ_ALU_SCL_221 && max_checks--) {
|
||||
init_bank_swizzle(&bs);
|
||||
if (scalar_only == false) {
|
||||
for (i = 0; i < 4; i++) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue