gbm: Add USE_FRONT_RENDERING flag

Provide a use flag to let the driver know that the allocated buffer will
be used for frontbuffer rendering.  For example, bandwidth compressed
formats should usually be avoided for frontbuffer rendering to avoid the
visual corruption that results from this display racing with the GPU
writing header data vs. pixel data.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17799>
This commit is contained in:
Rob Clark
2022-07-28 14:04:27 -07:00
committed by Marge Bot
parent 126e83d970
commit 0c6d4cf9a2
5 changed files with 14 additions and 0 deletions

View File

@@ -1224,6 +1224,7 @@ struct __DRIdri2ExtensionRec {
#define __DRI_IMAGE_USE_BACKBUFFER 0x0010
#define __DRI_IMAGE_USE_PROTECTED 0x0020
#define __DRI_IMAGE_USE_PRIME_BUFFER 0x0040
#define __DRI_IMAGE_USE_FRONT_RENDERING 0x0080
#define __DRI_IMAGE_TRANSFER_READ 0x1