aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/shaders.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-07-08 16:17:04 -0600
committerBrian Paul <[email protected]>2008-07-08 16:17:04 -0600
commit2be54a8e8ccb206eeedd319cf48a3c81797b83a4 (patch)
treeb0066cf6c5be269e0e158ddef15097a2822fdb39 /src/mesa/main/shaders.c
parent44029f15a8c841d0deb3c7b477bc36ca7a9cd3e6 (diff)
mesa: implement glGetUniformiv() with new ctx->Driver function
The old implementation could overwrite the caller's param buffer.
Diffstat (limited to 'src/mesa/main/shaders.c')
-rw-r--r--src/mesa/main/shaders.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/mesa/main/shaders.c b/src/mesa/main/shaders.c
index b7b2f791a52..a2670fda32a 100644
--- a/src/mesa/main/shaders.c
+++ b/src/mesa/main/shaders.c
@@ -128,6 +128,7 @@ _mesa_DeleteObjectARB(GLhandleARB obj)
void GLAPIENTRY
_mesa_DeleteProgram(GLuint name)
{
+ printf("%s name=%u\n", __FUNCTION__, name);
if (name) {
GET_CURRENT_CONTEXT(ctx);
ctx->Driver.DeleteProgram2(ctx, name);
@@ -309,11 +310,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);
}