aco: update bug workarounds for GFX10_3
authorRhys Perry <pendingchaos02@gmail.com>
Thu, 18 Jun 2020 13:23:13 +0000 (14:23 +0100)
committerRhys Perry <pendingchaos02@gmail.com>
Tue, 4 Aug 2020 19:39:33 +0000 (20:39 +0100)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5546>

src/amd/compiler/aco_assembler.cpp
src/amd/compiler/aco_insert_NOPs.cpp

index 3972429a38362a54199f0d151938dfb11e0d2069..5e199d48e0af50a41b068954dfe20a75cadc85af 100644 (file)
@@ -787,7 +787,7 @@ static void fix_branches_gfx10(asm_context& ctx, std::vector<uint32_t>& out)
 
 void fix_branches(asm_context& ctx, std::vector<uint32_t>& out)
 {
 
 void fix_branches(asm_context& ctx, std::vector<uint32_t>& out)
 {
-   if (ctx.chip_class >= GFX10)
+   if (ctx.chip_class == GFX10)
       fix_branches_gfx10(ctx, out);
 
    for (std::pair<int, SOPP_instruction*> &branch : ctx.branches) {
       fix_branches_gfx10(ctx, out);
 
    for (std::pair<int, SOPP_instruction*> &branch : ctx.branches) {
index fe4525b75a027e81bfaccc9e462e174bc6670eb9..a609c18d5dc304bdc3e00e6af240d1f58e113791 100644 (file)
@@ -804,7 +804,9 @@ void mitigate_hazards(Program *program)
 
 void insert_NOPs(Program* program)
 {
 
 void insert_NOPs(Program* program)
 {
-   if (program->chip_class >= GFX10)
+   if (program->chip_class >= GFX10_3)
+      ; /* no hazards/bugs to mitigate */
+   else if (program->chip_class >= GFX10)
       mitigate_hazards<NOP_ctx_gfx10, handle_instruction_gfx10>(program);
    else
       mitigate_hazards<NOP_ctx_gfx6, handle_instruction_gfx6>(program);
       mitigate_hazards<NOP_ctx_gfx10, handle_instruction_gfx10>(program);
    else
       mitigate_hazards<NOP_ctx_gfx6, handle_instruction_gfx6>(program);