summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_context.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/state_tracker/st_context.c')
-rw-r--r--src/mesa/state_tracker/st_context.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c
index 5fcb6b9dcf..e8a3926e6d 100644
--- a/src/mesa/state_tracker/st_context.c
+++ b/src/mesa/state_tracker/st_context.c
@@ -64,6 +64,7 @@
#include "pipe/p_context.h"
#include "util/u_inlines.h"
#include "util/u_rect.h"
+#include "util/u_surface.h"
#include "draw/draw_context.h"
#include "cso_cache/cso_context.h"
@@ -199,7 +200,16 @@ struct st_context *st_create_context(struct pipe_context *pipe,
memset(&funcs, 0, sizeof(funcs));
st_init_driver_functions(&funcs);
- ctx = _mesa_create_context(visual, shareCtx, &funcs, NULL);
+#if FEATURE_GL
+ ctx = _mesa_create_context_for_api(API_OPENGL,
+ visual, shareCtx, &funcs, NULL);
+#elif FEATURE_ES1
+ ctx = _mesa_create_context_for_api(API_OPENGLES,
+ visual, shareCtx, &funcs, NULL);
+#elif FEATURE_ES2
+ ctx = _mesa_create_context_for_api(API_OPENGLES2,
+ visual, shareCtx, &funcs, NULL);
+#endif
/* XXX: need a capability bit in gallium to query if the pipe
* driver prefers DP4 or MUL/MAD for vertex transformation.