llvmpipe: don't support planar formats for buffers.
authorDave Airlie <airlied@redhat.com>
Tue, 26 Sep 2023 03:11:53 +0000 (13:11 +1000)
committerMarge Bot <emma+marge@anholt.net>
Tue, 10 Oct 2023 04:37:06 +0000 (04:37 +0000)
This stops lavapipe exposing incorrect support.

Cc: mesa-stable
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25609>

src/gallium/drivers/llvmpipe/lp_screen.c

index a3da1cb..80e5050 100644 (file)
@@ -832,7 +832,10 @@ llvmpipe_is_format_supported(struct pipe_screen *_screen,
        format != PIPE_FORMAT_ETC1_RGB8)
       return false;
 
-   if (format_desc->layout == UTIL_FORMAT_LAYOUT_SUBSAMPLED && target == PIPE_BUFFER)
+   if ((format_desc->layout == UTIL_FORMAT_LAYOUT_SUBSAMPLED ||
+        format_desc->layout == UTIL_FORMAT_LAYOUT_PLANAR2 ||
+        format_desc->layout == UTIL_FORMAT_LAYOUT_PLANAR3) &&
+       target == PIPE_BUFFER)
       return false;
 
    /*