From 4326c5460de6bf3119ea4c33390dc432f200f500 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 8 Feb 2021 10:24:25 +1000 Subject: [PATCH] llvmpipe: don't support scaled formats outside vertex buffers Scaled formats are usually only needed as vertex buffer formats, don't expose them as supported for other things. Lavapipe will use this to export the correct formats support. Reviewed-by: Adam Jackson Reviewed-by: Roland Scheidegger Part-of: --- src/gallium/drivers/llvmpipe/lp_screen.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c index b2672c58367..ce487b75b61 100644 --- a/src/gallium/drivers/llvmpipe/lp_screen.c +++ b/src/gallium/drivers/llvmpipe/lp_screen.c @@ -678,6 +678,10 @@ llvmpipe_is_format_supported( struct pipe_screen *_screen, } } + if (!(bind & PIPE_BIND_VERTEX_BUFFER) && + util_format_is_scaled(format)) + return false; + if (bind & PIPE_BIND_DISPLAY_TARGET) { if(!winsys->is_displaytarget_format_supported(winsys, bind, format)) return false; -- 2.34.1