summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/shaderapi.c
diff options
context:
space:
mode:
authorKristian Høgsberg <[email protected]>2010-10-12 12:26:10 -0400
committerKristian Høgsberg <[email protected]>2010-10-13 09:43:25 -0400
commitf9995b30756140724f41daf963fa06167912be7f (patch)
treebc34fd4db5eb9d2ad55968cb4e6e4e5a65df5a27 /src/mesa/main/shaderapi.c
parent31aca27c08d6a385c595d34fe4ee06390bf5b0e8 (diff)
Drop GLcontext typedef and use struct gl_context instead
Diffstat (limited to 'src/mesa/main/shaderapi.c')
-rw-r--r--src/mesa/main/shaderapi.c54
1 files changed, 27 insertions, 27 deletions
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index c25d2a19747..9a2a42e50e4 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -89,7 +89,7 @@ get_shader_flags(void)
* Initialize context's shader state.
*/
void
-_mesa_init_shader_state(GLcontext *ctx)
+_mesa_init_shader_state(struct gl_context *ctx)
{
/* Device drivers may override these to control what kind of instructions
* are generated by the GLSL compiler.
@@ -114,7 +114,7 @@ _mesa_init_shader_state(GLcontext *ctx)
* Free the per-context shader-related state.
*/
void
-_mesa_free_shader_state(GLcontext *ctx)
+_mesa_free_shader_state(struct gl_context *ctx)
{
_mesa_reference_shader_program(ctx, &ctx->Shader.CurrentProgram, NULL);
}
@@ -221,7 +221,7 @@ longest_feedback_varying_name(const struct gl_shader_program *shProg)
static GLboolean
-is_program(GLcontext *ctx, GLuint name)
+is_program(struct gl_context *ctx, GLuint name)
{
struct gl_shader_program *shProg = _mesa_lookup_shader_program(ctx, name);
return shProg ? GL_TRUE : GL_FALSE;
@@ -229,7 +229,7 @@ is_program(GLcontext *ctx, GLuint name)
static GLboolean
-is_shader(GLcontext *ctx, GLuint name)
+is_shader(struct gl_context *ctx, GLuint name)
{
struct gl_shader *shader = _mesa_lookup_shader(ctx, name);
return shader ? GL_TRUE : GL_FALSE;
@@ -240,7 +240,7 @@ is_shader(GLcontext *ctx, GLuint name)
* Attach shader to a shader program.
*/
static void
-attach_shader(GLcontext *ctx, GLuint program, GLuint shader)
+attach_shader(struct gl_context *ctx, GLuint program, GLuint shader)
{
struct gl_shader_program *shProg;
struct gl_shader *sh;
@@ -287,7 +287,7 @@ attach_shader(GLcontext *ctx, GLuint program, GLuint shader)
static GLint
-get_attrib_location(GLcontext *ctx, GLuint program, const GLchar *name)
+get_attrib_location(struct gl_context *ctx, GLuint program, const GLchar *name)
{
struct gl_shader_program *shProg
= _mesa_lookup_shader_program_err(ctx, program, "glGetAttribLocation");
@@ -320,7 +320,7 @@ get_attrib_location(GLcontext *ctx, GLuint program, const GLchar *name)
static void
-bind_attrib_location(GLcontext *ctx, GLuint program, GLuint index,
+bind_attrib_location(struct gl_context *ctx, GLuint program, GLuint index,
const GLchar *name)
{
struct gl_shader_program *shProg;
@@ -371,7 +371,7 @@ bind_attrib_location(GLcontext *ctx, GLuint program, GLuint index,
static GLuint
-create_shader(GLcontext *ctx, GLenum type)
+create_shader(struct gl_context *ctx, GLenum type)
{
struct gl_shader *sh;
GLuint name;
@@ -396,7 +396,7 @@ create_shader(GLcontext *ctx, GLenum type)
static GLuint
-create_shader_program(GLcontext *ctx)
+create_shader_program(struct gl_context *ctx)
{
GLuint name;
struct gl_shader_program *shProg;
@@ -418,7 +418,7 @@ create_shader_program(GLcontext *ctx)
* DeleteProgramARB.
*/
static void
-delete_shader_program(GLcontext *ctx, GLuint name)
+delete_shader_program(struct gl_context *ctx, GLuint name)
{
/*
* NOTE: deleting shaders/programs works a bit differently than
@@ -442,7 +442,7 @@ delete_shader_program(GLcontext *ctx, GLuint name)
static void
-delete_shader(GLcontext *ctx, GLuint shader)
+delete_shader(struct gl_context *ctx, GLuint shader)
{
struct gl_shader *sh;
@@ -458,7 +458,7 @@ delete_shader(GLcontext *ctx, GLuint shader)
static void
-detach_shader(GLcontext *ctx, GLuint program, GLuint shader)
+detach_shader(struct gl_context *ctx, GLuint program, GLuint shader)
{
struct gl_shader_program *shProg;
GLuint n;
@@ -526,7 +526,7 @@ detach_shader(GLcontext *ctx, GLuint program, GLuint shader)
static void
-get_active_attrib(GLcontext *ctx, GLuint program, GLuint index,
+get_active_attrib(struct gl_context *ctx, GLuint program, GLuint index,
GLsizei maxLength, GLsizei *length, GLint *size,
GLenum *type, GLchar *nameOut)
{
@@ -561,7 +561,7 @@ get_active_attrib(GLcontext *ctx, GLuint program, GLuint index,
* Return list of shaders attached to shader program.
*/
static void
-get_attached_shaders(GLcontext *ctx, GLuint program, GLsizei maxCount,
+get_attached_shaders(struct gl_context *ctx, GLuint program, GLsizei maxCount,
GLsizei *count, GLuint *obj)
{
struct gl_shader_program *shProg =
@@ -581,7 +581,7 @@ get_attached_shaders(GLcontext *ctx, GLuint program, GLsizei maxCount,
* glGetHandleARB() - return ID/name of currently bound shader program.
*/
static GLuint
-get_handle(GLcontext *ctx, GLenum pname)
+get_handle(struct gl_context *ctx, GLenum pname)
{
if (pname == GL_PROGRAM_OBJECT_ARB) {
if (ctx->Shader.CurrentProgram)
@@ -602,7 +602,7 @@ get_handle(GLcontext *ctx, GLenum pname)
* programs (see glGetProgramivARB).
*/
static void
-get_programiv(GLcontext *ctx, GLuint program, GLenum pname, GLint *params)
+get_programiv(struct gl_context *ctx, GLuint program, GLenum pname, GLint *params)
{
const struct gl_program_parameter_list *attribs;
struct gl_shader_program *shProg
@@ -684,7 +684,7 @@ get_programiv(GLcontext *ctx, GLuint program, GLenum pname, GLint *params)
* glGetShaderiv() - get GLSL shader state
*/
static void
-get_shaderiv(GLcontext *ctx, GLuint name, GLenum pname, GLint *params)
+get_shaderiv(struct gl_context *ctx, GLuint name, GLenum pname, GLint *params)
{
struct gl_shader *shader =
_mesa_lookup_shader_err(ctx, name, "glGetShaderiv");
@@ -717,7 +717,7 @@ get_shaderiv(GLcontext *ctx, GLuint name, GLenum pname, GLint *params)
static void
-get_program_info_log(GLcontext *ctx, GLuint program, GLsizei bufSize,
+get_program_info_log(struct gl_context *ctx, GLuint program, GLsizei bufSize,
GLsizei *length, GLchar *infoLog)
{
struct gl_shader_program *shProg
@@ -731,7 +731,7 @@ get_program_info_log(GLcontext *ctx, GLuint program, GLsizei bufSize,
static void
-get_shader_info_log(GLcontext *ctx, GLuint shader, GLsizei bufSize,
+get_shader_info_log(struct gl_context *ctx, GLuint shader, GLsizei bufSize,
GLsizei *length, GLchar *infoLog)
{
struct gl_shader *sh = _mesa_lookup_shader(ctx, shader);
@@ -747,7 +747,7 @@ get_shader_info_log(GLcontext *ctx, GLuint shader, GLsizei bufSize,
* Return shader source code.
*/
static void
-get_shader_source(GLcontext *ctx, GLuint shader, GLsizei maxLength,
+get_shader_source(struct gl_context *ctx, GLuint shader, GLsizei maxLength,
GLsizei *length, GLchar *sourceOut)
{
struct gl_shader *sh;
@@ -763,7 +763,7 @@ get_shader_source(GLcontext *ctx, GLuint shader, GLsizei maxLength,
* Set/replace shader source code.
*/
static void
-shader_source(GLcontext *ctx, GLuint shader, const GLchar *source)
+shader_source(struct gl_context *ctx, GLuint shader, const GLchar *source)
{
struct gl_shader *sh;
@@ -787,7 +787,7 @@ shader_source(GLcontext *ctx, GLuint shader, const GLchar *source)
* Compile a shader.
*/
static void
-compile_shader(GLcontext *ctx, GLuint shaderObj)
+compile_shader(struct gl_context *ctx, GLuint shaderObj)
{
struct gl_shader *sh;
struct gl_shader_compiler_options *options;
@@ -812,7 +812,7 @@ compile_shader(GLcontext *ctx, GLuint shaderObj)
* Link a program's shaders.
*/
static void
-link_program(GLcontext *ctx, GLuint program)
+link_program(struct gl_context *ctx, GLuint program)
{
struct gl_shader_program *shProg;
struct gl_transform_feedback_object *obj =
@@ -888,7 +888,7 @@ print_shader_info(const struct gl_shader_program *shProg)
* Use the named shader program for subsequent rendering.
*/
void
-_mesa_use_program(GLcontext *ctx, GLuint program)
+_mesa_use_program(struct gl_context *ctx, GLuint program)
{
struct gl_shader_program *shProg;
struct gl_transform_feedback_object *obj =
@@ -943,7 +943,7 @@ _mesa_use_program(GLcontext *ctx, GLuint program)
* \return GL_TRUE if valid, GL_FALSE if invalid
*/
static GLboolean
-validate_samplers(GLcontext *ctx, const struct gl_program *prog, char *errMsg)
+validate_samplers(struct gl_context *ctx, const struct gl_program *prog, char *errMsg)
{
static const char *targetName[] = {
"TEXTURE_2D_ARRAY",
@@ -995,7 +995,7 @@ validate_samplers(GLcontext *ctx, const struct gl_program *prog, char *errMsg)
* \return GL_TRUE if valid, GL_FALSE if invalid (and set errMsg)
*/
static GLboolean
-validate_shader_program(GLcontext *ctx,
+validate_shader_program(struct gl_context *ctx,
const struct gl_shader_program *shProg,
char *errMsg)
{
@@ -1041,7 +1041,7 @@ validate_shader_program(GLcontext *ctx,
* Called via glValidateProgram()
*/
static void
-validate_program(GLcontext *ctx, GLuint program)
+validate_program(struct gl_context *ctx, GLuint program)
{
struct gl_shader_program *shProg;
char errMsg[100];