[Mesa-dev] [PATCH 00/21] intel/isl: Add support for Yf and Ys tiling

Jason Ekstrand jason at jlekstrand.net
Fri Feb 23 07:06:40 UTC 2018


This patch series adds support to ISL for Yf and Ys tiling on gen9+.  It
really didn't end up being as bad as I thought it would be.  Most of the
work was in massaging things to handle 4D logical tile sizes so that we can
properly handle the more complex tiles.  There was also a bit of bother
around getting BLORP and ANV to properly be able to view a compressed Yf
texture as uncompressed.  Other than that, most of it is actually fairly
straightforward.

One glaring omission from this series is actually enabling Ys tiling.  I
believe all the calculations are in place and correct for Ys.  However,
enabling Ys and running it through Jenkins led several failures and GPU
hangs which I believe to be a result of not properly aligning the memory
objects to 64KB which is required for Ys.  Beyond that, there are some
cases with 1D surfaces where you cannot use Ys because the alignments are
just too high and we have no code yet for detecting those and choosing Yf
instead.  Finally, it is not at all clear what sort of a heuristic we would
want to use for enabling Ys as I don't think it's really going to buy us
all that much in most cases.

The other obvious omission in this series is miptails.  For that, there
currently is no code.  I intend to implement it but I figured I had enough
patches that it was worth sending it out as is.  Miptails will come either
as a follow-on series or as added patches in some future version of this
series.

Why do we care about Yf and Ys tiling?  There are a couple of reasons.  For
one, I think it will yield slightly better performance for 3D textures and
for small miplevels (once we get miptails).  I have no numbers to back that
up yet but my intuitive understanding of tiling leads me to think that Yf
and Ys will provide better cache locality in these cases.  The second
reason is that it's needed for sparse texturing.  Sparse allows the client
to bind individual pages to the image and not actually have memory bound to
the whole thing.  This requires both page-aligned slices and miptails, both
of which we only get with Yf and Ys.  For sparse multisampled images, Ys
makes everything easier because it puts all the samples in the same 64KB
tile which is helpful because sparse binding has no concept of arrayed
multisampling.

Happy Reviewing!

Nanley, I put you in the Cc but I don't expect you to spend another month
doing nothing but Jason patch review. :-)  I wanted you to be aware but was
hoping that Topi would take this one.

Cc: Nanley Chery <nanley.g.chery at intel.com>
Cc: Topi Pohjolainen <topi.pohjolainen at intel.com>
Cc: Chad Versace <chadversary at chromium.org>

Jason Ekstrand (21):
  intel/isl: Add a isl_surf_get_image_offset_B_tile_el helper
  intel/blorp: Use isl_surf_get_image_offset_B_tile_el in ccs_ambiguate
  intel/isl: Make the offset helpers four dimensional
  intel/isl: Make tile logical extents four dimensional
  intel/isl: Use a 4D physical total extent for size calculations
  intel/isl: Expose isl_tiling_get_info
  intel/isl: Take a dim and sample count in isl_tiling_get_info
  intel/isl: Implement correct tile size calculations for Ys/Yf
  intel/isl: Use the tile size for computing standard Y alignments
  intel/isl: Use ISL_DIM_LAYOUT_GEN9_1D for Yf/Ys
  intel/isl: Use the depth field of phys_level0_sa for GEN4_2D 3D
    surfaces
  intel/isl: Fill out the correct phys_total_extent for Ys/Yf
  intel/isl: Support Yf/Ys in isl_surf_get_image_offset_sa
  intel/isl: Pull the uncompressed surface view code from anv
  intel/blorp: Use isl_surf_get_uncompressed_surf
  intel/isl: Support Ys and Yf in isl_surf_get_uncompressed_surf
  intel/isl: Don't compute image tiling data for Yf/Ys tiling
  intel/isl: Support Yf/Ys tiling in surf_fill_state
  intel/isl: Support Yf/Ys tiling in emit_depth_stencil_hiz
  i965: Explicitly disable Yf and Ys tiling
  intel/isl: Enable Yf tiling

 src/intel/Makefile.isl.am                          |   9 +-
 src/intel/blorp/blorp_blit.c                       |  71 ++-
 src/intel/blorp/blorp_clear.c                      |   8 +-
 src/intel/isl/isl.c                                | 481 +++++++++++++++++----
 src/intel/isl/isl.h                                | 103 ++++-
 src/intel/isl/isl_emit_depth_stencil.c             |  21 +-
 src/intel/isl/isl_gen7.c                           |   1 -
 src/intel/isl/isl_gen9.c                           |  85 +---
 src/intel/isl/isl_storage_image.c                  |  17 +-
 src/intel/isl/isl_surface_state.c                  |  19 +-
 src/intel/isl/meson.build                          |  11 +
 .../isl/tests/isl_surf_get_image_offset_test.c     |   4 +-
 src/intel/isl/tests/isl_tile_std_y_test.c          | 160 +++++++
 src/intel/vulkan/anv_image.c                       |  34 +-
 src/mesa/drivers/dri/i965/intel_blit.c             |  12 +-
 src/mesa/drivers/dri/i965/intel_mipmap_tree.c      |  12 +-
 16 files changed, 778 insertions(+), 270 deletions(-)
 create mode 100644 src/intel/isl/tests/isl_tile_std_y_test.c

-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list