1. 13 Dec, 2018 1 commit
  2. 26 Oct, 2018 1 commit
  3. 30 Aug, 2018 1 commit
  4. 29 Aug, 2018 6 commits
    • Jason Ekstrand's avatar
      intel/compiler: Remove surface_idx from brw_image_param · d8033d40
      Jason Ekstrand authored
      Now that the drivers are lowering to surface indices themselves, we no
      longer need to push the surface index into the shader.
      Reviewed-by: Kenneth Graunke's avatarKenneth Graunke <kenneth@whitecape.org>
    • Jason Ekstrand's avatar
    • Jason Ekstrand's avatar
      anv,i965: Lower away image derefs in the driver · 09f1de97
      Jason Ekstrand authored
      Previously, the back-end compiler turn image access into magic uniform
      reads and there was a complex contract between back-end compiler and
      driver about setting up and filling out those params.  As of this
      commit, both drivers now lower image_deref_load_param_intel intrinsics
      to load_uniform intrinsics controlled by the driver and lower the other
      image_deref_* intrinsics to image_* intrinsics which take an actual
      binding table index.  There are still "magic" uniforms but they are now
      added and controlled entirely by the driver and that contract no longer
      spans components.
      This also has the side-effect of making most image use compile-time
      binding table indices.  Previously, all image access pulled the binding
      table index from a uniform.  Part of the reason for this was that the
      magic uniforms made it difficult to decouple binding table indices from
      the uniforms and, since they are indexed completely differently
      (especially in Vulkan), it was hard to pull them apart.  Now that the
      driver is handling both, it's trivial to decouple the two and provide
      actual binding table indices.
      Shader-db results on Kaby Lake:
          total instructions in shared programs: 15166872 -> 15164293 (-0.02%)
          instructions in affected programs: 115834 -> 113255 (-2.23%)
          helped: 191
          HURT: 0
          total cycles in shared programs: 571311495 -> 571196465 (-0.02%)
          cycles in affected programs: 4757115 -> 4642085 (-2.42%)
          helped: 73
          HURT: 67
          total spills in shared programs: 10951 -> 10926 (-0.23%)
          spills in affected programs: 742 -> 717 (-3.37%)
          helped: 7
          HURT: 0
          total fills in shared programs: 22226 -> 22201 (-0.11%)
          fills in affected programs: 1146 -> 1121 (-2.18%)
          helped: 7
          HURT: 0
      Reviewed-by: Kenneth Graunke's avatarKenneth Graunke <kenneth@whitecape.org>
    • Jason Ekstrand's avatar
      nir: Use a bitfield for image access qualifiers · 39429438
      Jason Ekstrand authored
      This commit expands the current memory access enum to contain the extra
      two bits provided for images.  We choose to follow the SPIR-V convention
      of NonReadable and NonWriteable because readonly implies that you *can*
      read so readonly + writeonly doesn't make as much sense as NonReadable +
      Reviewed-by: Kenneth Graunke's avatarKenneth Graunke <kenneth@whitecape.org>
    • Jason Ekstrand's avatar
      intel/compiler: Use two components for 1D array image sizes · 42891438
      Jason Ekstrand authored
      Having the array length component stored in .z was a small convenience
      for the ISL image param filling code and an annoyance in the NIR
      lowering code.  The only convenience of treating 1D arrays like 2D
      arrays in the lowering code is in the address calculation code so let's
      put all the complexity there as well.
      Reviewed-by: Kenneth Graunke's avatarKenneth Graunke <kenneth@whitecape.org>
    • Jason Ekstrand's avatar
      intel/compiler: Do image load/store lowering to NIR · 37f7983b
      Jason Ekstrand authored
      This commit moves our storage image format conversion codegen into NIR
      instead of doing it in the back-end.  This has the advantage of letting
      us run it through NIR's optimizer which is pretty effective at shrinking
      things down.  In the common case of rgba8, the number of instructions
      emitted after NIR is done with it is half of what it was with the
      lowering happening in the back-end.  On the downside, the back-end's
      lowering is able to directly use predicates and the NIR lowering has to
      use IFs.
      Shader-db results on Kaby Lake:
          total instructions in shared programs: 15166910 -> 15166872 (<.01%)
          instructions in affected programs: 5895 -> 5857 (-0.64%)
          helped: 15
          HURT: 0
      Clearly, we don't have that much image_load_store happening in the
      shaders in shader-db....
      Reviewed-by: Kenneth Graunke's avatarKenneth Graunke <kenneth@whitecape.org>