summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2020-04-16 10:30:16 -0700
committerMarge Bot <[email protected]>2020-04-23 04:49:52 +0000
commitb88778e2de3a593587e20a8d4f0363a499f91455 (patch)
treed7fae8ed68d335e28d1ebf60d571df69fe2f5bab /src/mesa
parent7e1b57a6d964ac58e84ec4ece2951e4e643d6b1a (diff)
mesa/st: avoid u_vbuf for GLES
64b VBO types are not required for GLES. So avoid u_vbuf if that was otherwise the only reason it was used. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4619>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_context.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c
index 0a6e9951a1d..4f7fd242741 100644
--- a/src/mesa/state_tracker/st_context.c
+++ b/src/mesa/state_tracker/st_context.c
@@ -592,8 +592,20 @@ st_create_context_priv(struct gl_context *ctx, struct pipe_context *pipe,
* profile, so that u_vbuf is bypassed completely if there is nothing else
* to do.
*/
- unsigned cso_flags =
- ctx->API == API_OPENGL_CORE ? CSO_NO_USER_VERTEX_BUFFERS : 0;
+ unsigned cso_flags;
+ switch (ctx->API) {
+ case API_OPENGL_CORE:
+ cso_flags = CSO_NO_USER_VERTEX_BUFFERS;
+ break;
+ case API_OPENGLES:
+ case API_OPENGLES2:
+ cso_flags = CSO_NO_64B_VERTEX_BUFFERS;
+ break;
+ default:
+ cso_flags = 0;
+ break;
+ }
+
st->cso_context = cso_create_context(pipe, cso_flags);
st_init_atoms(st);