From 79df5799eb0b77e3f1a335f92a0a961b5db0461c Mon Sep 17 00:00:00 2001 From: James Helferty Date: Mon, 12 Jun 2017 17:49:29 -0400 Subject: [PATCH] Stop reading from uninitialized memory The compute pipeline statistics query test was accessing uninitialized memory, which was causing an assert to randomly fail depending on what tests were run beforehand. Besides removing the access of the uninitialized memory, this change also initializes the culprit memory in the base class to known invalid values so that if another subclass is ever created with the same bug, it will consistently assert. VK-GL-CTS issue: 496 Components: OpenGL Affects: KHR-GL45.pipeline_statistics_query_tests_ARB.functional_compute_shader_invocations Change-Id: Icc7478c98f617afee2fd53564473492fecd8836e --- external/openglcts/modules/gl/gl4cPipelineStatisticsQueryTests.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/external/openglcts/modules/gl/gl4cPipelineStatisticsQueryTests.cpp b/external/openglcts/modules/gl/gl4cPipelineStatisticsQueryTests.cpp index 5831dcc..cf7f080 100644 --- a/external/openglcts/modules/gl/gl4cPipelineStatisticsQueryTests.cpp +++ b/external/openglcts/modules/gl/gl4cPipelineStatisticsQueryTests.cpp @@ -1653,6 +1653,8 @@ PipelineStatisticsQueryTestFunctionalBase::PipelineStatisticsQueryTestFunctional , m_vbo_id(0) , m_to_height(64) , m_to_width(64) + , m_current_draw_call_type(PipelineStatisticsQueryUtilities::DRAW_CALL_TYPE_COUNT) + , m_current_primitive_type(PipelineStatisticsQueryUtilities::PRIMITIVE_TYPE_COUNT) , m_indirect_draw_call_baseinstance_argument(0) , m_indirect_draw_call_basevertex_argument(0) , m_indirect_draw_call_count_argument(0) @@ -4289,9 +4291,8 @@ bool PipelineStatisticsQueryTestFunctional8::executeTest(glw::GLenum current_que /* Compare it against query result values */ result &= PipelineStatisticsQueryUtilities::verifyResultValues( - run_result, 1, &expected_value, m_qo_id != 0, /* should_check_qo_bo_values */ - current_query_target, &m_current_draw_call_type, &m_current_primitive_type, - false, /* is_primitive_restart_enabled */ + run_result, 1, &expected_value, m_qo_id != 0, /* should_check_qo_bo_values */ + current_query_target, DE_NULL, DE_NULL, false, /* is_primitive_restart_enabled */ m_testCtx, PipelineStatisticsQueryUtilities::VERIFICATION_TYPE_EQUAL_OR_GREATER); } /* if (run results were obtained successfully) */ } /* for (both iterations) */ -- 2.7.4