/* 352. GL_EXT_transform_feedback */
/* ARB 93. GL_ARB_transform_feedback2 */
- if (ctx->API != API_OPENGLES2) {
- _mesa_init_transform_feedback_dispatch(exec);
+ if (ctx->API != API_OPENGLES2 || _mesa_is_gles3(ctx)) {
+ _mesa_init_transform_feedback_dispatch(ctx, exec);
}
/* 364. GL_EXT_provoking_vertex */
_mesa_init_bufferobj_dispatch(ctx, exec);
/* ARB 29. GL_ARB_occlusion_query */
- if (ctx->API != API_OPENGLES2) {
- _mesa_init_queryobj_dispatch(exec);
+ if (ctx->API != API_OPENGLES2 || _mesa_is_gles3(ctx)) {
+ _mesa_init_queryobj_dispatch(ctx, exec);
}
/* ARB 37. GL_ARB_draw_buffers */
SET_DrawBuffersARB(exec, _mesa_DrawBuffersARB);
/* ARB 66. GL_ARB_sync */
- if (ctx->API != API_OPENGLES2) {
+ if (ctx->API != API_OPENGLES2 || _mesa_is_gles3(ctx)) {
_mesa_init_sync_dispatch(exec);
}
SET_GetFramebufferAttachmentParameterivEXT(exec, _mesa_GetFramebufferAttachmentParameterivEXT);
SET_GenerateMipmapEXT(exec, _mesa_GenerateMipmapEXT);
- if (ctx->API != API_OPENGLES2) {
+ if (ctx->API != API_OPENGLES2 || _mesa_is_gles3(ctx)) {
SET_BlitFramebufferEXT(exec, _mesa_BlitFramebufferEXT);
}
}
/* GL_MESA_texture_array / GL_EXT_texture_array */
- if (ctx->API != API_OPENGLES2) {
+ if (ctx->API != API_OPENGLES2 || _mesa_is_gles3(ctx)) {
SET_FramebufferTextureLayerEXT(exec, _mesa_FramebufferTextureLayerEXT);
}
/* The ARB_fbo functions are the union of
* GL_EXT_fbo, GL_EXT_framebuffer_blit, GL_EXT_texture_array
*/
- if (ctx->API != API_OPENGLES2) {
+ if (ctx->API != API_OPENGLES2 || _mesa_is_gles3(ctx)) {
SET_RenderbufferStorageMultisample(exec, _mesa_RenderbufferStorageMultisample);
}
SET_FlushMappedBufferRange(exec, _mesa_FlushMappedBufferRange);
/* GL_ARB_copy_buffer */
- if (ctx->API != API_OPENGLES2) {
+ if (ctx->API != API_OPENGLES2 || _mesa_is_gles3(ctx)) {
SET_CopyBufferSubData(exec, _mesa_CopyBufferSubData);
}
/* GL_EXT_draw_buffers2 */
if (_mesa_is_desktop_gl(ctx) || _mesa_is_gles3(ctx)) {
+ SET_GetIntegerIndexedvEXT(exec, _mesa_GetIntegerIndexedv);
+ }
+ if (_mesa_is_desktop_gl(ctx)) {
SET_ColorMaskIndexedEXT(exec, _mesa_ColorMaskIndexed);
SET_GetBooleanIndexedvEXT(exec, _mesa_GetBooleanIndexedv);
- SET_GetIntegerIndexedvEXT(exec, _mesa_GetIntegerIndexedv);
SET_EnableIndexedEXT(exec, _mesa_EnableIndexed);
SET_DisableIndexedEXT(exec, _mesa_DisableIndexed);
SET_IsEnabledIndexedEXT(exec, _mesa_IsEnabledIndexed);
}
/* GL_EXT_texture_integer */
- if (_mesa_is_desktop_gl(ctx) || _mesa_is_gles3(ctx)) {
+ if (_mesa_is_desktop_gl(ctx)) {
SET_ClearColorIiEXT(exec, _mesa_ClearColorIiEXT);
SET_ClearColorIuiEXT(exec, _mesa_ClearColorIuiEXT);
}
}
/* GL_EXT_gpu_shader4 / OpenGL 3.0 */
- if (ctx->API != API_OPENGLES2) {
+ if (ctx->API != API_OPENGLES2 || _mesa_is_gles3(ctx)) {
SET_GetVertexAttribIivEXT(exec, _mesa_GetVertexAttribIiv);
SET_GetVertexAttribIuivEXT(exec, _mesa_GetVertexAttribIuiv);
SET_VertexAttribIPointerEXT(exec, _mesa_VertexAttribIPointer);
}
/* GL 3.0 (functions not covered by other extensions) */
- if (ctx->API != API_OPENGLES2) {
+ if (ctx->API != API_OPENGLES2 || _mesa_is_gles3(ctx)) {
SET_ClearBufferiv(exec, _mesa_ClearBufferiv);
SET_ClearBufferuiv(exec, _mesa_ClearBufferuiv);
SET_ClearBufferfv(exec, _mesa_ClearBufferfv);
}
/* GL_ARB_instanced_arrays */
- if (ctx->API != API_OPENGLES2) {
+ if (ctx->API != API_OPENGLES2 || _mesa_is_gles3(ctx)) {
SET_VertexAttribDivisorARB(exec, _mesa_VertexAttribDivisor);
}
if (_mesa_is_desktop_gl(ctx) || _mesa_is_gles3(ctx)) {
SET_TexStorage2D(exec, _mesa_TexStorage2D);
SET_TexStorage3D(exec, _mesa_TexStorage3D);
+ }
+ if (_mesa_is_desktop_gl(ctx)) {
SET_TextureStorage2DEXT(exec, _mesa_TextureStorage2DEXT);
SET_TextureStorage3DEXT(exec, _mesa_TextureStorage3DEXT);
}
- if (ctx->API != API_OPENGLES2) {
- _mesa_init_sampler_object_dispatch(exec);
+ if (ctx->API != API_OPENGLES2 || _mesa_is_gles3(ctx)) {
+ _mesa_init_sampler_object_dispatch(ctx, exec);
}
if (_mesa_is_desktop_gl(ctx)) {
SET_DeleteBuffersARB(disp, _mesa_DeleteBuffersARB);
SET_GenBuffersARB(disp, _mesa_GenBuffersARB);
SET_GetBufferParameterivARB(disp, _mesa_GetBufferParameterivARB);
+ /* TODO: add GetBufferParameteri64v for desktop GL and GLES3 once tests
+ * exist for it.
+ */
SET_GetBufferPointervARB(disp, _mesa_GetBufferPointervARB);
if (ctx->API != API_OPENGLES2) {
SET_GetBufferSubDataARB(disp, _mesa_GetBufferSubDataARB);
SET_MapBufferARB(table, _mesa_MapBufferARB);
SET_UnmapBufferARB(table, _mesa_UnmapBufferARB);
- _mesa_init_queryobj_dispatch(table); /* glGetQuery, etc */
+ _mesa_init_queryobj_dispatch(ctx, table); /* glGetQuery, etc */
SET_BeginQueryARB(table, save_BeginQueryARB);
SET_EndQueryARB(table, save_EndQueryARB);
SET_QueryCounter(table, save_QueryCounter);
SET_TextureBarrierNV(table, save_TextureBarrierNV);
/* GL_ARB_sampler_objects */
- _mesa_init_sampler_object_dispatch(table); /* plug in Gen/Get/etc functions */
+ _mesa_init_sampler_object_dispatch(ctx, table); /* plug in Gen/Get/etc functions */
SET_BindSampler(table, save_BindSampler);
SET_SamplerParameteri(table, save_SamplerParameteri);
SET_SamplerParameterf(table, save_SamplerParameterf);
void
-_mesa_init_queryobj_dispatch(struct _glapi_table *disp)
+_mesa_init_queryobj_dispatch(const struct gl_context *ctx,
+ struct _glapi_table *disp)
{
SET_GenQueriesARB(disp, _mesa_GenQueriesARB);
SET_DeleteQueriesARB(disp, _mesa_DeleteQueriesARB);
SET_BeginQueryARB(disp, _mesa_BeginQueryARB);
SET_EndQueryARB(disp, _mesa_EndQueryARB);
SET_GetQueryivARB(disp, _mesa_GetQueryivARB);
- SET_GetQueryObjectivARB(disp, _mesa_GetQueryObjectivARB);
SET_GetQueryObjectuivARB(disp, _mesa_GetQueryObjectuivARB);
- SET_QueryCounter(disp, _mesa_QueryCounter);
- SET_GetQueryObjecti64vEXT(disp, _mesa_GetQueryObjecti64vEXT);
- SET_GetQueryObjectui64vEXT(disp, _mesa_GetQueryObjectui64vEXT);
+ if (_mesa_is_desktop_gl(ctx)) {
+ SET_GetQueryObjectivARB(disp, _mesa_GetQueryObjectivARB);
+ SET_QueryCounter(disp, _mesa_QueryCounter);
- SET_BeginQueryIndexed(disp, _mesa_BeginQueryIndexed);
- SET_EndQueryIndexed(disp, _mesa_EndQueryIndexed);
- SET_GetQueryIndexediv(disp, _mesa_GetQueryIndexediv);
+ SET_GetQueryObjecti64vEXT(disp, _mesa_GetQueryObjecti64vEXT);
+ SET_GetQueryObjectui64vEXT(disp, _mesa_GetQueryObjectui64vEXT);
+
+ SET_BeginQueryIndexed(disp, _mesa_BeginQueryIndexed);
+ SET_EndQueryIndexed(disp, _mesa_EndQueryIndexed);
+ SET_GetQueryIndexediv(disp, _mesa_GetQueryIndexediv);
+ }
}
_mesa_init_query_object_functions(struct dd_function_table *driver);
extern void
-_mesa_init_queryobj_dispatch(struct _glapi_table *disp);
+_mesa_init_queryobj_dispatch(const struct gl_context *ctx,
+ struct _glapi_table *disp);
extern void
_mesa_init_queryobj(struct gl_context *ctx);
void
-_mesa_init_sampler_object_dispatch(struct _glapi_table *disp)
+_mesa_init_sampler_object_dispatch(const struct gl_context *ctx,
+ struct _glapi_table *disp)
{
SET_GenSamplers(disp, _mesa_GenSamplers);
SET_DeleteSamplers(disp, _mesa_DeleteSamplers);
SET_SamplerParameterf(disp, _mesa_SamplerParameterf);
SET_SamplerParameteriv(disp, _mesa_SamplerParameteriv);
SET_SamplerParameterfv(disp, _mesa_SamplerParameterfv);
- SET_SamplerParameterIiv(disp, _mesa_SamplerParameterIiv);
- SET_SamplerParameterIuiv(disp, _mesa_SamplerParameterIuiv);
SET_GetSamplerParameteriv(disp, _mesa_GetSamplerParameteriv);
SET_GetSamplerParameterfv(disp, _mesa_GetSamplerParameterfv);
- SET_GetSamplerParameterIiv(disp, _mesa_GetSamplerParameterIiv);
- SET_GetSamplerParameterIuiv(disp, _mesa_GetSamplerParameterIuiv);
+
+ if (_mesa_is_desktop_gl(ctx)) {
+ SET_SamplerParameterIiv(disp, _mesa_SamplerParameterIiv);
+ SET_SamplerParameterIuiv(disp, _mesa_SamplerParameterIuiv);
+ SET_GetSamplerParameterIiv(disp, _mesa_GetSamplerParameterIiv);
+ SET_GetSamplerParameterIuiv(disp, _mesa_GetSamplerParameterIuiv);
+ }
}
_mesa_init_sampler_object_functions(struct dd_function_table *driver);
extern void
-_mesa_init_sampler_object_dispatch(struct _glapi_table *disp);
+_mesa_init_sampler_object_dispatch(const struct gl_context *ctx,
+ struct _glapi_table *disp);
extern void GLAPIENTRY
_mesa_BindSampler(GLuint unit, GLuint sampler);
void
-_mesa_init_transform_feedback_dispatch(struct _glapi_table *disp)
+_mesa_init_transform_feedback_dispatch(const struct gl_context *ctx,
+ struct _glapi_table *disp)
{
/* EXT_transform_feedback */
SET_BeginTransformFeedbackEXT(disp, _mesa_BeginTransformFeedback);
SET_EndTransformFeedbackEXT(disp, _mesa_EndTransformFeedback);
- SET_BindBufferOffsetEXT(disp, _mesa_BindBufferOffsetEXT);
+ if (_mesa_is_desktop_gl(ctx)) {
+ SET_BindBufferOffsetEXT(disp, _mesa_BindBufferOffsetEXT);
+ }
SET_TransformFeedbackVaryingsEXT(disp, _mesa_TransformFeedbackVaryings);
SET_GetTransformFeedbackVaryingEXT(disp, _mesa_GetTransformFeedbackVarying);
/* ARB_transform_feedback2 */
_mesa_init_transform_feedback_functions(struct dd_function_table *driver);
extern void
-_mesa_init_transform_feedback_dispatch(struct _glapi_table *disp);
+_mesa_init_transform_feedback_dispatch(const struct gl_context *ctx,
+ struct _glapi_table *disp);
/*** GL_EXT_transform_feedback ***/
SET_Uniform4uivEXT(exec, _mesa_Uniform4uiv);
SET_GetUniformuivEXT(exec, _mesa_GetUniformuiv);
- /* GL_ARB_robustness */
- SET_GetnUniformfvARB(exec, _mesa_GetnUniformfvARB);
- SET_GetnUniformivARB(exec, _mesa_GetnUniformivARB);
- SET_GetnUniformuivARB(exec, _mesa_GetnUniformuivARB);
- SET_GetnUniformdvARB(exec, _mesa_GetnUniformdvARB); /* GL 4.0 */
-
/* GL_ARB_uniform_buffer_object / GL 3.1 */
SET_GetUniformBlockIndex(exec, _mesa_GetUniformBlockIndex);
SET_GetUniformIndices(exec, _mesa_GetUniformIndices);
SET_GetActiveUniformsiv(exec, _mesa_GetActiveUniformsiv);
SET_GetActiveUniformBlockiv(exec, _mesa_GetActiveUniformBlockiv);
SET_GetActiveUniformBlockName(exec, _mesa_GetActiveUniformBlockName);
- SET_GetActiveUniformName(exec, _mesa_GetActiveUniformName);
SET_UniformBlockBinding(exec, _mesa_UniformBlockBinding);
}
+
+ if (_mesa_is_desktop_gl(ctx)) {
+ /* GL_ARB_robustness */
+ SET_GetnUniformfvARB(exec, _mesa_GetnUniformfvARB);
+ SET_GetnUniformivARB(exec, _mesa_GetnUniformivARB);
+ SET_GetnUniformuivARB(exec, _mesa_GetnUniformuivARB);
+ SET_GetnUniformdvARB(exec, _mesa_GetnUniformdvARB);
+
+ /* GL_ARB_uniform_buffer_object / GL 3.1 */
+ SET_GetActiveUniformName(exec, _mesa_GetActiveUniformName);
+ }
#endif /* FEATURE_GL */
}