Skip to content
  • Rhys Perry's avatar
    aco: adjust the condition for expanding vertex fetch data format · 1d50ef9c
    Rhys Perry authored
    
    
    Instead of avoiding out-of-bounds access, avoid creating a load larger
    than the original attribute. This should work just as well, since the only
    situations expending a load helped was because we shrunk it first.
    
    Also fixes a bug where a 3 component load (4 components with the first
    component skipped) would be incorrectly expanded to 4 components because
    the stride check would never be performed. Maybe we should avoid skipping
    the first component in some situations, but I'm not sure if it's worth
    the VGPR cost.
    
    fossil-db (vega10):
    Totals from 583 (0.39% of 149974) affected shaders:
    CodeSize: 1496848 -> 1500868 (+0.27%); split: -0.03%, +0.30%
    Instrs: 286155 -> 286575 (+0.15%); split: -0.07%, +0.22%
    Latency: 2947101 -> 2946865 (-0.01%); split: -0.23%, +0.22%
    InvThroughput: 797396 -> 797127 (-0.03%); split: -0.08%, +0.04%
    
    fossil-db (polaris10):
    Totals from 583 (0.39% of 151365) affected shaders:
    SGPRs: 38880 -> 39216 (+0.86%)
    VGPRs: 24440 -> 24356 (-0.34%)
    CodeSize: 1506808 -> 1510876 (+0.27%); split: -0.01%, +0.28%
    Instrs: 288735 -> 289167 (+0.15%); split: -0.06%, +0.21%
    Latency: 2963263 -> 2961884 (-0.05%); split: -0.24%, +0.19%
    InvThroughput: 802351 -> 801665 (-0.09%); split: -0.12%, +0.04%
    
    Signed-off-by: default avatarRhys Perry <pendingchaos02@gmail.com>
    Reviewed-by: default avatarDaniel Schürmann <daniel@schuermann.dev>
    Part-of: <mesa/mesa!9007>
    1d50ef9c