aco/gfx11: update s_code_end padding
authorRhys Perry <pendingchaos02@gmail.com>
Thu, 5 Jan 2023 15:44:09 +0000 (15:44 +0000)
committerEric Engestrom <eric@engestrom.ch>
Wed, 11 Jan 2023 17:44:21 +0000 (17:44 +0000)
Match ac_rtld_open().

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Cc: 22.3 <mesa-stable>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20536>
(cherry picked from commit 9e55b3b790997573d7e4110332024d1052d0ccc3)

.pick_status.json
src/amd/compiler/aco_assembler.cpp

index b08e0d2..49487ab 100644 (file)
         "description": "aco/gfx11: update s_code_end padding",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": null
     },
index 9da9dd3..0816370 100644 (file)
@@ -1141,7 +1141,7 @@ emit_program(Program* program, std::vector<uint32_t>& code)
    if (program->gfx_level >= GFX10) {
       /* Pad output with s_code_end so instruction prefetching doesn't cause
        * page faults */
-      unsigned final_size = align(code.size() + 3 * 16, 16);
+      unsigned final_size = align(code.size() + 3 * 16, program->gfx_level >= GFX11 ? 32 : 16);
       while (code.size() < final_size)
          code.push_back(0xbf9f0000u);
    }