mesa/src
James Jones 129d83cac2 nouveau: Use format modifiers in buffer allocation
The nvc0 nouveau backend already claimed to support format modifiers, but
in practice it ignored them when allocating buffers outside of a
perfunctory check for the linear modifier in the first element of the
format modifier list.

This change deduces the supported modifiers, if any, for a given miptree
creation request, prioritizes them based on performance and memory waste
properties, compares the requested modifiers against the prioritized list
of supported modifiers, and overrides the internal layout calculations
based on the layout defined by the resulting modifier.

Additionally, if modifiers are provided and none are compatible with the
miptree creation request, the function now fails.  This brings the nouveau
behavior in line with other drivers such as i965 and etnaviv.

Signed-off-by: James Jones <jajones@nvidia.com>
Tested-by: Karol Herbst <kherbst@redhat.com>
Tested-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3724>
2021-02-17 03:52:53 +00:00
..
amd radv: Do pipe misalignment check per plane. 2021-02-16 13:04:09 +00:00
android_stub egl/android: implement image cleanup callback 2020-12-15 06:05:27 +00:00
broadcom broadcom/compiler: Merge instructions more efficiently 2021-02-16 11:46:31 +00:00
compiler spirv: Delete the impl for prototype-only functions 2021-02-16 20:50:51 +00:00
drm-shim drm-shim: report support for timeline semaphores 2021-02-09 21:08:52 +00:00
egl egl/dri2: enable EGL_WL_bind_wayland_display in EGL device platform 2021-01-28 00:30:10 +00:00
etnaviv etnaviv, v3d: Fix valgrind include paths. 2020-12-15 19:39:29 +00:00
freedreno freedreno/ir3: Use gl_varying_slot_name_for_stage() 2021-02-13 00:44:53 +00:00
gallium nouveau: Use format modifiers in buffer allocation 2021-02-17 03:52:53 +00:00
gbm egl: implement EGL_EXT_protected_surface support 2020-11-02 10:15:47 +01:00
getopt
glx glx: Fix GLX_SGI_video_sync for the no-current-drawable case 2021-02-10 21:10:04 +00:00
gtest
hgl hgl: Major refactor and cleanup 2021-01-09 20:51:35 -06:00
imgui
intel intel/nir: Lower 8-bit phis on Gen11+ 2021-02-16 16:36:31 +00:00
loader loader: Print dlerror() output in the failure message 2020-11-04 21:45:37 +00:00
mapi glapi: guard against invalid XML definitions for glthread 2021-01-29 02:28:42 +00:00
mesa mesa: add debug code to catch missing _mesa_update_valid_to_render_state calls 2021-02-15 19:29:09 +00:00
microsoft microsoft/clc: Add test with inline function 2021-02-16 22:11:21 +00:00
nouveau nouveau: add drm-shim support 2021-01-11 22:45:01 +00:00
panfrost pan/bi: Use the correct size for UBO loads 2021-02-16 13:14:30 +00:00
util util/format: add helper to check if a format is scaled. 2021-02-16 05:31:11 +00:00
virtio virgl: update headers 2021-02-16 16:09:14 +00:00
vulkan meson: invalid keyword argument dependencies 2021-02-16 11:35:32 +00:00
meson.build nouveau: add drm-shim support 2021-01-11 22:45:01 +00:00
SConscript