summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/samplerobj.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/samplerobj.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/samplerobj.c')
-rw-r--r--src/mesa/main/samplerobj.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/mesa/main/samplerobj.c b/src/mesa/main/samplerobj.c
index 4514b122421..09cbd2939fa 100644
--- a/src/mesa/main/samplerobj.c
+++ b/src/mesa/main/samplerobj.c
@@ -1444,7 +1444,8 @@ _mesa_init_sampler_object_functions(struct dd_function_table *driver)
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);
@@ -1454,10 +1455,13 @@ _mesa_init_sampler_object_dispatch(struct _glapi_table *disp)
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);
+ }
}