summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/uniforms.c
diff options
context:
space:
mode:
authorGregory Hainaut <[email protected]>2013-05-03 19:44:10 +0200
committerIan Romanick <[email protected]>2014-03-25 10:25:25 -0700
commitc03477050a6f51e601f75cb3c061a3e16a5b7171 (patch)
treea39b3a0ad845e232612a6dbb305083e585f643bb /src/mesa/main/uniforms.c
parentb2bddaf7a000bf9830a7947b18d8e31fb25353ae (diff)
mesa/sso: rename Shader to the pointer _Shader
Basically a sed but shaderapi.c and get.c. get.c => GL_CURRENT_PROGAM always refer to the "old" UseProgram behavior shaderapi.c => the old api stil update the Shader object directly V2: formatting improvement V3 (idr): * Rebase fixes after a block of code was moved from ir_to_mesa.cpp to shaderapi.c. * Trivial reformatting. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/main/uniforms.c')
-rw-r--r--src/mesa/main/uniforms.c66
1 files changed, 33 insertions, 33 deletions
diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c
index e9b374b0da5..1daade42838 100644
--- a/src/mesa/main/uniforms.c
+++ b/src/mesa/main/uniforms.c
@@ -137,7 +137,7 @@ void GLAPIENTRY
_mesa_Uniform1f(GLint location, GLfloat v0)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, &v0, GL_FLOAT);
+ _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, 1, &v0, GL_FLOAT);
}
void GLAPIENTRY
@@ -147,7 +147,7 @@ _mesa_Uniform2f(GLint location, GLfloat v0, GLfloat v1)
GLfloat v[2];
v[0] = v0;
v[1] = v1;
- _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_FLOAT_VEC2);
+ _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, 1, v, GL_FLOAT_VEC2);
}
void GLAPIENTRY
@@ -158,7 +158,7 @@ _mesa_Uniform3f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2)
v[0] = v0;
v[1] = v1;
v[2] = v2;
- _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_FLOAT_VEC3);
+ _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, 1, v, GL_FLOAT_VEC3);
}
void GLAPIENTRY
@@ -171,14 +171,14 @@ _mesa_Uniform4f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2,
v[1] = v1;
v[2] = v2;
v[3] = v3;
- _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_FLOAT_VEC4);
+ _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, 1, v, GL_FLOAT_VEC4);
}
void GLAPIENTRY
_mesa_Uniform1i(GLint location, GLint v0)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, &v0, GL_INT);
+ _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, 1, &v0, GL_INT);
}
void GLAPIENTRY
@@ -188,7 +188,7 @@ _mesa_Uniform2i(GLint location, GLint v0, GLint v1)
GLint v[2];
v[0] = v0;
v[1] = v1;
- _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_INT_VEC2);
+ _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, 1, v, GL_INT_VEC2);
}
void GLAPIENTRY
@@ -199,7 +199,7 @@ _mesa_Uniform3i(GLint location, GLint v0, GLint v1, GLint v2)
v[0] = v0;
v[1] = v1;
v[2] = v2;
- _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_INT_VEC3);
+ _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, 1, v, GL_INT_VEC3);
}
void GLAPIENTRY
@@ -211,63 +211,63 @@ _mesa_Uniform4i(GLint location, GLint v0, GLint v1, GLint v2, GLint v3)
v[1] = v1;
v[2] = v2;
v[3] = v3;
- _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_INT_VEC4);
+ _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, 1, v, GL_INT_VEC4);
}
void GLAPIENTRY
_mesa_Uniform1fv(GLint location, GLsizei count, const GLfloat * value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_FLOAT);
+ _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, count, value, GL_FLOAT);
}
void GLAPIENTRY
_mesa_Uniform2fv(GLint location, GLsizei count, const GLfloat * value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_FLOAT_VEC2);
+ _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, count, value, GL_FLOAT_VEC2);
}
void GLAPIENTRY
_mesa_Uniform3fv(GLint location, GLsizei count, const GLfloat * value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_FLOAT_VEC3);
+ _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, count, value, GL_FLOAT_VEC3);
}
void GLAPIENTRY
_mesa_Uniform4fv(GLint location, GLsizei count, const GLfloat * value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_FLOAT_VEC4);
+ _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, count, value, GL_FLOAT_VEC4);
}
void GLAPIENTRY
_mesa_Uniform1iv(GLint location, GLsizei count, const GLint * value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_INT);
+ _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, count, value, GL_INT);
}
void GLAPIENTRY
_mesa_Uniform2iv(GLint location, GLsizei count, const GLint * value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_INT_VEC2);
+ _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, count, value, GL_INT_VEC2);
}
void GLAPIENTRY
_mesa_Uniform3iv(GLint location, GLsizei count, const GLint * value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_INT_VEC3);
+ _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, count, value, GL_INT_VEC3);
}
void GLAPIENTRY
_mesa_Uniform4iv(GLint location, GLsizei count, const GLint * value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_INT_VEC4);
+ _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, count, value, GL_INT_VEC4);
}
/** Same as above with direct state access **/
@@ -467,7 +467,7 @@ void GLAPIENTRY
_mesa_Uniform1ui(GLint location, GLuint v0)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, &v0, GL_UNSIGNED_INT);
+ _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, 1, &v0, GL_UNSIGNED_INT);
}
void GLAPIENTRY
@@ -477,7 +477,7 @@ _mesa_Uniform2ui(GLint location, GLuint v0, GLuint v1)
GLuint v[2];
v[0] = v0;
v[1] = v1;
- _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_UNSIGNED_INT_VEC2);
+ _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, 1, v, GL_UNSIGNED_INT_VEC2);
}
void GLAPIENTRY
@@ -488,7 +488,7 @@ _mesa_Uniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2)
v[0] = v0;
v[1] = v1;
v[2] = v2;
- _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_UNSIGNED_INT_VEC3);
+ _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, 1, v, GL_UNSIGNED_INT_VEC3);
}
void GLAPIENTRY
@@ -500,35 +500,35 @@ _mesa_Uniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
v[1] = v1;
v[2] = v2;
v[3] = v3;
- _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_UNSIGNED_INT_VEC4);
+ _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, 1, v, GL_UNSIGNED_INT_VEC4);
}
void GLAPIENTRY
_mesa_Uniform1uiv(GLint location, GLsizei count, const GLuint *value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_UNSIGNED_INT);
+ _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, count, value, GL_UNSIGNED_INT);
}
void GLAPIENTRY
_mesa_Uniform2uiv(GLint location, GLsizei count, const GLuint *value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_UNSIGNED_INT_VEC2);
+ _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, count, value, GL_UNSIGNED_INT_VEC2);
}
void GLAPIENTRY
_mesa_Uniform3uiv(GLint location, GLsizei count, const GLuint *value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_UNSIGNED_INT_VEC3);
+ _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, count, value, GL_UNSIGNED_INT_VEC3);
}
void GLAPIENTRY
_mesa_Uniform4uiv(GLint location, GLsizei count, const GLuint *value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_UNSIGNED_INT_VEC4);
+ _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, count, value, GL_UNSIGNED_INT_VEC4);
}
@@ -538,7 +538,7 @@ _mesa_UniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose,
const GLfloat * value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
+ _mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram,
2, 2, location, count, transpose, value);
}
@@ -547,7 +547,7 @@ _mesa_UniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose,
const GLfloat * value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
+ _mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram,
3, 3, location, count, transpose, value);
}
@@ -556,7 +556,7 @@ _mesa_UniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose,
const GLfloat * value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
+ _mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram,
4, 4, location, count, transpose, value);
}
@@ -703,7 +703,7 @@ _mesa_UniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose,
const GLfloat *value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
+ _mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram,
2, 3, location, count, transpose, value);
}
@@ -712,7 +712,7 @@ _mesa_UniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose,
const GLfloat *value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
+ _mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram,
3, 2, location, count, transpose, value);
}
@@ -721,7 +721,7 @@ _mesa_UniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose,
const GLfloat *value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
+ _mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram,
2, 4, location, count, transpose, value);
}
@@ -730,7 +730,7 @@ _mesa_UniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose,
const GLfloat *value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
+ _mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram,
4, 2, location, count, transpose, value);
}
@@ -739,7 +739,7 @@ _mesa_UniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose,
const GLfloat *value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
+ _mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram,
3, 4, location, count, transpose, value);
}
@@ -748,7 +748,7 @@ _mesa_UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose,
const GLfloat *value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
+ _mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram,
4, 3, location, count, transpose, value);
}