From ee2d0921dc490592bee72eb94d3391aed6df7fa5 Mon Sep 17 00:00:00 2001 From: DziubanMaciejIntel <37289833+DziubanMaciejIntel@users.noreply.github.com> Date: Fri, 22 May 2020 14:25:43 +0200 Subject: [PATCH] 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 --- test_conformance/gl/test_images_write_common.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test_conformance/gl/test_images_write_common.cpp b/test_conformance/gl/test_images_write_common.cpp index cd48df47..9bbb257b 100644 --- a/test_conformance/gl/test_images_write_common.cpp +++ b/test_conformance/gl/test_images_write_common.cpp @@ -763,16 +763,16 @@ int test_images_write_common(cl_device_id device, cl_context context, 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