summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-02-10 01:12:22 +0100
committerMarek Olšák <[email protected]>2017-02-14 21:47:51 +0100
commit5d19b503af41b8ad3d0ca9e2a279dca7106403be (patch)
treeaaef2c679fa260c7f042a38c938713b7de0c20c7
parente0f95ddd3e1217e5710cdd12e733b6440592cc7d (diff)
st/mesa: tell u_vbuf that GL core doesn't have user VBOs
I think this only affects radeonsi - VI, because all other drivers using u_vbuf probably don't support GL_DOUBLE, so they won't be affected by this. Reviewed-by: Nicolai Hähnle <[email protected]>
-rw-r--r--src/mesa/state_tracker/st_context.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c
index 4b9d913f639..f4ad6d8ad16 100644
--- a/src/mesa/state_tracker/st_context.c
+++ b/src/mesa/state_tracker/st_context.c
@@ -76,6 +76,7 @@
#include "pipe/p_context.h"
#include "util/u_inlines.h"
#include "util/u_upload_mgr.h"
+#include "util/u_vbuf.h"
#include "cso_cache/cso_context.h"
@@ -342,7 +343,13 @@ st_create_context_priv( struct gl_context *ctx, struct pipe_context *pipe,
st->has_user_constbuf =
screen->get_param(screen, PIPE_CAP_USER_CONSTANT_BUFFERS);
- st->cso_context = cso_create_context(pipe, 0);
+ /* Drivers still have to upload zero-stride vertex attribs manually
+ * with the GL core profile, but they don't have to deal with any complex
+ * user vertex buffer uploads.
+ */
+ unsigned vbuf_flags =
+ ctx->API == API_OPENGL_CORE ? U_VBUF_FLAG_NO_USER_VBOS : 0;
+ st->cso_context = cso_create_context(pipe, vbuf_flags);
st_init_atoms( st );
st_init_clear(st);