mesa: Deal with size differences between GLuint and GLhandleARB in GetAttachedObjectsARB

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Reviewed-by: Nicolai Hähnle <nhaehnle@gmail.com>
This commit is contained in:
Jeremy Huddleston Sequoia 2016-01-20 17:10:54 -08:00
parent b20d6bf96d
commit 739ac3d39d

View file

@ -1374,10 +1374,26 @@ _mesa_DetachShader(GLuint program, GLuint shader)
void GLAPIENTRY
_mesa_GetAttachedObjectsARB(GLhandleARB container, GLsizei maxCount,
GLsizei * count, GLhandleARB * obj)
GLsizei * count, GLhandleARB * objARB)
{
int i;
GLuint *obj;
GET_CURRENT_CONTEXT(ctx);
obj = calloc(maxCount, sizeof(GLuint));
if (!obj) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glGetAttachedObjectsARB");
return;
}
get_attached_shaders(ctx, container, maxCount, count, obj);
for (i = 0 ; i < *count; i++) {
objARB[i] = (GLhandleARB)obj[i];
}
free(obj);
}