virgl: do not allow compressed formats for buffers
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Fri, 29 Mar 2019 09:48:33 +0000 (10:48 +0100)
committerErik Faye-Lund <erik.faye-lund@collabora.com>
Tue, 2 Apr 2019 07:48:45 +0000 (07:48 +0000)
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
src/gallium/drivers/virgl/virgl_screen.c

index 33ebd9324f5f2175b64bb6e894b8b9a84e98119e..e2b2712d942527cc709f6052c83b9c6373c4d2f2 100644 (file)
@@ -615,6 +615,9 @@ virgl_is_format_supported( struct pipe_screen *screen,
       return virgl_is_vertex_format_supported(screen, format);
    }
 
+   if (util_format_is_compressed(format) && target == PIPE_BUFFER)
+      return FALSE;
+
    /* Allow 3-comp 32 bit textures only for TBOs (needed for ARB_tbo_rgb32) */
    if ((format == PIPE_FORMAT_R32G32B32_FLOAT ||
        format == PIPE_FORMAT_R32G32B32_SINT ||