aco: workaround Tonga/Iceland hardware bug
authorDaniel Schürmann <daniel@schuermann.dev>
Wed, 6 Nov 2019 17:25:15 +0000 (18:25 +0100)
committerDaniel Schürmann <daniel@schuermann.dev>
Thu, 7 Nov 2019 08:19:50 +0000 (09:19 +0100)
The workaround got accidentally moved to the wrong place

Fixes: 08d510010b7586387e363460b98e6a45bbe97164 aco: increase accuracy of SGPR limits
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/amd/compiler/aco_instruction_selection_setup.cpp

index 87868e43089da6671f27e5433ae8a43e14148997..8a04e719f0bf310ab0f716b4a86c411e2c278c75 100644 (file)
@@ -1263,14 +1263,14 @@ setup_isel_context(Program* program,
    } else if (program->chip_class >= GFX8) {
       program->physical_sgprs = 800;
       program->sgpr_alloc_granule = 15;
-      program->sgpr_limit = 102;
-   } else {
-      program->physical_sgprs = 512;
-      program->sgpr_alloc_granule = 7;
       if (options->family == CHIP_TONGA || options->family == CHIP_ICELAND)
          program->sgpr_limit = 94; /* workaround hardware bug */
       else
-         program->sgpr_limit = 104;
+         program->sgpr_limit = 102;
+   } else {
+      program->physical_sgprs = 512;
+      program->sgpr_alloc_granule = 7;
+      program->sgpr_limit = 104;
    }
    /* TODO: we don't have to allocate VCC if we don't need it */
    program->needs_vcc = true;