gallium: add hook on getting canonical format
authorJuan A. Suarez Romero <jasuarez@igalia.com>
Wed, 13 Apr 2022 18:06:21 +0000 (20:06 +0200)
committerMarge Bot <emma+marge@anholt.net>
Tue, 19 Apr 2022 08:03:42 +0000 (08:03 +0000)
commit606e42027e61aa759eb7ac69403e13816f8ccde1
tree4783c5068684f73425509ad4f733423de5a72b4e
parent21bfbc74eea000b9768371a12f5edc20bed715ae
gallium: add hook on getting canonical format

On swizzled copies canonical formats are used to reduce the formats to a
simpler subset.

Nevertheless, it is possible that some of the canonical formats defined
in Gallium are actually not supported by the drivers themselves.

This provides a driver-defined hook that can be used to provide an
alternative canonical format in case the canonical one defined by
Gallium is not supported by the driver.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15693>
src/gallium/include/pipe/p_context.h
src/mesa/state_tracker/st_cb_copyimage.c