From 69e4c581ae1a4e134154182148b870d4e9720095 Mon Sep 17 00:00:00 2001 From: James Dong Date: Mon, 8 Jul 2019 10:39:27 -0600 Subject: [PATCH] Explicitly set current values before drawing dEQP-GLES3.functional.vertex_array_objects.all_attributes was relying on the value of disabled integer attributes. This behavior results in undefined values, as the initial values for all vertex attributes are of floating-point type. Affects: dEQP-GLES3.functional.vertex_array_objects.all_attributes Components: AOSP VK-GL-CTS public issue: 153 Change-Id: I8ffe4b581f100884b46fe68a751bf991cccb71e3 --- modules/gles3/functional/es3fVertexArrayObjectTests.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/gles3/functional/es3fVertexArrayObjectTests.cpp b/modules/gles3/functional/es3fVertexArrayObjectTests.cpp index ae9183f..82578b1 100644 --- a/modules/gles3/functional/es3fVertexArrayObjectTests.cpp +++ b/modules/gles3/functional/es3fVertexArrayObjectTests.cpp @@ -569,6 +569,14 @@ void VertexArrayObjectTest::makeDrawCall (const VertexArrayState& state) GLU_CHECK_CALL(glClearColor(0.7f, 0.7f, 0.7f, 1.0f)); GLU_CHECK_CALL(glClear(GL_COLOR_BUFFER_BIT)); + for (int attribNdx = 0; attribNdx < (int)state.attributes.size(); attribNdx++) + { + if (state.attributes[attribNdx].integer) + glVertexAttribI4i(attribNdx, 0, 0, 0, 1); + else + glVertexAttrib4f(attribNdx, 0.0f, 0.0f, 0.0f, 1.0f); + } + if (m_spec.useDrawElements) { if (state.elementArrayBuffer == 0) -- 2.7.4