Skip to content
  • Bas Nieuwenhuizen's avatar
    ac/nir: Add workaround for GFX9 buffer views. · 4503ff76
    Bas Nieuwenhuizen authored
    On GFX9 whether the buffer size is interpreted as elements or bytes
    depends on whether IDXEN is enabled in the instruction. If the index
    is a constant zero, LLVM optimizes IDXEN to 0.
    
    Now the size in elements is interpreted in bytes which of course
    results in out of bounds accesses.
    
    The correct fix is most likely to disable the LLVM optimization,
    but we need something to work with LLVM <= 6.0.
    
    radeonsi does the max between stride and element count on the CPU
    but that results in the size intrinsics returning the wrong size
    for the buffer. This would cause CTS errors for radv.
    
    v2: Also include the store changes.
    
    Fixes: e38685cc
    
     'Revert "radv: disable support for VEGA for now."'
    Reviewed-by: default avatarSamuel Pitoiset <samuel.pitoiset@gmail.com>
    4503ff76