Skip to content
Snippets Groups Projects
  1. Sep 29, 2021
  2. Sep 28, 2021
  3. Sep 27, 2021
    • Timur Kristóf's avatar
      ac/nir/nggc: Don't reuse uniform values from divergent control flow. · 0f066dbc
      Timur Kristóf authored and Dylan Baker's avatar Dylan Baker committed
      
      With NGG culling, the shaders are split into two parts:
      the top part that computes just the position output,
      and the bottom part which produces the other outputs.
      
      To reduce redundancy between the two, I added some code
      to reuse uniform variables between them. However, there is
      an edge case I didn't think about: because of vertex repacking,
      it is possible for the bottom part to process a different vertex.
      Therefore it can take a different divergent code path
      (though it must still take the same uniform code path).
      Due to this, when a uniform value comes from divergent control
      flow, this may be undefined in the bottom part.
      
      This commit stops reusing uniform variables from
      divergent control flow, to fix issues that arise from this.
      
      Fossil DB stats on Sienna Cichlid with NGGC on:
      
      Totals from 1723 (1.34% of 128647) affected shaders:
      VGPRs: 89312 -> 89184 (-0.14%); split: -0.15%, +0.01%
      SpillSGPRs: 4575 -> 120 (-97.38%)
      CodeSize: 10846424 -> 10873836 (+0.25%); split: -0.68%, +0.93%
      MaxWaves: 34582 -> 34602 (+0.06%); split: +0.06%, -0.01%
      Instrs: 2124471 -> 2128835 (+0.21%); split: -0.51%, +0.72%
      Latency: 7274569 -> 7293899 (+0.27%); split: -0.22%, +0.48%
      InvThroughput: 1637130 -> 1635490 (-0.10%); split: -0.17%, +0.07%
      VClause: 25141 -> 25414 (+1.09%); split: -0.02%, +1.10%
      SClause: 56367 -> 59503 (+5.56%); split: -1.36%, +6.93%
      Copies: 230704 -> 219313 (-4.94%); split: -5.49%, +0.55%
      Branches: 72781 -> 72681 (-0.14%); split: -0.21%, +0.07%
      PreSGPRs: 118766 -> 100176 (-15.65%); split: -15.70%, +0.05%
      PreVGPRs: 76876 -> 76833 (-0.06%)
      
      Fixes: 0bb543bb
      Signed-off-by: default avatarTimur Kristóf <timur.kristof@gmail.com>
      Reviewed-by: default avatarDaniel Schürmann <daniel@schuermann.dev>
      Part-of: <mesa/mesa!13001>
      (cherry picked from commit 09f89d15)
      0f066dbc
    • Timur Kristóf's avatar
      ac/nir/nggc: Refactor save_reusable_variables. · 134d11e4
      Timur Kristóf authored and Dylan Baker's avatar Dylan Baker committed
      
      This makes the code more elegant and also fixes the mistake of
      skipping the blocks that come before loops.
      
      Fossil DB changes on Sienna Cichlid with NGGC on:
      
      Totals from 1026 (0.80% of 128647) affected shaders:
      SpillSGPRs: 3817 -> 4035 (+5.71%)
      CodeSize: 5582856 -> 5538732 (-0.79%); split: -0.89%, +0.10%
      Instrs: 1106907 -> 1100180 (-0.61%); split: -0.68%, +0.07%
      Latency: 10084948 -> 10052197 (-0.32%); split: -0.37%, +0.05%
      InvThroughput: 1567012 -> 1564949 (-0.13%); split: -0.16%, +0.03%
      SClause: 39789 -> 39075 (-1.79%); split: -2.33%, +0.54%
      Copies: 95184 -> 96456 (+1.34%); split: -0.19%, +1.53%
      Branches: 44087 -> 44093 (+0.01%); split: -0.01%, +0.02%
      PreSGPRs: 47584 -> 51009 (+7.20%); split: -0.61%, +7.80%
      
      Fixes: 0bb543bb
      Signed-off-by: default avatarTimur Kristóf <timur.kristof@gmail.com>
      Reviewed-by: default avatarDaniel Schürmann <daniel@schuermann.dev>
      Part-of: <mesa/mesa!13001>
      (cherry picked from commit cb19ebe7)
      134d11e4
    • Dylan Baker's avatar
      .pick_status.json: Update to ecc6d78b · bb48243d
      Dylan Baker authored
      bb48243d
  4. Sep 24, 2021
  5. Sep 22, 2021
  6. Sep 21, 2021
Loading