summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/shaderapi.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2010-10-28 21:17:41 -0600
committerBrian Paul <[email protected]>2010-10-28 21:17:41 -0600
commit53eca8d21627a82e88a81e2255654e81f9858221 (patch)
tree7e52eb1f9dab6b043de8b5c724e6b6be18ed29ec /src/mesa/main/shaderapi.c
parenta6fb2acfdbae273857ee0aceccbf5671539c769f (diff)
mesa: plug in stubs for glBindFragDataLocation(), glGetFragDataLocation()
Diffstat (limited to 'src/mesa/main/shaderapi.c')
-rw-r--r--src/mesa/main/shaderapi.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index e6c7f7aa3f8..622285debb3 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -404,6 +404,14 @@ bind_attrib_location(struct gl_context *ctx, GLuint program, GLuint index,
}
+static void
+bind_frag_data_location(struct gl_context *ctx, GLuint program,
+ GLuint colorNumber, const GLchar *name)
+{
+ _mesa_problem(ctx, "bind_frag_data_location() not implemented yet");
+}
+
+
static GLuint
create_shader(struct gl_context *ctx, GLenum type)
{
@@ -605,6 +613,16 @@ get_attached_shaders(struct gl_context *ctx, GLuint program, GLsizei maxCount,
}
+static GLint
+get_frag_data_location(struct gl_context *ctx, GLuint program,
+ const GLchar *name)
+{
+ _mesa_problem(ctx, "get_frag_data_location() not implemented yet");
+ return -1;
+}
+
+
+
/**
* glGetHandleARB() - return ID/name of currently bound shader program.
*/
@@ -1185,6 +1203,16 @@ _mesa_BindAttribLocationARB(GLhandleARB program, GLuint index,
}
+/* GL_EXT_gpu_shader4, GL3 */
+void GLAPIENTRY
+_mesa_BindFragDataLocation(GLuint program, GLuint colorNumber,
+ const GLchar *name)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ bind_frag_data_location(ctx, program, colorNumber, name);
+}
+
+
void GLAPIENTRY
_mesa_CompileShaderARB(GLhandleARB shaderObj)
{
@@ -1315,6 +1343,16 @@ _mesa_GetAttribLocationARB(GLhandleARB program, const GLcharARB * name)
}
+/* GL_EXT_gpu_shader4, GL3 */
+GLint GLAPIENTRY
+_mesa_GetFragDataLocation(GLuint program, const GLchar *name)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ return get_frag_data_location(ctx, program, name);
+}
+
+
+
void GLAPIENTRY
_mesa_GetInfoLogARB(GLhandleARB object, GLsizei maxLength, GLsizei * length,
GLcharARB * infoLog)
@@ -1842,6 +1880,11 @@ _mesa_init_shader_dispatch(struct _glapi_table *exec)
SET_UseShaderProgramEXT(exec, _mesa_UseShaderProgramEXT);
SET_ActiveProgramEXT(exec, _mesa_ActiveProgramEXT);
SET_CreateShaderProgramEXT(exec, _mesa_CreateShaderProgramEXT);
+
+ /* GL_EXT_gpu_shader4 / GL 3.0 */
+ SET_BindFragDataLocationEXT(exec, _mesa_BindFragDataLocation);
+ SET_GetFragDataLocationEXT(exec, _mesa_GetFragDataLocation);
+
#endif /* FEATURE_GL */
}