mesa/include
Bas Nieuwenhuizen 2cc2b45688 drm-uapi: Add AMD modifiers.
This adds modifiers for GFX9+ AMD GPUs.

As the modifiers need a lot of parameters I split things out in
getters and setters.
  - Advantage: simplifies the code a lot
  - Disadvantage: Makes it harder to check that you're setting all
                  the required fields.

The tiling modes seem to change every generatio, but the structure
of what each tiling mode is good for stays really similar. As such
the core of the modifier is
 - the tiling mode
 - a version. Not explicitly a GPU generation, but splitting out
   a new set of tiling equations.

Sometimes one or two tiling modes stay the same and for those we
specify a canonical version.

Then we have a bunch of parameters on how the compression works.
Different HW units have different requirements for these and we
actually have some conflicts here.

e.g. the render backends need a specific alignment but the display
unit only works with unaligned compression surfaces. To work around
that we have a DCC_RETILE option where both an aligned and unaligned
compression surface are allocated and a writer has to sync the
aligned surface to the unaligned surface on handoff.

Finally there are some GPU parameters that participate in the tiling
equations. These are constant for each GPU on the rendering/texturing
side. The display unit is very flexible however and supports all
of them :|

Some estimates:
 - Single GPU, render+texture: ~10 modifiers
 - All possible configs in a gen, display: ~1000 modifiers
 - Configs of actually existing GPUs in a gen: ~100 modifiers

For formats with a single plane everything gets put in a separate
DRM plane. However, this doesn't fit for some YUV formats, so if
the format has >1 plane, we let the driver pack the surfaces into
1 DRM plane per format plane.

This way we avoid X11 rendering onto the frontbuffer with DCC, but
still fit into 4 DRM planes.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6176>
2020-11-13 03:27:28 +00:00
..
android_stub android_stub: Update platform headers to include gralloc1.h. 2020-10-19 18:41:50 +00:00
c11 Correct a typo in threads_win32.h 2020-08-08 12:55:33 +00:00
CL CL: update CL headers to 3.0 2020-11-06 17:02:54 +10:00
D3D9 st/nine: Change a few advertised caps 2019-03-09 13:57:49 +01:00
d3dadapter st/nine: skip position checks in SetCursorPosition() 2019-04-20 13:06:29 +02:00
drm-uapi drm-uapi: Add AMD modifiers. 2020-11-13 03:27:28 +00:00
EGL Add EGL xcb platform 2020-11-12 16:39:47 +00:00
GL dri: introduce createImageFromDmaBufs3 2020-11-02 10:15:47 +01:00
GLES include: update GL headers from the registry 2019-06-21 19:00:52 -04:00
GLES2 include/GLES2: Sync GLES2 headers with Khronos 2019-10-08 13:53:01 -07:00
GLES3 include: update GL headers from the registry 2019-06-21 19:00:52 -04:00
HaikuGL GL: drop symbols mangling support 2019-10-10 21:40:48 +01:00
KHR EGL: sync headers with Khronos 2019-08-14 21:48:23 +01:00
pci_ids intel/dev: Add device info for ADL-S 2020-10-27 20:42:38 +00:00
vulkan vulkan: Update XML and headers to 1.2.158 2020-10-19 19:38:35 +00:00
c11_compat.h introduce c11_compat.h to provide C11 things in C99 2019-08-04 11:14:25 +01:00
c99_alloca.h c99_alloca.h: Also use <alloca.h> for cygwin 2015-03-07 18:18:32 +00:00
c99_compat.h c99_compat.h: Don't try to use 'restrict' in C++ code 2019-10-16 13:45:57 +01:00
c99_math.h math: Import isinf and others to global namespace 2016-04-18 11:10:25 +01:00
meson.build ci: Include enough Android headers to let us compile test EGL 2020-08-05 18:08:07 +00:00
no_extern_c.h no_extern_c.h: fix typo in comment 2020-05-21 14:23:41 +00:00