diff options
author | Paul Cercueil <[email protected]> | 2019-11-22 23:23:36 +0100 |
---|---|---|
committer | Marge Bot <[email protected]> | 2019-12-21 18:29:30 +0000 |
commit | 63b33120b7ae2598d4cacfa5e5b95476d0295acd (patch) | |
tree | 99c69cd0bb782faef68d761c4869e0fdf718efb4 /src/gallium/auxiliary | |
parent | c6ef79c488bb5fffde31e7065fd3e575f3c25fb5 (diff) |
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 <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2807>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2807>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r-- | src/gallium/auxiliary/util/u_vbuf.c | 5 |
1 files changed, 5 insertions, 0 deletions
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 || |