1. 13 Nov, 2018 2 commits
    • Timothy Arceri's avatar
      nir: add support for removing redundant stores to copy prop var · 34dffcf9
      Timothy Arceri authored
      For example the following type of thing is seen in TCS from
      a number of Vulkan and DXVK games:
      
      	vec1 32 ssa_557 = deref_var &oPatch (shader_out float)
      	vec1 32 ssa_558 = intrinsic load_deref (ssa_557) ()
      	vec1 32 ssa_559 = deref_var &oPatch@42 (shader_out float)
      	vec1 32 ssa_560 = intrinsic load_deref (ssa_559) ()
      	vec1 32 ssa_561 = deref_var &oPatch@43 (shader_out float)
      	vec1 32 ssa_562 = intrinsic load_deref (ssa_561) ()
      	intrinsic store_deref (ssa_557, ssa_558) (1) /* wrmask=x */
      	intrinsic store_deref (ssa_559, ssa_560) (1) /* wrmask=x */
      	intrinsic store_deref (ssa_561, ssa_562) (1) /* wrmask=x */
      
      No shader-db changes on i965 (SKL).
      
      vkpipeline-db results RADV (VEGA):
      
      Totals from affected shaders:
      SGPRS: 7832 -> 7728 (-1.33 %)
      VGPRS: 6476 -> 6740 (4.08 %)
      Spilled SGPRs: 0 -> 0 (0.00 %)
      Spilled VGPRs: 0 -> 0 (0.00 %)
      Private memory VGPRs: 0 -> 0 (0.00 %)
      Scratch size: 0 -> 0 (0.00 %) dwords per thread
      Code Size: 469572 -> 456596 (-2.76 %) bytes
      LDS: 0 -> 0 (0.00 %) blocks
      Max Waves: 989 -> 960 (-2.93 %)
      Wait states: 0 -> 0 (0.00 %)
      
      The Max Waves and VGPRS changes here are misleading. What is
      happening is a bunch of TCS outputs are being optimised away as
      they are now recognised as unused. This results in more varyings
      being compacted via nir_compact_varyings() which can result in
      more register pressure when they are not packed in an optimal way.
      This is an existing problem independent of this patch. I've run
      some benchmarks and haven't noticed any performance regressions
      in affected games.
      Reviewed-by: Jason Ekstrand's avatarJason Ekstrand <jason@jlekstrand.net>
      34dffcf9
    • Timothy Arceri's avatar
      anv/i965: make use of nir_link_constant_varyings() · 3561108d
      Timothy Arceri authored
      shader-db results for SLK:
      
      total instructions in shared programs: 13106498 -> 13091573 (-0.11%)
      instructions in affected programs: 1186244 -> 1171319 (-1.26%)
      helped: 6186
      HURT: 0
      
      total cycles in shared programs: 332062633 -> 331961653 (-0.03%)
      cycles in affected programs: 8537165 -> 8436185 (-1.18%)
      helped: 5371
      HURT: 862
      
      LOST:   6
      GAINED: 14
      Reviewed-by: Jason Ekstrand's avatarJason Ekstrand <jason@jlekstrand.net>
      3561108d
  2. 12 Nov, 2018 20 commits
  3. 10 Nov, 2018 3 commits
  4. 09 Nov, 2018 15 commits