summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/shaderobjects.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/shader/shaderobjects.c')
-rw-r--r--src/mesa/shader/shaderobjects.c99
1 files changed, 57 insertions, 42 deletions
diff --git a/src/mesa/shader/shaderobjects.c b/src/mesa/shader/shaderobjects.c
index 4c4fdcfe550..ad55b7448c5 100644
--- a/src/mesa/shader/shaderobjects.c
+++ b/src/mesa/shader/shaderobjects.c
@@ -343,34 +343,13 @@ _mesa_ValidateProgramARB (GLhandleARB programObj)
}
}
-/*
-Errors TODO
-
- The error INVALID_OPERATION is generated by the Uniform*ARB if the
- number of values loaded results in exceeding the declared extent of a
- uniform.
-
- The error INVALID_OPERATION is generated by the Uniform*ARB commands if
- the size does not match the size of the uniform declared in the shader.
-
- The error INVALID_OPERATION is generated by the Uniform*ARB commands if
- the type does not match the type of the uniform declared in the shader,
- if the uniform is not of type Boolean.
-
- The error INVALID_OPERATION is generated by the Uniform*ARB commands if
- <location> does not exist for the program object currently in use.
-
- The error INVALID_OPERATION is generated if a uniform command other than
- Uniform1i{v}ARB is used to load a sampler value.
-
-
-*/
-
GLvoid GLAPIENTRY
_mesa_Uniform1fARB (GLint location, GLfloat v0)
{
GET_CURRENT_CONTEXT(ctx);
- GET_CURRENT_LINKED_PROGRAM(pro, "glUniform1fARB");
+ GET_CURRENT_LINKED_PROGRAM(pro, "glUniform1fARB");
+
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM);
if (pro != NULL)
{
@@ -383,7 +362,9 @@ GLvoid GLAPIENTRY
_mesa_Uniform2fARB (GLint location, GLfloat v0, GLfloat v1)
{
GET_CURRENT_CONTEXT(ctx);
- GET_CURRENT_LINKED_PROGRAM(pro, "glUniform2fARB");
+ GET_CURRENT_LINKED_PROGRAM(pro, "glUniform2fARB");
+
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM);
if (pro != NULL)
{
@@ -398,7 +379,9 @@ GLvoid GLAPIENTRY
_mesa_Uniform3fARB (GLint location, GLfloat v0, GLfloat v1, GLfloat v2)
{
GET_CURRENT_CONTEXT(ctx);
- GET_CURRENT_LINKED_PROGRAM(pro, "glUniform3fARB");
+ GET_CURRENT_LINKED_PROGRAM(pro, "glUniform3fARB");
+
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM);
if (pro != NULL)
{
@@ -413,7 +396,9 @@ GLvoid GLAPIENTRY
_mesa_Uniform4fARB (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3)
{
GET_CURRENT_CONTEXT(ctx);
- GET_CURRENT_LINKED_PROGRAM(pro, "glUniform4fARB");
+ GET_CURRENT_LINKED_PROGRAM(pro, "glUniform4fARB");
+
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM);
if (pro != NULL)
{
@@ -428,7 +413,9 @@ GLvoid GLAPIENTRY
_mesa_Uniform1iARB (GLint location, GLint v0)
{
GET_CURRENT_CONTEXT(ctx);
- GET_CURRENT_LINKED_PROGRAM(pro, "glUniform1iARB");
+ GET_CURRENT_LINKED_PROGRAM(pro, "glUniform1iARB");
+
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM);
if (pro != NULL)
{
@@ -441,7 +428,9 @@ GLvoid GLAPIENTRY
_mesa_Uniform2iARB (GLint location, GLint v0, GLint v1)
{
GET_CURRENT_CONTEXT(ctx);
- GET_CURRENT_LINKED_PROGRAM(pro, "glUniform2iARB");
+ GET_CURRENT_LINKED_PROGRAM(pro, "glUniform2iARB");
+
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM);
if (pro != NULL)
{
@@ -456,7 +445,9 @@ GLvoid GLAPIENTRY
_mesa_Uniform3iARB (GLint location, GLint v0, GLint v1, GLint v2)
{
GET_CURRENT_CONTEXT(ctx);
- GET_CURRENT_LINKED_PROGRAM(pro, "glUniform3iARB");
+ GET_CURRENT_LINKED_PROGRAM(pro, "glUniform3iARB");
+
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM);
if (pro != NULL)
{
@@ -471,7 +462,9 @@ GLvoid GLAPIENTRY
_mesa_Uniform4iARB (GLint location, GLint v0, GLint v1, GLint v2, GLint v3)
{
GET_CURRENT_CONTEXT(ctx);
- GET_CURRENT_LINKED_PROGRAM(pro, "glUniform4iARB");
+ GET_CURRENT_LINKED_PROGRAM(pro, "glUniform4iARB");
+
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM);
if (pro != NULL)
{
@@ -486,7 +479,9 @@ GLvoid GLAPIENTRY
_mesa_Uniform1fvARB (GLint location, GLsizei count, const GLfloat *value)
{
GET_CURRENT_CONTEXT(ctx);
- GET_CURRENT_LINKED_PROGRAM(pro, "glUniform1fvARB");
+ GET_CURRENT_LINKED_PROGRAM(pro, "glUniform1fvARB");
+
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM);
if (pro != NULL)
{
@@ -499,7 +494,9 @@ GLvoid GLAPIENTRY
_mesa_Uniform2fvARB (GLint location, GLsizei count, const GLfloat *value)
{
GET_CURRENT_CONTEXT(ctx);
- GET_CURRENT_LINKED_PROGRAM(pro, "glUniform2fvARB");
+ GET_CURRENT_LINKED_PROGRAM(pro, "glUniform2fvARB");
+
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM);
if (pro != NULL)
{
@@ -512,7 +509,9 @@ GLvoid GLAPIENTRY
_mesa_Uniform3fvARB (GLint location, GLsizei count, const GLfloat *value)
{
GET_CURRENT_CONTEXT(ctx);
- GET_CURRENT_LINKED_PROGRAM(pro, "glUniform3fvARB");
+ GET_CURRENT_LINKED_PROGRAM(pro, "glUniform3fvARB");
+
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM);
if (pro != NULL)
{
@@ -525,7 +524,9 @@ GLvoid GLAPIENTRY
_mesa_Uniform4fvARB (GLint location, GLsizei count, const GLfloat *value)
{
GET_CURRENT_CONTEXT(ctx);
- GET_CURRENT_LINKED_PROGRAM(pro, "glUniform4fvARB");
+ GET_CURRENT_LINKED_PROGRAM(pro, "glUniform4fvARB");
+
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM);
if (pro != NULL)
{
@@ -538,7 +539,9 @@ GLvoid GLAPIENTRY
_mesa_Uniform1ivARB (GLint location, GLsizei count, const GLint *value)
{
GET_CURRENT_CONTEXT(ctx);
- GET_CURRENT_LINKED_PROGRAM(pro, "glUniform1ivARB");
+ GET_CURRENT_LINKED_PROGRAM(pro, "glUniform1ivARB");
+
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM);
if (pro != NULL)
{
@@ -551,7 +554,9 @@ GLvoid GLAPIENTRY
_mesa_Uniform2ivARB (GLint location, GLsizei count, const GLint *value)
{
GET_CURRENT_CONTEXT(ctx);
- GET_CURRENT_LINKED_PROGRAM(pro, "glUniform2ivARB");
+ GET_CURRENT_LINKED_PROGRAM(pro, "glUniform2ivARB");
+
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM);
if (pro != NULL)
{
@@ -564,7 +569,9 @@ GLvoid GLAPIENTRY
_mesa_Uniform3ivARB (GLint location, GLsizei count, const GLint *value)
{
GET_CURRENT_CONTEXT(ctx);
- GET_CURRENT_LINKED_PROGRAM(pro, "glUniform3ivARB");
+ GET_CURRENT_LINKED_PROGRAM(pro, "glUniform3ivARB");
+
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM);
if (pro != NULL)
{
@@ -577,7 +584,9 @@ GLvoid GLAPIENTRY
_mesa_Uniform4ivARB (GLint location, GLsizei count, const GLint *value)
{
GET_CURRENT_CONTEXT(ctx);
- GET_CURRENT_LINKED_PROGRAM(pro, "glUniform4ivARB");
+ GET_CURRENT_LINKED_PROGRAM(pro, "glUniform4ivARB");
+
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM);
if (pro != NULL)
{
@@ -590,7 +599,9 @@ GLvoid GLAPIENTRY
_mesa_UniformMatrix2fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
{
GET_CURRENT_CONTEXT(ctx);
- GET_CURRENT_LINKED_PROGRAM(pro, "glUniformMatrix2fvARB");
+ GET_CURRENT_LINKED_PROGRAM(pro, "glUniformMatrix2fvARB");
+
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM);
if (pro != NULL)
{
@@ -628,7 +639,9 @@ GLvoid GLAPIENTRY
_mesa_UniformMatrix3fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
{
GET_CURRENT_CONTEXT(ctx);
- GET_CURRENT_LINKED_PROGRAM(pro, "glUniformMatrix3fvARB");
+ GET_CURRENT_LINKED_PROGRAM(pro, "glUniformMatrix3fvARB");
+
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM);
if (pro != NULL)
{
@@ -671,7 +684,9 @@ GLvoid GLAPIENTRY
_mesa_UniformMatrix4fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
{
GET_CURRENT_CONTEXT(ctx);
- GET_CURRENT_LINKED_PROGRAM(pro, "glUniformMatrix4fvARB");
+ GET_CURRENT_LINKED_PROGRAM(pro, "glUniformMatrix4fvARB");
+
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM);
if (pro != NULL)
{