diff options
author | bohu <bohu@google.com> | 2014-10-21 17:10:56 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-10-21 17:10:56 +0000 |
commit | 45d03a067a753d50e7aeb2ab50048db851538ab8 (patch) | |
tree | 6beeee569caac062237f329e18390933ffda3182 | |
parent | d7486c9cd3ff87cfda193cf5fca1d2f5ec0f7316 (diff) | |
parent | 4aad46d9e3791353a0d89a1b93879cee0cbb880a (diff) | |
download | android_device_generic_goldfish-45d03a067a753d50e7aeb2ab50048db851538ab8.tar.gz android_device_generic_goldfish-45d03a067a753d50e7aeb2ab50048db851538ab8.tar.bz2 android_device_generic_goldfish-45d03a067a753d50e7aeb2ab50048db851538ab8.zip |
Merge "Allow glGetProgramInfoLog_enc to have empty length"
-rw-r--r-- | opengl/system/GLESv2_enc/gl2_enc.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/opengl/system/GLESv2_enc/gl2_enc.cpp b/opengl/system/GLESv2_enc/gl2_enc.cpp index 46684e9..8baa289 100644 --- a/opengl/system/GLESv2_enc/gl2_enc.cpp +++ b/opengl/system/GLESv2_enc/gl2_enc.cpp @@ -1162,7 +1162,7 @@ void glGetProgramInfoLog_enc(void *self , GLuint program, GLsizei bufsize, GLsiz gl2_encoder_context_t *ctx = (gl2_encoder_context_t *)self; IOStream *stream = ctx->m_stream; - const unsigned int __size_length = sizeof(GLsizei); + const unsigned int __size_length = ((length != NULL) ? (sizeof(GLsizei)) : 0); const unsigned int __size_infolog = bufsize; unsigned char *ptr; const size_t packetSize = 8 + 4 + 4 + __size_length + __size_infolog + 2*4; @@ -1174,7 +1174,7 @@ void glGetProgramInfoLog_enc(void *self , GLuint program, GLsizei bufsize, GLsiz memcpy(ptr, &bufsize, 4); ptr += 4; *(unsigned int *)(ptr) = __size_length; ptr += 4; *(unsigned int *)(ptr) = __size_infolog; ptr += 4; - stream->readback(length, __size_length); + if (length != NULL) stream->readback(length, __size_length); stream->readback(infolog, __size_infolog); } |