virgl: Don't support QUADS natively
authorGert Wollny <gert.wollny@collabora.com>
Thu, 31 Mar 2022 07:23:36 +0000 (09:23 +0200)
committerMarge Bot <emma+marge@anholt.net>
Fri, 1 Apr 2022 11:02:12 +0000 (11:02 +0000)
Using quads leads to a rather expensive buffer readback when quads
are stored in display lists, so avoid them altogether.

Closes: #5825
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Italo Nicola <italonicola@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15683>

src/gallium/drivers/virgl/virgl_screen.c

index ed0898dab02b691c911cc31dcff324d3243009a0..d4024994575cbc30e7222f3b8bf69d2a68478685 100644 (file)
@@ -133,6 +133,10 @@ virgl_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_MAX_STREAM_OUTPUT_SEPARATE_COMPONENTS:
    case PIPE_CAP_MAX_STREAM_OUTPUT_INTERLEAVED_COMPONENTS:
       return 16*4;
+   case PIPE_CAP_SUPPORTED_PRIM_MODES:
+      return BITFIELD_MASK(PIPE_PRIM_MAX) &
+            ~BITFIELD_BIT(PIPE_PRIM_QUADS) &
+            ~BITFIELD_BIT(PIPE_PRIM_QUAD_STRIP);
    case PIPE_CAP_PRIMITIVE_RESTART:
    case PIPE_CAP_PRIMITIVE_RESTART_FIXED_INDEX:
       return vscreen->caps.caps.v1.bset.primitive_restart;