mesa/src
Robert Mader 758941ab0c v3d: Support SAND128 base modifier
The BROADCOM_SAND128 modifier is usually used with an extra parameter
to pass in the stride via a side channel. Quoting from drm_fourcc.h:
> The pitch between the start of each column is set to optimally
> switch between SDRAM banks. This is passed as the number of lines
> of column width in the modifier (we can't use the stride value due
> to various core checks that look at it , so you should set the
> stride to width*cpp).

So apparently this is just a workaround for limitations in some kernel
APIs. DRM modifiers, however, are arguably a bad fit for extra
parameters that aren't known in advance. In the Wayland/KMS ecosystem
many components depend on being able to treat modifiers as opaque, e.g.
for negotiations etc. In practice the current approach requires various
software components to manually use the
`DRM_FORMAT_MOD_BROADCOM_SAND128_COL_HEIGHT()` macro - using the
`DRM_FORMAT_MOD_BROADCOM_SAND128` modifier directly with formats like
`NV12` results in a rejection in the KMS driver and corrupted output
in Mesa (because we'd bail out early in `v3d_sand8_blit()`).

Fortunately the stride check limitations mentioned above don't seem to
apply to Mesa though. Thus we can just add support for the base modifier
and stride (coming from V4L2), allowing various toolkits, Wayland
compositors and V4L2 decoder implementations to support e.g.
`NV12` + `DRM_FORMAT_MOD_BROADCOM_SAND128` (`NC12` in V4L2) in a generic
way.

Notes:
1. Wayland compositors trying to offload composition to KMS will still
fail when doing a test commit.
2. There is another limitation - in the V4L2 MPLANE API - that
requires userspace to know the correct offset of the second plane. That's
a known API limitation though and only affects V4L2 decoder implementations.

Cc: mesa-stable
Signed-off-by: Robert Mader <robert.mader@collabora.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32033>
2024-11-15 11:09:02 +00:00
..
amd radv: consider VK_PIPELINE_STAGE_2_NONE like BOTTOM_OF_PIPE 2024-11-15 08:22:23 +00:00
android_stub vulkan/android: Add helper to probe AHB support 2024-05-14 14:53:44 +00:00
asahi nir_lower_mem_access_bit_sizes: pass access to callback 2024-11-13 12:59:26 +00:00
broadcom rpi4/ci: another detected flaky timeline_semaphore test 2024-11-15 10:48:54 +00:00
c11 build: pass licensing information in SPDX form 2024-06-29 12:42:49 -07:00
compiler compiler/rust: drop duplicated bindgen check 2024-11-14 20:12:31 +00:00
drm-shim drm-shim: stub synobj_timeline_wait and query ioctl 2024-07-16 11:17:59 +02:00
egl vulkan/wsi/wayland: Pace frames with commit-timing-v1 2024-11-07 00:03:23 +00:00
etnaviv etnaviv/ci: Update expectations for the NPU in the A311D 2024-11-13 07:39:35 +00:00
freedreno turnip/ci: document regression 2024-11-13 17:14:06 +00:00
gallium v3d: Support SAND128 base modifier 2024-11-15 11:09:02 +00:00
gbm gbm/dri: Fix color format for big endian. 2024-10-25 14:18:24 +00:00
getopt build: pass licensing information in SPDX form 2024-06-29 12:42:49 -07:00
gfxstream gfxstream: use canonical Mesa dependencies 2024-11-12 19:21:10 +00:00
glx glx: Fix the GLX_EXT_swap_control_tear drawable attributes 2024-10-23 19:55:53 +00:00
gtest build: pass licensing information in SPDX form 2024-06-29 12:42:49 -07:00
imagination pvr: Make Vulkan driver depend only on nir headers, not library 2024-10-23 16:47:34 +00:00
imgui
intel intel/fs/xe2: Fix up subdword integer region restriction with strided byte src and packed byte dst. 2024-11-15 07:39:33 +00:00
loader loader: Fix typo in __DRI_IMAGE_FORMAT_XBGR16161616 definition 2024-10-25 14:18:24 +00:00
mapi meson: remove selinux option 2024-10-21 01:14:35 +00:00
mesa st/mesa: implement key->persample_shading for lowered IO 2024-11-06 15:51:51 +00:00
microsoft nir_lower_mem_access_bit_sizes: pass access to callback 2024-11-13 12:59:26 +00:00
nouveau nir_lower_mem_access_bit_sizes: pass access to callback 2024-11-13 12:59:26 +00:00
panfrost panvk: Enable storageBuffer16BitAccess 2024-11-15 10:28:08 +00:00
tool perfetto: Add Panfrost data sources to system.cfg 2024-08-22 18:33:45 +00:00
util util: Fixed crash in HEVC encoding on 32-bit systems 2024-11-15 09:51:39 +00:00
virtio virgl: Propagate the GL_MAX_stage_SHADER_STORAGE_BLOCKS for each stage 2024-11-08 12:26:06 +00:00
vulkan vulkan: include host write in expanded dst access flags 2024-11-14 19:29:00 +00:00
x11 meson: require dri3 modifiers 2024-09-06 17:34:17 +00:00
.clang-format panfrost: Move ForEachMacros into panfrost 2024-09-12 20:04:58 +00:00
meson.build mesa: add gfxstream-experimental to -Dvulkan-drivers 2024-09-19 20:06:04 +00:00