Overhaul of GLSL API functions, dispatching, etc.
This commit is contained in:
@@ -444,3 +444,22 @@ _mesa_clone_parameter_list(const struct gl_program_parameter_list *list)
|
||||
|
||||
return clone;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Find longest name of any parameter in list.
|
||||
*/
|
||||
GLuint
|
||||
_mesa_parameter_longest_name(const struct gl_program_parameter_list *list)
|
||||
{
|
||||
GLuint i, maxLen = 0;
|
||||
if (!list)
|
||||
return 0;
|
||||
for (i = 0; i < list->NumParameters; i++) {
|
||||
GLuint len = _mesa_strlen(list->Parameters[i].Name);
|
||||
if (len > maxLen)
|
||||
maxLen = len;
|
||||
}
|
||||
return maxLen;
|
||||
}
|
||||
|
||||
|
@@ -115,9 +115,11 @@ _mesa_lookup_parameter_index(const struct gl_program_parameter_list *paramList,
|
||||
GLsizei nameLen, const char *name);
|
||||
|
||||
extern GLboolean
|
||||
_mesa_lookup_parameter_constant(const struct gl_program_parameter_list *paramList,
|
||||
_mesa_lookup_parameter_constant(const struct gl_program_parameter_list *list,
|
||||
const GLfloat v[], GLsizei vSize,
|
||||
GLint *posOut, GLuint *swizzleOut);
|
||||
|
||||
extern GLuint
|
||||
_mesa_parameter_longest_name(const struct gl_program_parameter_list *list);
|
||||
|
||||
#endif /* PROG_PARAMETER_H */
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -31,6 +31,13 @@
|
||||
#include "mtypes.h"
|
||||
|
||||
|
||||
/**
|
||||
* Internal functions
|
||||
*/
|
||||
|
||||
extern void
|
||||
_mesa_init_shader_state(GLcontext * ctx);
|
||||
|
||||
extern struct gl_linked_program *
|
||||
_mesa_new_linked_program(GLcontext *ctx, GLuint name);
|
||||
|
||||
@@ -52,8 +59,108 @@ extern struct gl_program *
|
||||
_mesa_lookup_shader(GLcontext *ctx, GLuint name);
|
||||
|
||||
|
||||
extern GLvoid
|
||||
_mesa_init_shaderobjects(GLcontext * ctx);
|
||||
/**
|
||||
* API/Driver functions
|
||||
*/
|
||||
|
||||
extern void
|
||||
_mesa_attach_shader(GLcontext *ctx, GLuint program, GLuint shader);
|
||||
|
||||
extern void
|
||||
_mesa_bind_attrib_location(GLcontext *ctx, GLuint program, GLuint index,
|
||||
const GLchar *name);
|
||||
|
||||
extern void
|
||||
_mesa_compile_shader(GLcontext *ctx, GLuint shaderObj);
|
||||
|
||||
extern GLuint
|
||||
_mesa_create_shader(GLcontext *ctx, GLenum type);
|
||||
|
||||
extern GLuint
|
||||
_mesa_create_program(GLcontext *ctx);
|
||||
|
||||
extern void
|
||||
_mesa_delete_program2(GLcontext *ctx, GLuint name);
|
||||
|
||||
extern void
|
||||
_mesa_delete_shader(GLcontext *ctx, GLuint shader);
|
||||
|
||||
extern void
|
||||
_mesa_detach_shader(GLcontext *ctx, GLuint program, GLuint shader);
|
||||
|
||||
extern void
|
||||
_mesa_get_active_attrib(GLcontext *ctx, GLuint program, GLuint index,
|
||||
GLsizei maxLength, GLsizei *length, GLint *size,
|
||||
GLenum *type, GLchar *name);
|
||||
|
||||
extern void
|
||||
_mesa_get_active_uniform(GLcontext *ctx, GLuint program, GLuint index,
|
||||
GLsizei maxLength, GLsizei *length, GLint *size,
|
||||
GLenum *type, GLchar *name);
|
||||
|
||||
extern void
|
||||
_mesa_get_attached_shaders(GLcontext *ctx, GLuint program, GLsizei maxCount,
|
||||
GLsizei *count, GLuint *obj);
|
||||
|
||||
extern GLint
|
||||
_mesa_get_attrib_location(GLcontext *ctx, GLuint program,
|
||||
const GLchar *name);
|
||||
|
||||
extern GLuint
|
||||
_mesa_get_handle(GLcontext *ctx, GLenum pname);
|
||||
|
||||
extern void
|
||||
_mesa_get_programiv(GLcontext *ctx, GLuint program,
|
||||
GLenum pname, GLint *params);
|
||||
|
||||
extern void
|
||||
_mesa_get_program_info_log(GLcontext *ctx, GLuint program, GLsizei bufSize,
|
||||
GLsizei *length, GLchar *infoLog);
|
||||
|
||||
extern void
|
||||
_mesa_get_shaderiv(GLcontext *ctx, GLuint shader, GLenum pname, GLint *params);
|
||||
|
||||
extern void
|
||||
_mesa_get_shader_info_log(GLcontext *ctx, GLuint shader, GLsizei bufSize,
|
||||
GLsizei *length, GLchar *infoLog);
|
||||
|
||||
extern void
|
||||
_mesa_get_shader_source(GLcontext *ctx, GLuint shader, GLsizei maxLength,
|
||||
GLsizei *length, GLchar *sourceOut);
|
||||
|
||||
extern void
|
||||
_mesa_get_uniformfv(GLcontext *ctx, GLuint program, GLint location,
|
||||
GLfloat *params);
|
||||
|
||||
extern GLint
|
||||
_mesa_get_uniform_location(GLcontext *ctx, GLuint program, const GLchar *name);
|
||||
|
||||
extern GLboolean
|
||||
_mesa_is_program(GLcontext *ctx, GLuint name);
|
||||
|
||||
extern GLboolean
|
||||
_mesa_is_shader(GLcontext *ctx, GLuint name);
|
||||
|
||||
extern void
|
||||
_mesa_link_program(GLcontext *ctx, GLuint program);
|
||||
|
||||
extern void
|
||||
_mesa_shader_source(GLcontext *ctx, GLuint shader, const GLchar *source);
|
||||
|
||||
extern void
|
||||
_mesa_uniform(GLcontext *ctx, GLint location, GLsizei count,
|
||||
const GLvoid *values, GLenum type);
|
||||
|
||||
void
|
||||
_mesa_uniform_matrix(GLcontext *ctx, GLint cols, GLint rows,
|
||||
GLenum matrixType, GLint location, GLsizei count,
|
||||
GLboolean transpose, const GLfloat *values);
|
||||
|
||||
extern void
|
||||
_mesa_use_program(GLcontext *ctx, GLuint program);
|
||||
|
||||
extern void
|
||||
_mesa_validate_program(GLcontext *ctx, GLuint program);
|
||||
|
||||
|
||||
#endif /* SHADER_API_H */
|
||||
|
Reference in New Issue
Block a user