virgl: Remove formats with unusual sample count.
authorLepton Wu <lepton@chromium.org>
Mon, 16 Sep 2019 03:05:44 +0000 (20:05 -0700)
committerLepton Wu <lepton@chromium.org>
Thu, 24 Oct 2019 23:11:08 +0000 (23:11 +0000)
Most GPU require the sample count is power of 2. Just remove those
formats with unusual sample count. This decreases dEQP EGL tests run
time a lot.

Signed-off-by: Lepton Wu <lepton@chromium.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/gallium/drivers/virgl/virgl_screen.c

index 13e5bf57d07a4c05ddb6bfa141081d7acda6f184..bfa42b5910295aa18f245fa1fc090a7ce508e023 100644 (file)
@@ -659,6 +659,9 @@ virgl_is_format_supported( struct pipe_screen *screen,
    if (MAX2(1, sample_count) != MAX2(1, storage_sample_count))
       return false;
 
+   if (!util_is_power_of_two_or_zero(sample_count))
+      return false;
+
    assert(target == PIPE_BUFFER ||
           target == PIPE_TEXTURE_1D ||
           target == PIPE_TEXTURE_1D_ARRAY ||