From 63b33120b7ae2598d4cacfa5e5b95476d0295acd Mon Sep 17 00:00:00 2001 From: Paul Cercueil Date: Fri, 22 Nov 2019 23:23:36 +0100 Subject: u_vbuf: Return true in u_vbuf_get_caps if nb of vbufs is below minimum MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: --- src/gallium/auxiliary/util/u_vbuf.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') 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 || -- cgit v1.2.3