summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorJeremy Huddleston Sequoia <[email protected]>2016-01-20 17:10:54 -0800
committerJeremy Huddleston Sequoia <[email protected]>2016-01-21 09:18:06 -0800
commit739ac3d39dacdede853d150b9903001524453330 (patch)
treeafe269f01382e145756fa2dce1106d92e2af5099 /src/mesa
parentb20d6bf96d8a751cdc2ec36886c9c47d6e93a8ef (diff)
mesa: Deal with size differences between GLuint and GLhandleARB in GetAttachedObjectsARB
Signed-off-by: Jeremy Huddleston Sequoia <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/shaderapi.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index a988f41697b..5854369a28c 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -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);
}