aco: Allow 1-byte loads and stores with load/store_buffer_amd
authorTimur Kristóf <timur.kristof@gmail.com>
Thu, 10 Feb 2022 22:53:24 +0000 (23:53 +0100)
committerMarge Bot <emma+marge@anholt.net>
Fri, 25 Feb 2022 06:31:33 +0000 (06:31 +0000)
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15034>

src/amd/compiler/aco_instruction_selection.cpp

index 4b3f879..b709c47 100644 (file)
@@ -4647,7 +4647,7 @@ store_vmem_mubuf(isel_context* ctx, Temp src, Temp descriptor, Temp voffset, Tem
                  bool slc = false)
 {
    Builder bld(ctx->program, ctx->block);
-   assert(elem_size_bytes == 2 || elem_size_bytes == 4 || elem_size_bytes == 8);
+   assert(elem_size_bytes == 1 || elem_size_bytes == 2 || elem_size_bytes == 4 || elem_size_bytes == 8);
    assert(write_mask);
    write_mask = util_widen_mask(write_mask, elem_size_bytes);
 
@@ -4670,7 +4670,7 @@ load_vmem_mubuf(isel_context* ctx, Temp dst, Temp descriptor, Temp voffset, Temp
                 unsigned stride = 0u, bool allow_combining = true, bool allow_reorder = true,
                 bool slc = false)
 {
-   assert(elem_size_bytes == 2 || elem_size_bytes == 4 || elem_size_bytes == 8);
+   assert(elem_size_bytes == 1 || elem_size_bytes == 2 || elem_size_bytes == 4 || elem_size_bytes == 8);
    assert((num_components * elem_size_bytes) == dst.bytes());
    assert(!!stride != allow_combining);