aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/shaderapi.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-11-07 08:02:14 +0100
committermarha <marha@users.sourceforge.net>2012-11-07 08:02:14 +0100
commit2c345c9da4dedfafe791557ca3fcf891ce26249d (patch)
tree18dc73394bd3921415b57b5847f03a9753374e99 /mesalib/src/mesa/main/shaderapi.c
parent7c531937cfab42f2fd3233c096c409ebdd5b59af (diff)
parent1cc98f5a48924d750fbef7ea6b05a1ba49c28589 (diff)
downloadvcxsrv-2c345c9da4dedfafe791557ca3fcf891ce26249d.tar.gz
vcxsrv-2c345c9da4dedfafe791557ca3fcf891ce26249d.tar.bz2
vcxsrv-2c345c9da4dedfafe791557ca3fcf891ce26249d.zip
Merge remote-tracking branch 'origin/released'
* origin/released: xserver mesa xkbcomp git update 5 nov 2012 Conflicts: mesalib/src/glsl/.gitignore mesalib/src/mesa/main/.gitignore xorg-server/Xi/chgdctl.c xorg-server/dix/getevents.c xorg-server/hw/xwin/winprefs.c xorg-server/os/utils.c
Diffstat (limited to 'mesalib/src/mesa/main/shaderapi.c')
-rw-r--r--mesalib/src/mesa/main/shaderapi.c76
1 files changed, 39 insertions, 37 deletions
diff --git a/mesalib/src/mesa/main/shaderapi.c b/mesalib/src/mesa/main/shaderapi.c
index d40a35376..9376b0f42 100644
--- a/mesalib/src/mesa/main/shaderapi.c
+++ b/mesalib/src/mesa/main/shaderapi.c
@@ -1692,7 +1692,7 @@ _mesa_init_shader_dispatch(const struct gl_context *ctx,
{
#if FEATURE_GL
/* GL_ARB_vertex/fragment_shader */
- if (ctx->API != API_OPENGLES2) {
+ if (_mesa_is_desktop_gl(ctx)) {
SET_DeleteObjectARB(exec, _mesa_DeleteObjectARB);
SET_GetHandleARB(exec, _mesa_GetHandleARB);
SET_DetachObjectARB(exec, _mesa_DetachObjectARB);
@@ -1705,56 +1705,58 @@ _mesa_init_shader_dispatch(const struct gl_context *ctx,
SET_GetAttachedObjectsARB(exec, _mesa_GetAttachedObjectsARB);
}
- SET_ShaderSourceARB(exec, _mesa_ShaderSourceARB);
- SET_CompileShaderARB(exec, _mesa_CompileShaderARB);
- SET_LinkProgramARB(exec, _mesa_LinkProgramARB);
- SET_UseProgramObjectARB(exec, _mesa_UseProgramObjectARB);
- SET_ValidateProgramARB(exec, _mesa_ValidateProgramARB);
- SET_GetShaderSourceARB(exec, _mesa_GetShaderSourceARB);
-
- /* OpenGL 2.0 */
- SET_AttachShader(exec, _mesa_AttachShader);
- SET_CreateProgram(exec, _mesa_CreateProgram);
- SET_CreateShader(exec, _mesa_CreateShader);
- SET_DeleteProgram(exec, _mesa_DeleteProgram);
- SET_DeleteShader(exec, _mesa_DeleteShader);
- SET_DetachShader(exec, _mesa_DetachShader);
- SET_GetAttachedShaders(exec, _mesa_GetAttachedShaders);
- SET_GetProgramiv(exec, _mesa_GetProgramiv);
- SET_GetProgramInfoLog(exec, _mesa_GetProgramInfoLog);
- SET_GetShaderiv(exec, _mesa_GetShaderiv);
- SET_GetShaderInfoLog(exec, _mesa_GetShaderInfoLog);
- SET_IsProgram(exec, _mesa_IsProgram);
- SET_IsShader(exec, _mesa_IsShader);
-
- /* GL_ARB_vertex_shader */
- SET_BindAttribLocationARB(exec, _mesa_BindAttribLocationARB);
- SET_GetActiveAttribARB(exec, _mesa_GetActiveAttribARB);
- SET_GetAttribLocationARB(exec, _mesa_GetAttribLocationARB);
-
- if (ctx->API != API_OPENGLES2) {
- SET_ProgramParameteriARB(exec, _mesa_ProgramParameteriARB);
-
+ if (ctx->API != API_OPENGLES) {
+ SET_ShaderSourceARB(exec, _mesa_ShaderSourceARB);
+ SET_CompileShaderARB(exec, _mesa_CompileShaderARB);
+ SET_LinkProgramARB(exec, _mesa_LinkProgramARB);
+ SET_UseProgramObjectARB(exec, _mesa_UseProgramObjectARB);
+ SET_ValidateProgramARB(exec, _mesa_ValidateProgramARB);
+ SET_GetShaderSourceARB(exec, _mesa_GetShaderSourceARB);
+
+ /* OpenGL 2.0 */
+ SET_AttachShader(exec, _mesa_AttachShader);
+ SET_CreateProgram(exec, _mesa_CreateProgram);
+ SET_CreateShader(exec, _mesa_CreateShader);
+ SET_DeleteProgram(exec, _mesa_DeleteProgram);
+ SET_DeleteShader(exec, _mesa_DeleteShader);
+ SET_DetachShader(exec, _mesa_DetachShader);
+ SET_GetAttachedShaders(exec, _mesa_GetAttachedShaders);
+ SET_GetProgramiv(exec, _mesa_GetProgramiv);
+ SET_GetProgramInfoLog(exec, _mesa_GetProgramInfoLog);
+ SET_GetShaderiv(exec, _mesa_GetShaderiv);
+ SET_GetShaderInfoLog(exec, _mesa_GetShaderInfoLog);
+ SET_IsProgram(exec, _mesa_IsProgram);
+ SET_IsShader(exec, _mesa_IsShader);
+
+ /* GL_ARB_vertex_shader */
+ SET_BindAttribLocationARB(exec, _mesa_BindAttribLocationARB);
+ SET_GetActiveAttribARB(exec, _mesa_GetActiveAttribARB);
+ SET_GetAttribLocationARB(exec, _mesa_GetAttribLocationARB);
+ }
+
+ if (ctx->API == API_OPENGL) {
SET_UseShaderProgramEXT(exec, _mesa_UseShaderProgramEXT);
SET_ActiveProgramEXT(exec, _mesa_ActiveProgramEXT);
SET_CreateShaderProgramEXT(exec, _mesa_CreateShaderProgramEXT);
}
/* GL_EXT_gpu_shader4 / GL 3.0 */
- if (ctx->API != API_OPENGLES2) {
+ if (_mesa_is_desktop_gl(ctx)) {
SET_BindFragDataLocationEXT(exec, _mesa_BindFragDataLocation);
}
- if (ctx->API != API_OPENGLES2 || _mesa_is_gles3(ctx)) {
+ if (_mesa_is_desktop_gl(ctx) || _mesa_is_gles3(ctx)) {
SET_GetFragDataLocationEXT(exec, _mesa_GetFragDataLocation);
}
/* GL_ARB_ES2_compatibility */
- SET_ReleaseShaderCompiler(exec, _mesa_ReleaseShaderCompiler);
- SET_GetShaderPrecisionFormat(exec, _mesa_GetShaderPrecisionFormat);
- SET_ShaderBinary(exec, _mesa_ShaderBinary);
+ if (ctx->API != API_OPENGLES) {
+ SET_ReleaseShaderCompiler(exec, _mesa_ReleaseShaderCompiler);
+ SET_GetShaderPrecisionFormat(exec, _mesa_GetShaderPrecisionFormat);
+ SET_ShaderBinary(exec, _mesa_ShaderBinary);
+ }
/* GL_ARB_blend_func_extended */
- if (ctx->API != API_OPENGLES2) {
+ if (_mesa_is_desktop_gl(ctx)) {
SET_BindFragDataLocationIndexed(exec, _mesa_BindFragDataLocationIndexed);
SET_GetFragDataIndex(exec, _mesa_GetFragDataIndex);
}