From: James Dong Date: Mon, 8 Jul 2019 16:39:27 +0000 (-0600) Subject: Explicitly set current values before drawing X-Git-Tag: upstream/1.3.5~1939 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=69e4c581ae1a4e134154182148b870d4e9720095;p=platform%2Fupstream%2FVK-GL-CTS.git 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 --- 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)