[Mesa-dev] [PATCH 00/13] anv: support new formats with multiple views

Lionel Landwerlin lionel.g.landwerlin at intel.com
Mon Nov 5 15:35:54 UTC 2018


Hi all,

This series is about reworking how we deal with formats a bit. Up to
now we had described formats as a set of planes, each of them mapping
exactly to 1 HW binding table entry.

When introducing YCbCr support a while back, this way of describing
formats prevented us to support YCbCr formats that have a layout with
2 planes interleaved (like VK_FORMAT_G16B16G16R16_422_UNORM, etc...).
This is because of a limitation in the design of the HW sampler that
makes it yield invalid results if you try to use 2 different views of
the same memory region.

With Gen11 the HW has been redesigned to get rid of this limitation
and we can now use 2 different binding entries to look at a formats
like VK_FORMAT_G8B8G8R8_422_UNORM. And as a result, we are also
capable to enable 16bits interleaved formats.

The changes here are a bit convoluted (apologies) because we have to
think a bit more in terms of planes rather than aspects for creating
image & image views, but overall we can still stick to aspects in much
of the driver.

Cheers,

Lionel Landwerlin (13):
  anv: simplify internal address offset
  anv/image: remove unused parameter
  anv/lower_ycbcr: make sure to set 0s on all components
  anv: associate vulkan formats with aspects
  anv: use image aspects rather than computed ones
  anv: move helper function internally
  anv/image: use stored format to figure out plane from aspect
  anv: convert anv_layout_to_aux_usage to use plane
  anv: use format stored aspects to build up images & imageviews
  anv/formats: allow formats to be describe per generation
  anv: introduce device compatibility checks for format query
  anv/icl: enable 16bit single plane YCbCr formats
  anv/formats: drop RGBA swizzle for ycbcr formats

 src/intel/vulkan/anv_blorp.c                  |  22 +-
 src/intel/vulkan/anv_device.c                 |   4 +-
 src/intel/vulkan/anv_dump.c                   |   2 +-
 src/intel/vulkan/anv_formats.c                | 760 ++++++++++--------
 src/intel/vulkan/anv_image.c                  | 423 +++++-----
 .../vulkan/anv_nir_lower_ycbcr_textures.c     |   4 +-
 src/intel/vulkan/anv_private.h                | 112 +--
 src/intel/vulkan/genX_cmd_buffer.c            |  37 +-
 src/intel/vulkan/vk_format_info.h             |  54 +-
 9 files changed, 707 insertions(+), 711 deletions(-)

--
2.19.1


More information about the mesa-dev mailing list