Mesa (master): llvmpipe: don't support scaled formats outside vertex buffers

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Feb 16 05:47:48 UTC 2021


Module: Mesa
Branch: master
Commit: 4326c5460de6bf3119ea4c33390dc432f200f500
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=4326c5460de6bf3119ea4c33390dc432f200f500

Author: Dave Airlie <airlied at redhat.com>
Date:   Mon Feb  8 10:24:25 2021 +1000

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 <ajax at redhat.com>
Reviewed-by: Roland Scheidegger <sroland at vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8907>

---

 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;



More information about the mesa-commit mailing list