Commit 819e391a authored by Ian Romanick's avatar Ian Romanick

util: Add wrappers for missing glUniformMatrix functions

Reviewed-by: default avatarChad Versace <chad.versace@intel.com>
parent 73617fa9
......@@ -51,12 +51,21 @@ PFNGLUNIFORM2FVPROC piglit_Uniform2fv = NULL;
PFNGLUNIFORM3FVPROC piglit_Uniform3fv = NULL;
PFNGLUNIFORM4FVPROC piglit_Uniform4fv = NULL;
PFNGLUNIFORM1IPROC piglit_Uniform1i = NULL;
PFNGLUNIFORMMATRIX2FVPROC piglit_UniformMatrix2fv = NULL;
PFNGLUNIFORMMATRIX3FVPROC piglit_UniformMatrix3fv = NULL;
PFNGLUNIFORMMATRIX4FVPROC piglit_UniformMatrix4fv = NULL;
PFNGLGETUNIFORMFVPROC piglit_GetUniformfv = NULL;
PFNGLVERTEXATTRIBPOINTERPROC piglit_VertexAttribPointer = NULL;
PFNGLENABLEVERTEXATTRIBARRAYPROC piglit_EnableVertexAttribArray = NULL;
PFNGLDISABLEVERTEXATTRIBARRAYPROC piglit_DisableVertexAttribArray = NULL;
PFNGLUNIFORMMATRIX2X3FVPROC piglit_UniformMatrix2x3fv = NULL;
PFNGLUNIFORMMATRIX2X4FVPROC piglit_UniformMatrix2x4fv = NULL;
PFNGLUNIFORMMATRIX3X2FVPROC piglit_UniformMatrix3x2fv = NULL;
PFNGLUNIFORMMATRIX3X4FVPROC piglit_UniformMatrix3x4fv = NULL;
PFNGLUNIFORMMATRIX4X2FVPROC piglit_UniformMatrix4x2fv = NULL;
PFNGLUNIFORMMATRIX4X3FVPROC piglit_UniformMatrix4x3fv = NULL;
static void
init_functions_from_core(void)
{
......@@ -80,11 +89,22 @@ init_functions_from_core(void)
piglit_Uniform3fv = glUniform3fv;
piglit_Uniform4fv = glUniform4fv;
piglit_Uniform1i = glUniform1i;
piglit_UniformMatrix2fv = glUniformMatrix2fv;
piglit_UniformMatrix3fv = glUniformMatrix3fv;
piglit_UniformMatrix4fv = glUniformMatrix4fv;
piglit_GetUniformfv = glGetUniformfv;
piglit_VertexAttribPointer = glVertexAttribPointer;
piglit_EnableVertexAttribArray = glEnableVertexAttribArray;
piglit_DisableVertexAttribArray = glDisableVertexAttribArray;
/* These are part of OpenGL 2.1.
*/
piglit_UniformMatrix2x3fv = glUniformMatrix2x3fv;
piglit_UniformMatrix2x4fv = glUniformMatrix2x4fv;
piglit_UniformMatrix3x2fv = glUniformMatrix3x2fv;
piglit_UniformMatrix3x4fv = glUniformMatrix3x4fv;
piglit_UniformMatrix4x2fv = glUniformMatrix4x2fv;
piglit_UniformMatrix4x3fv = glUniformMatrix4x3fv;
}
static void
......@@ -110,6 +130,8 @@ init_functions_from_extension(void)
piglit_Uniform3fv = glUniform3fvARB;
piglit_Uniform4fv = glUniform4fvARB;
piglit_Uniform1i = glUniform1iARB;
piglit_UniformMatrix2fv = glUniformMatrix2fvARB;
piglit_UniformMatrix3fv = glUniformMatrix3fvARB;
piglit_UniformMatrix4fv = glUniformMatrix4fvARB;
piglit_GetUniformfv = glGetUniformfvARB;
piglit_VertexAttribPointer = glVertexAttribPointerARB;
......
......@@ -212,11 +212,19 @@ extern GLint piglit_ARBfp_pass_through;
#define piglit_Uniform3fv glUniform3fv
#define piglit_Uniform4fv glUniform4fv
#define piglit_Uniform1i glUniform1i
#define piglit_UniformMatrix2fv glUniformMatrix2fv
#define piglit_UniformMatrix3fv glUniformMatrix3fv
#define piglit_UniformMatrix4fv glUniformMatrix4fv
#define piglit_GetUniformfv glGetUniformfv
#define piglit_VertexAttribPointer glVertexAttribPointer
#define piglit_EnableVertexAttribArray glEnableVertexAttribArray
#define piglit_DisableVertexAttribArray glDisableVertexAttribArray
#define piglit_UniformMatrix2x3fv assert(!"glUniformMatrix2x3fv does not exist in ES")
#define piglit_UniformMatrix2x4fv assert(!"glUniformMatrix2x4fv does not exist in ES")
#define piglit_UniformMatrix3x2fv assert(!"glUniformMatrix3x2fv does not exist in ES")
#define piglit_UniformMatrix3x4fv assert(!"glUniformMatrix3x4fv does not exist in ES")
#define piglit_UniformMatrix4x2fv assert(!"glUniformMatrix4x2fv does not exist in ES")
#define piglit_UniformMatrix4x3fv assert(!"glUniformMatrix4x3fv does not exist in ES")
#else
extern PFNGLATTACHSHADERPROC piglit_AttachShader;
extern PFNGLBINDATTRIBLOCATIONPROC piglit_BindAttribLocation;
......@@ -238,11 +246,19 @@ extern PFNGLUNIFORM2FVPROC piglit_Uniform2fv;
extern PFNGLUNIFORM3FVPROC piglit_Uniform3fv;
extern PFNGLUNIFORM4FVPROC piglit_Uniform4fv;
extern PFNGLUNIFORM1IPROC piglit_Uniform1i;
extern PFNGLUNIFORMMATRIX2FVPROC piglit_UniformMatrix2fv;
extern PFNGLUNIFORMMATRIX3FVPROC piglit_UniformMatrix3fv;
extern PFNGLUNIFORMMATRIX4FVPROC piglit_UniformMatrix4fv;
extern PFNGLGETUNIFORMFVPROC piglit_GetUniformfv;
extern PFNGLVERTEXATTRIBPOINTERPROC piglit_VertexAttribPointer;
extern PFNGLENABLEVERTEXATTRIBARRAYPROC piglit_EnableVertexAttribArray;
extern PFNGLDISABLEVERTEXATTRIBARRAYPROC piglit_DisableVertexAttribArray;
extern PFNGLUNIFORMMATRIX2X3FVPROC piglit_UniformMatrix2x3fv;
extern PFNGLUNIFORMMATRIX2X4FVPROC piglit_UniformMatrix2x4fv;
extern PFNGLUNIFORMMATRIX3X2FVPROC piglit_UniformMatrix3x2fv;
extern PFNGLUNIFORMMATRIX3X4FVPROC piglit_UniformMatrix3x4fv;
extern PFNGLUNIFORMMATRIX4X2FVPROC piglit_UniformMatrix4x2fv;
extern PFNGLUNIFORMMATRIX4X3FVPROC piglit_UniformMatrix4x3fv;
#endif
/*@}*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment