mesa: minor simplification in test_attachment_completeness()
authorBrian Paul <brianp@vmware.com>
Fri, 13 Oct 2017 22:16:48 +0000 (16:16 -0600)
committerBrian Paul <brianp@vmware.com>
Sat, 14 Oct 2017 16:30:27 +0000 (10:30 -0600)
We already have a pointer to the texture object.  Use it here.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/mesa/main/fbobject.c

index db8c207ceea871aae7e735a64a82fabfffeb855d..71e91f9301f03bd3164f9a17412cdd441040e78a 100644 (file)
@@ -855,8 +855,7 @@ test_attachment_completeness(const struct gl_context *ctx, GLenum format,
           * these textures to be used as a render target, this is done via
           * GL_EXT_color_buffer(_half)_float with set of new sized types.
           */
-         if (_mesa_is_gles(ctx) && (texImage->TexObject->_IsFloat ||
-                                    texImage->TexObject->_IsHalfFloat)) {
+         if (_mesa_is_gles(ctx) && (texObj->_IsFloat || texObj->_IsHalfFloat)) {
             att_incomplete("bad internal format");
             att->Complete = GL_FALSE;
             return;