ac/llvm: fix unaligned VS input loads on gfx10.3
authorMarek Olšák <marek.olsak@amd.com>
Fri, 4 Sep 2020 10:38:15 +0000 (06:38 -0400)
committerMarge Bot <eric+marge@anholt.net>
Fri, 4 Sep 2020 11:07:41 +0000 (11:07 +0000)
Fixes: a23802bcb9a
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6595>

src/amd/llvm/ac_llvm_build.c

index 77d3f7e73fbe84cf49548ad95d247b14a8a04d0b..de9091693c1916fd377e30e777b1ef5cce6422f8 100644 (file)
@@ -1656,7 +1656,7 @@ ac_build_opencoded_load_format(struct ac_llvm_context *ctx,
        }
 
        int log_recombine = 0;
        }
 
        int log_recombine = 0;
-       if ((ctx->chip_class == GFX6 || ctx->chip_class == GFX10) && !known_aligned) {
+       if ((ctx->chip_class == GFX6 || ctx->chip_class >= GFX10) && !known_aligned) {
                /* Avoid alignment restrictions by loading one byte at a time. */
                load_num_channels <<= load_log_size;
                log_recombine = load_log_size;
                /* Avoid alignment restrictions by loading one byte at a time. */
                load_num_channels <<= load_log_size;
                log_recombine = load_log_size;