1. 02 Jan, 2022 5 commits
  2. 23 Dec, 2021 1 commit
    • Alyssa Rosenzweig's avatar
      pan/bi: Don't call useless NIR passes · 944c8907
      Alyssa Rosenzweig authored and Marge Bot's avatar Marge Bot committed
      
      
      Cargo culted from the Midgard compiler.
      
      nir_move_vec_src_uses_to_dest is intended for vec4 backends, which does
      not apply to Bifrost. nir_lower_locals_to_regs runs much earlier in the
      compiler and is a no-op here.
      
      total instructions in shared programs: 107252 -> 107242 (<.01%)
      instructions in affected programs: 2403 -> 2393 (-0.42%)
      helped: 10
      HURT: 0
      helped stats (abs) min: 1.0 max: 1.0 x̄: 1.00 x̃: 1
      helped stats (rel) min: 0.33% max: 0.57% x̄: 0.43% x̃: 0.42%
      95% mean confidence interval for instructions value: -1.00 -1.00
      95% mean confidence interval for instructions %-change: -0.49% -0.37%
      Instructions are helped.
      
      total tuples in shared programs: 89664 -> 89664 (0.00%)
      tuples in affected programs: 333 -> 333 (0.00%)
      helped: 1
      HURT: 1
      helped stats (abs) min: 1.0 max: 1.0 x̄: 1.00 x̃: 1
      helped stats (rel) min: 0.52% max: 0.52% x̄: 0.52% x̃: 0.52%
      HURT stats (abs)   min: 1.0 max: 1.0 x̄: 1.00 x̃: 1
      HURT stats (rel)   min: 0.70% max: 0.70% x̄: 0.70% x̃: 0.70%
      
      total cycles in shared programs: 8103.88 -> 8103.79 (<.01%)
      cycles in affected programs: 29.42 -> 29.33 (-0.28%)
      helped: 3
      HURT: 1
      helped stats (abs) min: 0.041665999999999315 max: 0.04166700000000034 x̄:
      0.04 x̃: 0
      helped stats (rel) min: 0.49% max: 0.55% x̄: 0.53% x̃: 0.54%
      HURT stats (abs)   min: 0.04166700000000034 max: 0.04166700000000034 x̄:
      0.04 x̃: 0
      HURT stats (rel)   min: 0.74% max: 0.74% x̄: 0.74% x̃: 0.74%
      95% mean confidence interval for cycles value: -0.09 0.05
      95% mean confidence interval for cycles %-change: -1.22% 0.80%
      Inconclusive result (value mean confidence interval includes 0).
      
      total arith in shared programs: 3376.42 -> 3376.33 (<.01%)
      arith in affected programs: 29.42 -> 29.33 (-0.28%)
      helped: 3
      HURT: 1
      helped stats (abs) min: 0.041665999999999315 max: 0.04166700000000034 x̄:
      0.04 x̃: 0
      helped stats (rel) min: 0.49% max: 0.55% x̄: 0.53% x̃: 0.54%
      HURT stats (abs)   min: 0.04166700000000034 max: 0.04166700000000034 x̄:
      0.04 x̃: 0
      HURT stats (rel)   min: 0.74% max: 0.74% x̄: 0.74% x̃: 0.74%
      95% mean confidence interval for arith value: -0.09 0.05
      95% mean confidence interval for arith %-change: -1.22% 0.80%
      Inconclusive result (value mean confidence interval includes 0).
      
      total quadwords in shared programs: 79681 -> 79681 (0.00%)
      quadwords in affected programs: 283 -> 283 (0.00%)
      helped: 1
      HURT: 1
      helped stats (abs) min: 1.0 max: 1.0 x̄: 1.00 x̃: 1
      helped stats (rel) min: 0.62% max: 0.62% x̄: 0.62% x̃: 0.62%
      HURT stats (abs)   min: 1.0 max: 1.0 x̄: 1.00 x̃: 1
      HURT stats (rel)   min: 0.82% max: 0.82% x̄: 0.82% x̃: 0.82%
      
      total threads in shared programs: 2226 -> 2227 (0.04%)
      threads in affected programs: 1 -> 2 (100.00%)
      helped: 1
      HURT: 0
      
      Signed-off-by: Alyssa Rosenzweig's avatarAlyssa Rosenzweig <alyssa@collabora.com>
      Part-of: <!14293>
      944c8907
  3. 20 Dec, 2021 7 commits
  4. 08 Dec, 2021 1 commit
  5. 12 Nov, 2021 3 commits
    • Alyssa Rosenzweig's avatar
      pan/bi: Enable dual texture fusing pass · a4d3a296
      Alyssa Rosenzweig authored and Marge Bot's avatar Marge Bot committed
      
      
      Everything is in place for it now -- ship it! Our Bifrost cycle model is
      coarse, so take the shader-db results with a massive spoonful of salt:
      
      total instructions in shared programs: 107504 -> 107252 (-0.23%)
      instructions in affected programs: 39692 -> 39440 (-0.63%)
      helped: 191
      HURT: 1
      helped stats (abs) min: 1.0 max: 20.0 x̄: 1.32 x̃: 1
      helped stats (rel) min: 0.11% max: 9.52% x̄: 1.21% x̃: 0.98%
      HURT stats (abs)   min: 1.0 max: 1.0 x̄: 1.00 x̃: 1
      HURT stats (rel)   min: 2.04% max: 2.04% x̄: 2.04% x̃: 2.04%
      95% mean confidence interval for instructions value: -1.60 -1.02
      95% mean confidence interval for instructions %-change: -1.37% -1.01%
      Instructions are helped.
      
      total tuples in shared programs: 89864 -> 89664 (-0.22%)
      tuples in affected programs: 27787 -> 27587 (-0.72%)
      helped: 146
      HURT: 6
      helped stats (abs) min: 1.0 max: 17.0 x̄: 1.54 x̃: 1
      helped stats (rel) min: 0.14% max: 15.38% x̄: 1.83% x̃: 1.25%
      HURT stats (abs)   min: 1.0 max: 11.0 x̄: 4.17 x̃: 2
      HURT stats (rel)   min: 0.54% max: 3.55% x̄: 1.29% x̃: 0.87%
      95% mean confidence interval for tuples value: -1.64 -0.99
      95% mean confidence interval for tuples %-change: -2.06% -1.36%
      Tuples are helped.
      
      total clauses in shared programs: 18253 -> 18044 (-1.15%)
      clauses in affected programs: 5127 -> 4918 (-4.08%)
      helped: 164
      HURT: 1
      helped stats (abs) min: 1.0 max: 19.0 x̄: 1.28 x̃: 1
      helped stats (rel) min: 0.78% max: 28.57% x̄: 6.73% x̃: 5.88%
      HURT stats (abs)   min: 1.0 max: 1.0 x̄: 1.00 x̃: 1
      HURT stats (rel)   min: 2.94% max: 2.94% x̄: 2.94% x̃: 2.94%
      95% mean confidence interval for clauses value: -1.50 -1.04
      95% mean confidence interval for clauses %-change: -7.42% -5.91%
      Clauses are helped.
      
      total cycles in shared programs: 8118.54 -> 8103.88 (-0.18%)
      cycles in affected programs: 414.96 -> 400.29 (-3.53%)
      helped: 43
      HURT: 27
      helped stats (abs) min: 0.041665999999999315 max: 4.375 x̄: 0.41 x̃: 0
      helped stats (rel) min: 0.24% max: 50.00% x̄: 11.49% x̃: 5.26%
      HURT stats (abs)   min: 0.041665999999999315 max: 1.1666639999999973 x̄:
      0.10 x̃: 0
      HURT stats (rel)   min: 0.43% max: 4.71% x̄: 1.42% x̃: 1.28%
      95% mean confidence interval for cycles value: -0.35 -0.07
      95% mean confidence interval for cycles %-change: -9.50% -3.53%
      Cycles are helped.
      
      total arith in shared programs: 3375.67 -> 3376.42 (0.02%)
      arith in affected programs: 345.29 -> 346.04 (0.22%)
      helped: 24
      HURT: 32
      helped stats (abs) min: 0.041665999999999315 max: 0.5833329999999997 x̄:
      0.09 x̃: 0
      helped stats (rel) min: 0.24% max: 14.29% x̄: 2.82% x̃: 1.50%
      HURT stats (abs)   min: 0.041665999999999315 max: 1.1666639999999973 x̄:
      0.09 x̃: 0
      HURT stats (rel)   min: 0.43% max: 4.71% x̄: 1.42% x̃: 1.28%
      95% mean confidence interval for arith value: -0.04 0.07
      95% mean confidence interval for arith %-change: -1.19% 0.39%
      Inconclusive result (value mean confidence interval includes 0).
      
      total texture in shared programs: 1275 -> 1157 (-9.25%)
      texture in affected programs: 725.50 -> 607.50 (-16.26%)
      helped: 192
      HURT: 0
      helped stats (abs) min: 0.5 max: 10.0 x̄: 0.61 x̃: 0
      helped stats (rel) min: 2.86% max: 50.00% x̄: 25.20% x̃: 25.00%
      95% mean confidence interval for texture value: -0.72 -0.51
      95% mean confidence interval for texture %-change: -27.12% -23.27%
      Texture are helped.
      
      total vary in shared programs: 537.88 -> 536.12 (-0.33%)
      vary in affected programs: 2.75 -> 1 (-63.64%)
      helped: 1
      HURT: 0
      
      total quadwords in shared programs: 79762 -> 79681 (-0.10%)
      quadwords in affected programs: 10261 -> 10180 (-0.79%)
      helped: 59
      HURT: 18
      helped stats (abs) min: 1.0 max: 14.0 x̄: 1.88 x̃: 1
      helped stats (rel) min: 0.38% max: 8.20% x̄: 1.95% x̃: 1.43%
      HURT stats (abs)   min: 1.0 max: 4.0 x̄: 1.67 x̃: 1
      HURT stats (rel)   min: 0.46% max: 8.89% x̄: 2.22% x̃: 1.21%
      95% mean confidence interval for quadwords value: -1.57 -0.53
      95% mean confidence interval for quadwords %-change: -1.59% -0.37%
      Quadwords are helped.
      
      Signed-off-by: Alyssa Rosenzweig's avatarAlyssa Rosenzweig <alyssa@collabora.com>
      Part-of: <!13723>
      a4d3a296
    • Alyssa Rosenzweig's avatar
      pan/bi: Use BIFROST_TEXTURE_OPERATION_SINGLE enum · 98c1b3e7
      Alyssa Rosenzweig authored and Marge Bot's avatar Marge Bot committed
      
      
      Signed-off-by: Alyssa Rosenzweig's avatarAlyssa Rosenzweig <alyssa@collabora.com>
      Part-of: <!13723>
      98c1b3e7
    • Alyssa Rosenzweig's avatar
      pan/bi: Add second destination to TEXC · 7dc90b68
      Alyssa Rosenzweig authored and Marge Bot's avatar Marge Bot committed
      
      
      Used to model dual texturing, which writes to separate sets of staging
      registers.
      
      Signed-off-by: Alyssa Rosenzweig's avatarAlyssa Rosenzweig <alyssa@collabora.com>
      Part-of: <!13723>
      7dc90b68
  6. 06 Oct, 2021 1 commit
    • Alyssa Rosenzweig's avatar
      pan/bi: Optimize abs(derivative) · c00e7b72
      Alyssa Rosenzweig authored
      
      
      We implement fine derivatives as:
      
      	broadcast(x, (lane & ~1) + 1) - broadcast(x, lane & ~1)
      
      Most of the complexity is to get the right sign. If we can ignore the
      sign, we can generate the simpler code:
      
      	broadcast(x, lane ^ 1) - lane
      
      This is a particular win on v7+ where the broadcast instruction (CLPER)
      can do `lane ^ value` for free. However, even on v6 where we lower to an
      explicit XOR instruction, it's still a win.
      
      The limiting case is fwidth. The fragment shader
      
         gl_FragColor = fwidth(vec4_varying);
      
      has the following results on v6, v7, and v9:
      
      G72 (-26% instructions, -43% cycles):
      38 inst, 30 tuples, 5 clauses, 1.166667 cycles, 1.166667 arith, 28 quadwords
      28 inst, 19 tuples, 4 clauses, 0.666667 cycles, 0.666667 arith, 19 quadwords
      
      G76 (-37% instructions, -54% cycles):
      38 inst, 30 tuples, 5 clauses, 1.166667 cycles, 1.166667 arith, 28 quadwords
      24 inst, 16 tuples, 4 clauses, 0.541667 cycles, 0.541667 arith, 18 quadwords
      
      G78 (-40% instructions, -56% cycles):
      40 inst, 1.125000 cycles, 0.250000 fma, 0.109375 cvt, 1.125000 sfu, 20 quadwords
      24 inst, 0.500000 cycles, 0.250000 fma, 0.015625 cvt, 0.500000 sfu, 12 quadwords
      
      shader-db tells a similar story -- most shaders are unaffected, but a
      shader that uses fwidth has a 20% reduction in cycle count:
      
      instructions helped:   shaders/tesseract/488.shader_test MESA_SHADER_FRAGMENT: 264 -> 262 (-0.76%)
      instructions helped:   shaders/chromeos/109-1.shader_test MESA_SHADER_FRAGMENT: 36 -> 28 (-22.22%)
      tuples helped:   shaders/chromeos/109-1.shader_test MESA_SHADER_FRAGMENT: 27 -> 22 (-18.52%)
      tuples HURT:   shaders/tesseract/488.shader_test MESA_SHADER_FRAGMENT: 211 -> 212 (0.47%)
      clauses HURT:   shaders/tesseract/488.shader_test MESA_SHADER_FRAGMENT: 32 -> 33 (3.12%)
      cycles helped:   shaders/chromeos/109-1.shader_test MESA_SHADER_FRAGMENT: 1 -> 0.79 (-20.83%)
      arith helped:   shaders/chromeos/109-1.shader_test MESA_SHADER_FRAGMENT: 1 -> 0.79 (-20.83%)
      quadwords helped:   shaders/chromeos/109-1.shader_test MESA_SHADER_FRAGMENT: 31 -> 28 (-9.68%)
      quadwords HURT:   shaders/tesseract/488.shader_test MESA_SHADER_FRAGMENT: 176 -> 178 (1.14%)
      
      total instructions in shared programs: 148370 -> 148360 (<.01%)
      instructions in affected programs: 300 -> 290 (-3.33%)
      helped: 2
      HURT: 0
      
      total tuples in shared programs: 124188 -> 124184 (<.01%)
      tuples in affected programs: 238 -> 234 (-1.68%)
      helped: 1
      HURT: 1
      helped stats (abs) min: 5.0 max: 5.0 x̄: 5.00 x̃: 5
      helped stats (rel) min: 18.52% max: 18.52% x̄: 18.52% x̃: 18.52%
      HURT stats (abs)   min: 1.0 max: 1.0 x̄: 1.00 x̃: 1
      HURT stats (rel)   min: 0.47% max: 0.47% x̄: 0.47% x̃: 0.47%
      
      total clauses in shared programs: 25692 -> 25693 (<.01%)
      clauses in affected programs: 32 -> 33 (3.12%)
      helped: 0
      HURT: 1
      
      total cycles in shared programs: 12132.04 -> 12131.83 (<.01%)
      cycles in affected programs: 1 -> 0.79 (-20.83%)
      helped: 1
      HURT: 0
      
      total arith in shared programs: 4623.75 -> 4623.54 (<.01%)
      arith in affected programs: 1 -> 0.79 (-20.83%)
      helped: 1
      HURT: 0
      
      total quadwords in shared programs: 110386 -> 110385 (<.01%)
      quadwords in affected programs: 207 -> 206 (-0.48%)
      helped: 1
      HURT: 1
      helped stats (abs) min: 3.0 max: 3.0 x̄: 3.00 x̃: 3
      helped stats (rel) min: 9.68% max: 9.68% x̄: 9.68% x̃: 9.68%
      HURT stats (abs)   min: 2.0 max: 2.0 x̄: 2.00 x̃: 2
      HURT stats (rel)   min: 1.14% max: 1.14% x̄: 1.14% x̃: 1.14%
      
      Signed-off-by: Alyssa Rosenzweig's avatarAlyssa Rosenzweig <alyssa@collabora.com>
      Part-of: <!12332>
      c00e7b72
  7. 30 Sep, 2021 1 commit
  8. 28 Sep, 2021 1 commit
  9. 21 Sep, 2021 2 commits
  10. 20 Aug, 2021 4 commits
  11. 16 Aug, 2021 1 commit
  12. 11 Aug, 2021 6 commits
  13. 10 Aug, 2021 1 commit
  14. 03 Aug, 2021 1 commit
  15. 29 Jul, 2021 2 commits
    • Alyssa Rosenzweig's avatar
      pan/bi: Validate the live set starts empty · 1e29f57b
      Alyssa Rosenzweig authored
      
      
      Otherwise there is an uninitialized read, and the register allocation
      will fail. (In the sense of failing a precondition. This manifests as
      synthetic interference leading to higher register pressure and useless
      moves. The allocation itself is ok, but it indicates a real bug.)
      
      Signed-off-by: Alyssa Rosenzweig's avatarAlyssa Rosenzweig <alyssa@collabora.com>
      Part-of: <!12130>
      1e29f57b
    • Alyssa Rosenzweig's avatar
      pan/bi: Lower fragment output with <4 components · c4f8b52e
      Alyssa Rosenzweig authored
      
      
      This avoids undefined behaviour in the shader, which will fail
      validation added later in the series. shader-db results are neglible --
      the extra moves required in a few cases are cancelled out by the extra
      moves eliminated by allowing register allocation to work properly.
      
      total instructions in shared programs: 146903 -> 146907 (<.01%)
      instructions in affected programs: 33 -> 37 (12.12%)
      helped: 0
      HURT: 1
      
      total tuples in shared programs: 123616 -> 123613 (<.01%)
      tuples in affected programs: 764 -> 761 (-0.39%)
      helped: 6
      HURT: 4
      helped stats (abs) min: 1.0 max: 4.0 x̄: 1.67 x̃: 1
      helped stats (rel) min: 0.54% max: 5.88% x̄: 2.64% x̃: 1.86%
      HURT stats (abs)   min: 1.0 max: 2.0 x̄: 1.75 x̃: 2
      HURT stats (rel)   min: 4.55% max: 13.33% x̄: 8.57% x̃: 8.19%
      95% mean confidence interval for tuples value: -1.73 1.13
      95% mean confidence interval for tuples %-change: -2.72% 6.41%
      Inconclusive result (value mean confidence interval includes 0).
      
      total clauses in shared programs: 25656 -> 25654 (<.01%)
      clauses in affected programs: 43 -> 41 (-4.65%)
      helped: 2
      HURT: 1
      helped stats (abs) min: 1.0 max: 2.0 x̄: 1.50 x̃: 1
      helped stats (rel) min: 6.25% max: 12.50% x̄: 9.38% x̃: 9.38%
      HURT stats (abs)   min: 1.0 max: 1.0 x̄: 1.00 x̃: 1
      HURT stats (rel)   min: 33.33% max: 33.33% x̄: 33.33% x̃: 33.33%
      
      total cycles in shared programs: 12114.21 -> 12114.12 (<.01%)
      cycles in affected programs: 27.42 -> 27.33 (-0.30%)
      helped: 4
      HURT: 3
      helped stats (abs) min: 0.04166700000000034 max: 0.08333299999999966 x̄: 0.06 x̃: 0
      helped stats (rel) min: 0.57% max: 1.59% x̄: 1.02% x̃: 0.96%
      HURT stats (abs)   min: 0.0416669999999999 max: 0.08333299999999999 x̄: 0.06 x̃: 0
      HURT stats (rel)   min: 4.17% max: 16.67% x̄: 8.80% x̃: 5.56%
      95% mean confidence interval for cycles value: -0.07 0.05
      95% mean confidence interval for cycles %-change: -2.90% 9.27%
      Inconclusive result (value mean confidence interval includes 0).
      
      total arith in shared programs: 4601.08 -> 4601.04 (<.01%)
      arith in affected programs: 29 -> 28.96 (-0.14%)
      helped: 6
      HURT: 4
      helped stats (abs) min: 0.04166700000000001 max: 0.08333299999999966 x̄: 0.06 x̃: 0
      helped stats (rel) min: 0.57% max: 10.00% x̄: 3.63% x̃: 1.39%
      HURT stats (abs)   min: 0.04166700000000001 max: 0.08333399999999991 x̄: 0.07 x̃: 0
      HURT stats (rel)   min: 5.56% max: 16.67% x̄: 10.85% x̃: 10.60%
      95% mean confidence interval for arith value: -0.05 0.05
      95% mean confidence interval for arith %-change: -3.95% 8.28%
      Inconclusive result (value mean confidence interval includes 0).
      
      total quadwords in shared programs: 110008 -> 110002 (<.01%)
      quadwords in affected programs: 1090 -> 1084 (-0.55%)
      helped: 11
      HURT: 8
      helped stats (abs) min: 1.0 max: 7.0 x̄: 2.18 x̃: 1
      helped stats (rel) min: 0.61% max: 13.16% x̄: 4.07% x̃: 1.82%
      HURT stats (abs)   min: 1.0 max: 6.0 x̄: 2.25 x̃: 1
      HURT stats (rel)   min: 3.70% max: 42.86% x̄: 12.55% x̃: 7.50%
      95% mean confidence interval for quadwords value: -1.76 1.13
      95% mean confidence interval for quadwords %-change: -2.95% 8.81%
      Inconclusive result (value mean confidence interval includes 0).
      
      Signed-off-by: Alyssa Rosenzweig's avatarAlyssa Rosenzweig <alyssa@collabora.com>
      Part-of: <!12130>
      c4f8b52e
  16. 28 Jul, 2021 3 commits