summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/api_exec.c
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2012-10-19 06:37:09 -0700
committerPaul Berry <[email protected]>2012-10-23 10:24:40 -0700
commit2e0de807513abdeb239ce02177ccbbd6b18af90c (patch)
treeae32b21b5f258c555a672bfa0e78b1bbcdf8a75c /src/mesa/main/api_exec.c
parent5863e3d16e055f63f28e49fdec3b4a3d1c73fe62 (diff)
_mesa_create_exec_table: GLES3 fixes.
This patch sets up the dispatch table for the following GLES3 functions when a GLES3 context is in use: - BeginQuery - BeginTransformFeedback - BindSampler - BindTransformFeedback - BlitFramebuffer - ClearBufferfi - ClearBufferfv - ClearBufferiv - ClearBufferuiv - ClientWaitSync - CopyBufferSubData - DeleteQueries - DeleteSamplers - DeleteSync - DeleteTransformFeedbacks - EndQuery - EndTransformFeedback - FenceSync - FramebufferTextureLayer - GenQueries - GenSamplers - GenTransformFeedbacks - GetInteger64v - GetQueryObjectuiv - GetQueryiv - GetSamplerParameterfv - GetSamplerParameteriv - GetStringi - GetSynciv - GetTransformFeedbackVarying - GetVertexAttribIiv - GetVertexAttribIuiv - IsQuery - IsSampler - IsSync - IsTransformFeedback - PauseTransformFeedback - RenderbufferStorageMultisample - ResumeTransformFeedback - SamplerParameterf - SamplerParameterfv - SamplerParameteri - SamplerParameteriv - TransformFeedbackVaryings - VertexAttribDivisor - VertexAttribIPointer - WaitSync And it avoids setting up the dispatch table for these non-GLES3 functions: - ColorMaski - GetBooleani_v - Enablei - Disablei - IsEnabledi - ClearColorIiEXT - ClearColorIuiEXT - TextureStorage2DEXT - TextureStorage3DEXT - GetActiveUniformName - GetnUniformdv - GetnUniformfv - GetnUniformiv - GetnUniformuiv Reviewed-by: Brian Paul <[email protected]> v2: Make the ctx argument to _mesa_init_transform_feedback_dispatch() a const pointer. Add a comment to remind us to add GetBufferParameteri64v once tests exist for it. Also add VertexAttribDivisor for GLES3, and remove GetActiveUniformName and GetnUniform{dv,fv,iv,uiv} for GLES3. Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/main/api_exec.c')
-rw-r--r--src/mesa/main/api_exec.c36
1 files changed, 20 insertions, 16 deletions
diff --git a/src/mesa/main/api_exec.c b/src/mesa/main/api_exec.c
index 7a000e777db..a670fba43ef 100644
--- a/src/mesa/main/api_exec.c
+++ b/src/mesa/main/api_exec.c
@@ -492,8 +492,8 @@ _mesa_create_exec_table(struct gl_context *ctx)
/* 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 */
@@ -614,15 +614,15 @@ _mesa_create_exec_table(struct gl_context *ctx)
_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);
}
@@ -672,7 +672,7 @@ _mesa_create_exec_table(struct gl_context *ctx)
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);
}
@@ -683,7 +683,7 @@ _mesa_create_exec_table(struct gl_context *ctx)
}
/* 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);
}
@@ -695,7 +695,7 @@ _mesa_create_exec_table(struct gl_context *ctx)
/* 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);
}
@@ -704,7 +704,7 @@ _mesa_create_exec_table(struct gl_context *ctx)
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);
}
@@ -714,9 +714,11 @@ _mesa_create_exec_table(struct gl_context *ctx)
/* 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);
@@ -747,7 +749,7 @@ _mesa_create_exec_table(struct gl_context *ctx)
}
/* 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);
}
@@ -759,14 +761,14 @@ _mesa_create_exec_table(struct gl_context *ctx)
}
/* 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);
@@ -775,7 +777,7 @@ _mesa_create_exec_table(struct gl_context *ctx)
}
/* GL_ARB_instanced_arrays */
- if (ctx->API != API_OPENGLES2) {
+ if (ctx->API != API_OPENGLES2 || _mesa_is_gles3(ctx)) {
SET_VertexAttribDivisorARB(exec, _mesa_VertexAttribDivisor);
}
@@ -805,12 +807,14 @@ _mesa_create_exec_table(struct gl_context *ctx)
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)) {