From: Paul Cercueil Date: Fri, 22 Nov 2019 22:23:36 +0000 (+0100) Subject: u_vbuf: Return true in u_vbuf_get_caps if nb of vbufs is below minimum X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=63b33120b7ae2598d4cacfa5e5b95476d0295acd;p=mesa.git u_vbuf: Return true in u_vbuf_get_caps if nb of vbufs is below minimum Return true in u_vbuf_get_caps if the number of vertex buffers is below the minimum required for proper OpenGL 2.0. Signed-off-by: Paul Cercueil Reviewed-by: Marek Olšák Tested-by: Marge Bot Part-of: --- diff --git a/src/gallium/auxiliary/util/u_vbuf.c b/src/gallium/auxiliary/util/u_vbuf.c index 8ad6346d547..a8b57aafed3 100644 --- a/src/gallium/auxiliary/util/u_vbuf.c +++ b/src/gallium/auxiliary/util/u_vbuf.c @@ -91,6 +91,7 @@ #include "util/format/u_format.h" #include "util/u_inlines.h" #include "util/u_memory.h" +#include "util/u_screen.h" #include "util/u_upload_mgr.h" #include "translate/translate.h" #include "translate/translate_cache.h" @@ -292,6 +293,10 @@ boolean u_vbuf_get_caps(struct pipe_screen *screen, struct u_vbuf_caps *caps, caps->max_vertex_buffers = screen->get_param(screen, PIPE_CAP_MAX_VERTEX_BUFFERS); + /* OpenGL 2.0 requires a minimum of 16 vertex buffers */ + if (caps->max_vertex_buffers < 16) + fallback = TRUE; + if (!caps->buffer_offset_unaligned || !caps->buffer_stride_unaligned || !caps->velem_src_offset_unaligned ||