summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/shaders.c
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2008-07-25 18:31:44 -0700
committerIan Romanick <[email protected]>2008-07-25 18:31:44 -0700
commit1e645b365900cf1c71ca5594bd6b549a1f203040 (patch)
treed114e55df428550c9829acf929b9fb7bcb89c429 /src/mesa/main/shaders.c
parente5022c3fdf9888857f22f9a1690035ff3f90d36b (diff)
parent9bc9e0ecb0fb2069b2c123e665eb2118e358098f (diff)
Merge branch 'master' into drm-gem
Conflicts: src/mesa/drivers/dri/common/dri_bufmgr.c src/mesa/drivers/dri/i965/brw_wm_surface_state.c
Diffstat (limited to 'src/mesa/main/shaders.c')
-rw-r--r--src/mesa/main/shaders.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/mesa/main/shaders.c b/src/mesa/main/shaders.c
index 7bf88087670..f0db0d2a818 100644
--- a/src/mesa/main/shaders.c
+++ b/src/mesa/main/shaders.c
@@ -1,8 +1,8 @@
/*
* Mesa 3-D graphics library
- * Version: 6.5.3
+ * Version: 7.1
*
- * Copyright (C) 2004-2007 Brian Paul All Rights Reserved.
+ * Copyright (C) 2004-2008 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -309,11 +309,7 @@ void GLAPIENTRY
_mesa_GetUniformivARB(GLhandleARB program, GLint location, GLint * params)
{
GET_CURRENT_CONTEXT(ctx);
- GLfloat fparams[16]; /* XXX is 16 enough? */
- GLuint i;
- ctx->Driver.GetUniformfv(ctx, program, location, fparams);
- for (i = 0; i < 16; i++)
- params[i] = (GLint) fparams[i]; /* XXX correct? */
+ ctx->Driver.GetUniformiv(ctx, program, location, params);
}
@@ -382,7 +378,7 @@ _mesa_ShaderSourceARB(GLhandleARB shaderObj, GLsizei count,
GLsizei i, totalLength;
GLcharARB *source;
- if (string == NULL) {
+ if (!shaderObj || string == NULL) {
_mesa_error(ctx, GL_INVALID_VALUE, "glShaderSourceARB");
return;
}
@@ -400,7 +396,7 @@ _mesa_ShaderSourceARB(GLhandleARB shaderObj, GLsizei count,
for (i = 0; i < count; i++) {
if (string[i] == NULL) {
_mesa_free((GLvoid *) offsets);
- _mesa_error(ctx, GL_INVALID_VALUE, "glShaderSourceARB(null string)");
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glShaderSourceARB(null string)");
return;
}
if (length == NULL || length[i] < 0)