Fix test_gl error reporting (#764)
* Fix test_gl error reporting
Overwriting 'error' variable after check for Msaa/Depth support was clearing
the error counter incremented after failure in test_image_format_write. In
effect the test might return 0 even if there were errors.
* Fix variable name
* Fix formatting
* Fix formatting
diff --git a/test_conformance/gl/test_images_write_common.cpp b/test_conformance/gl/test_images_write_common.cpp
index cd48df4..9bbb257 100644
--- a/test_conformance/gl/test_images_write_common.cpp
+++ b/test_conformance/gl/test_images_write_common.cpp
@@ -763,16 +763,16 @@
get_base_gl_target(targets[ tidx ]) == GL_TEXTURE_2D_MULTISAMPLE_ARRAY)
{
bool supports_msaa;
- error = supportsMsaa(context, &supports_msaa);
- if( error != 0 ) return error;
+ int errorInGetInfo = supportsMsaa(context, &supports_msaa);
+ if (errorInGetInfo != 0) return errorInGetInfo;
if (!supports_msaa) return 0;
}
if (formats[ fidx ].formattype == GL_DEPTH_COMPONENT ||
formats[ fidx ].formattype == GL_DEPTH_STENCIL)
{
bool supports_depth;
- error = supportsDepth(context, &supports_depth);
- if( error != 0 ) return error;
+ int errorInGetInfo = supportsDepth(context, &supports_depth);
+ if (errorInGetInfo != 0) return errorInGetInfo;
if (!supports_depth) return 0;
}
#endif