llvmpipe: reject unsupported shader-image formats
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Mon, 31 May 2021 15:43:45 +0000 (17:43 +0200)
committerMarge Bot <eric+marge@anholt.net>
Mon, 12 Jul 2021 16:15:06 +0000 (16:15 +0000)
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10467>

src/gallium/drivers/llvmpipe/lp_screen.c

index acf3e5d..6146b12 100644 (file)
@@ -649,7 +649,7 @@ llvmpipe_is_format_supported( struct pipe_screen *_screen,
    if (MAX2(1, sample_count) != MAX2(1, storage_sample_count))
       return false;
 
-   if (bind & PIPE_BIND_RENDER_TARGET) {
+   if (bind & (PIPE_BIND_RENDER_TARGET | PIPE_BIND_SHADER_IMAGE)) {
       if (format_desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB) {
          /* this is a lie actually other formats COULD exist where we would fail */
          if (format_desc->nr_channels < 3)