esextcTestCaseBase.hpp
esextcTestPackage.cpp
esextcTestPackage.hpp
+ disjoint_timer_query/esextcDisjointTimerQueryBase.cpp
+ disjoint_timer_query/esextcDisjointTimerQueryBase.hpp
+ disjoint_timer_query/esextcDisjointTimerQueryHandleReuse.cpp
+ disjoint_timer_query/esextcDisjointTimerQueryHandleReuse.hpp
+ disjoint_timer_query/esextcDisjointTimerQueryTests.cpp
+ disjoint_timer_query/esextcDisjointTimerQueryTests.cpp
draw_buffers_indexed/esextcDrawBuffersIndexedBase.cpp
draw_buffers_indexed/esextcDrawBuffersIndexedBase.hpp
draw_buffers_indexed/esextcDrawBuffersIndexedCoverage.cpp
--- /dev/null
+/*-------------------------------------------------------------------------
+ * OpenGL Conformance Test Suite
+ * -----------------------------
+ *
+ * Copyright (c) 2021 The Khronos Group Inc.
+ * Copyright (c) 2021 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */ /*!
+ * \file
+ * \brief
+ */ /*-------------------------------------------------------------------*/
+
+/*!
+ * \file esextDisjointTimerQueryBase.cpp
+ * \brief Base class for Timer query tests
+ */ /*-------------------------------------------------------------------*/
+
+#include "esextcDisjointTimerQueryBase.hpp"
+#include "gluContextInfo.hpp"
+#include "gluDefs.hpp"
+#include "glwEnums.hpp"
+#include "glwFunctions.hpp"
+#include "tcuTestLog.hpp"
+#include <vector>
+
+namespace glcts
+{
+
+/** Constructor
+ *
+ * @param context Test context
+ * @param name Test case's name
+ * @param description Test case's description
+ **/
+DisjointTimerQueryBase::DisjointTimerQueryBase (Context& context, const ExtParameters& extParams,
+ const char* name, const char* description)
+ : TestCaseBase(context, extParams, name, description)
+{
+ glGenQueriesEXT = (glGenQueriesEXTFunc)context.getRenderContext().getProcAddress("glGenQueriesEXT");
+ glDeleteQueriesEXT = (glDeleteQueriesEXTFunc)context.getRenderContext().getProcAddress("glDeleteQueriesEXT");
+ glIsQueryEXT = (glIsQueryEXTFunc)context.getRenderContext().getProcAddress("glIsQueryEXT");
+ glBeginQueryEXT = (glBeginQueryEXTFunc)context.getRenderContext().getProcAddress("glBeginQueryEXT");
+ glEndQueryEXT = (glEndQueryEXTFunc)context.getRenderContext().getProcAddress("glEndQueryEXT");
+ glQueryCounterEXT = (glQueryCounterEXTFunc)context.getRenderContext().getProcAddress("glQueryCounterEXT");
+ glGetQueryivEXT = (glGetQueryivEXTFunc)context.getRenderContext().getProcAddress("glGetQueryivEXT");
+ glGetQueryObjectivEXT = (glGetQueryObjectivEXTFunc)context.getRenderContext().getProcAddress("glGetQueryObjectivEXT");
+ glGetQueryObjectuivEXT = (glGetQueryObjectuivEXTFunc)context.getRenderContext().getProcAddress("glGetQueryObjectuivEXT");
+ glGetQueryObjecti64vEXT = (glGetQueryObjecti64vEXTFunc)context.getRenderContext().getProcAddress("glGetQueryObjecti64vEXT");
+ glGetQueryObjectui64vEXT = (glGetQueryObjectui64vEXTFunc)context.getRenderContext().getProcAddress("glGetQueryObjectui64vEXT");
+ glGetInteger64vEXT = (glGetInteger64vEXTFunc)context.getRenderContext().getProcAddress("glGetInteger64vEXT");
+}
+
+} // namespace glcts
--- /dev/null
+#ifndef _ESEXTCDISJOINTTIMERQUERYBASE_HPP
+#define _ESEXTCDISJOINTTIMERQUERYBASE_HPP
+/*-------------------------------------------------------------------------
+ * OpenGL Conformance Test Suite
+ * -----------------------------
+ *
+ * Copyright (c) 2021 The Khronos Group Inc.
+ * Copyright (c) 2021 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */ /*!
+ * \file
+ * \brief
+ */ /*-------------------------------------------------------------------*/
+
+/*!
+ * \file esextcDisjointTimerQueryBase.hpp
+ * \brief Base class for timer query tests
+ */ /*-------------------------------------------------------------------*/
+
+#include "../esextcTestCaseBase.hpp"
+#include "glw.h"
+
+namespace glcts
+{
+
+class DisjointTimerQueryBase : public TestCaseBase
+{
+public:
+ DisjointTimerQueryBase (Context& context, const ExtParameters& extParams, const char* name,
+ const char* description);
+
+ virtual ~DisjointTimerQueryBase ()
+ {
+ }
+
+protected:
+ typedef void (*glGenQueriesEXTFunc)(GLsizei n, GLuint* ids);
+ typedef void (*glDeleteQueriesEXTFunc)(GLsizei n, const GLuint* ids);
+ typedef GLboolean (*glIsQueryEXTFunc)(GLuint id);
+ typedef void (*glBeginQueryEXTFunc)(GLenum target, GLuint id);
+ typedef void (*glEndQueryEXTFunc)(GLenum target);
+ typedef void (*glQueryCounterEXTFunc)(GLuint id, GLenum target);
+ typedef void (*glGetQueryivEXTFunc)(GLenum target, GLenum pname, GLint* params);
+ typedef void (*glGetQueryObjectivEXTFunc)(GLuint id, GLenum pname, GLint* params);
+ typedef void (*glGetQueryObjectuivEXTFunc)(GLuint id, GLenum pname, GLuint* params);
+ typedef void (*glGetQueryObjecti64vEXTFunc)(GLuint id, GLenum pname, GLint64* params);
+ typedef void (*glGetQueryObjectui64vEXTFunc)(GLuint id, GLenum pname, GLuint64* params);
+ typedef void (*glGetInteger64vEXTFunc)(GLenum pname, GLint64* data);
+
+ glGenQueriesEXTFunc glGenQueriesEXT;
+ glDeleteQueriesEXTFunc glDeleteQueriesEXT;
+ glIsQueryEXTFunc glIsQueryEXT;
+ glBeginQueryEXTFunc glBeginQueryEXT;
+ glEndQueryEXTFunc glEndQueryEXT;
+ glQueryCounterEXTFunc glQueryCounterEXT;
+ glGetQueryivEXTFunc glGetQueryivEXT;
+ glGetQueryObjectivEXTFunc glGetQueryObjectivEXT;
+ glGetQueryObjectuivEXTFunc glGetQueryObjectuivEXT;
+ glGetQueryObjecti64vEXTFunc glGetQueryObjecti64vEXT;
+ glGetQueryObjectui64vEXTFunc glGetQueryObjectui64vEXT;
+ glGetInteger64vEXTFunc glGetInteger64vEXT;
+};
+
+} // namespace glcts
+
+#endif // _ESEXTCDISJOINTTIMERQUERYBASE_HPP
--- /dev/null
+/*-------------------------------------------------------------------------
+ * OpenGL Conformance Test Suite
+ * -----------------------------
+ *
+ * Copyright (c) 2021 The Khronos Group Inc.
+ * Copyright (c) 2021 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */ /*!
+ * \file
+ * \brief
+ */ /*-------------------------------------------------------------------*/
+
+/*!
+ * \file esextDisjointTimerQueryHandleReuse.cpp
+ * \brief Timer query handle reuse tests
+ */ /*-------------------------------------------------------------------*/
+
+#include "esextcDisjointTimerQueryHandleReuse.hpp"
+#include "gluContextInfo.hpp"
+#include "gluDefs.hpp"
+#include "glwEnums.hpp"
+#include "glwFunctions.hpp"
+#include "tcuTestLog.hpp"
+#include <vector>
+
+namespace glcts
+{
+
+/** Constructor
+ *
+ * @param context Test context
+ * @param name Test case's name
+ * @param description Test case's description
+ **/
+DisjointTimerQueryHandleReuse::DisjointTimerQueryHandleReuse (Context& context, const ExtParameters& extParams,
+ const char* name, const char* description)
+ : DisjointTimerQueryBase(context, extParams, name, description)
+{
+}
+
+/** Initializes GLES objects used during the test */
+void DisjointTimerQueryHandleReuse::initTest (void)
+{
+ if (!isExtensionSupported("GL_EXT_disjoint_timer_query"))
+ {
+ throw tcu::NotSupportedError(DISJOINT_TIMER_QUERY_NOT_SUPPORTED);
+ }
+}
+
+/** Executes the test.
+ *
+ * Sets the test result to QP_TEST_RESULT_FAIL if the test failed, QP_TEST_RESULT_PASS otherwise.
+ *
+ * Note the function throws exception should an error occur!
+ *
+ * @return STOP if the test has finished, CONTINUE to indicate iterate should be called once again.
+ **/
+tcu::TestNode::IterateResult DisjointTimerQueryHandleReuse::iterate(void)
+{
+ /* Initialize */
+ initTest();
+
+ /* Get Gl entry points */
+ const glw::Functions& gl = m_context.getRenderContext().getFunctions();
+ /* Running tests. */
+ bool is_ok = true;
+
+ glw::GLuint query_id_a = 0;
+ glw::GLuint query_id_b = 0;
+ /* Allocate query object */
+ glGenQueriesEXT(1, &query_id_a);
+ /* Associate object with GL_TIMESTAMP */
+ glQueryCounterEXT(query_id_a, GL_TIMESTAMP);
+ /* Deallocate query object */
+ glDeleteQueriesEXT(1, &query_id_a);
+
+ /* Allocate query object again - should result in the same id */
+ glGenQueriesEXT(1, &query_id_b);
+ /* Use the id with something else */
+ glBeginQueryEXT(GL_TIME_ELAPSED, query_id_b);
+ if (gl.getError() != 0) /* Crash was reported here. */
+ is_ok = false;
+ glEndQueryEXT(GL_TIME_ELAPSED);
+ /* Clean up */
+ glDeleteQueriesEXT(1, &query_id_b);
+
+ if (query_id_a != query_id_b)
+ {
+ m_context.getTestContext().getLog()
+ << tcu::TestLog::Message << "Note: Queries got different id:s, so no actual reuse occurred."
+ << tcu::TestLog::EndMessage;
+ }
+
+ /* Result's setup. */
+ if (is_ok)
+ {
+ m_testCtx.setTestResult(QP_TEST_RESULT_PASS, "Pass");
+ }
+ else
+ {
+ m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Fail");
+ }
+ return STOP;
+}
+
+} // namespace glcts
--- /dev/null
+#ifndef _ESEXTCDISJOINTTIMERQUERYHANDLEREUSE_HPP
+#define _ESEXTCDISJOINTTIMERQUERYHANDLEREUSE_HPP
+/*-------------------------------------------------------------------------
+ * OpenGL Conformance Test Suite
+ * -----------------------------
+ *
+ * Copyright (c) 2021 The Khronos Group Inc.
+ * Copyright (c) 2021 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */ /*!
+ * \file
+ * \brief
+ */ /*-------------------------------------------------------------------*/
+
+/*!
+ * \file esextcDisjointTimerQueryHandleReuse.hpp
+ * \brief Timer query handle reuse tests
+ */ /*-------------------------------------------------------------------*/
+
+#include "../esextcTestCaseBase.hpp"
+#include "esextcDisjointTimerQueryBase.hpp"
+
+namespace glcts
+{
+
+class DisjointTimerQueryHandleReuse : public DisjointTimerQueryBase
+{
+public:
+ DisjointTimerQueryHandleReuse (Context& context, const ExtParameters& extParams, const char* name,
+ const char* description);
+
+ virtual ~DisjointTimerQueryHandleReuse ()
+ {
+ }
+
+ virtual IterateResult iterate(void);
+
+private:
+ void initTest(void);
+};
+
+} // namespace glcts
+
+#endif // _ESEXTCDISJOINTTIMERQUERYHANDLEREUSE_HPP
--- /dev/null
+/*-------------------------------------------------------------------------
+ * OpenGL Conformance Test Suite
+ * -----------------------------
+ *
+ * Copyright (c) 2021 The Khronos Group Inc.
+ * Copyright (c) 2021 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */ /*!
+ * \file
+ * \brief
+ */ /*-------------------------------------------------------------------*/
+
+/*!
+ * \file esextcDisjointTimerQueryTests.cpp
+ * \brief Base test group for disjoint timer query tests
+ */ /*-------------------------------------------------------------------*/
+
+#include "esextcDisjointTimerQueryTests.hpp"
+#include "esextcDisjointTimerQueryHandleReuse.hpp"
+
+namespace glcts
+{
+
+/** Constructor
+ *
+ * @param context Test context
+ * @param glslVersion GLSL version
+ **/
+DisjointTimerQueryTests::DisjointTimerQueryTests (glcts::Context& context, const ExtParameters& extParams)
+ : TestCaseGroupBase(context, extParams, "disjoint_timer_query", "Disjoint timer query tests")
+{
+ /* No implementation needed */
+}
+
+/** Initializes test cases for texture buffer tests
+ **/
+void DisjointTimerQueryTests::init (void)
+{
+ /* Initialize base class */
+ TestCaseGroupBase::init();
+
+
+ addChild(new DisjointTimerQueryHandleReuse(m_context, m_extParams,
+ "handle_reuse", "handle reuse"));
+}
+
+} // namespace glcts
--- /dev/null
+#ifndef _ESEXTCDISJOINTTIMERQUERYTESTS_HPP
+#define _ESEXTCDISJOINTTIMERQUERYTESTS_HPP
+/*-------------------------------------------------------------------------
+ * OpenGL Conformance Test Suite
+ * -----------------------------
+ *
+ * Copyright (c) 2021 The Khronos Group Inc.
+ * Copyright (c) 2021 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */ /*!
+ * \file
+ * \brief
+ */ /*-------------------------------------------------------------------*/
+
+/*!
+ * \file esextcDisjointTimerQueryTests.hpp
+ * \brief Base test group for disjoint timer query tests
+ */ /*-------------------------------------------------------------------*/
+
+#include "../esextcTestCaseBase.hpp"
+#include "gluShaderUtil.hpp"
+#include "tcuDefs.hpp"
+
+namespace glcts
+{
+
+/* Base test group for texture buffer tests */
+class DisjointTimerQueryTests : public TestCaseGroupBase
+{
+public:
+ DisjointTimerQueryTests (glcts::Context& context, const ExtParameters& extParams);
+
+ virtual ~DisjointTimerQueryTests (void)
+ {
+ }
+
+ void init (void);
+
+private:
+ DisjointTimerQueryTests (const DisjointTimerQueryTests& other);
+ DisjointTimerQueryTests& operator= (const DisjointTimerQueryTests& other);
+};
+
+} // namespace glcts
+
+#endif // _ESEXTCDISJOINTTIMERQUERYTESTS_HPP
#define TEXTURE_BUFFER_EXTENSION_NOT_SUPPORTED "Texture buffer functionality not supported, skipping"
#define DRAW_BUFFERS_INDEXED_NOT_SUPPORTED "Draw buffers indexed functionality not supported, skipping"
#define VIEWPORT_ARRAY_NOT_SUPPORTED "Viewport array functionality not supported, skipping"
+#define DISJOINT_TIMER_QUERY_NOT_SUPPORTED "Disjoint timer query functionality not supported, skipping"
namespace glcts
{
#include "texture_buffer/esextcTextureBufferTests.hpp"
#include "texture_cube_map_array/esextcTextureCubeMapArrayTests.hpp"
#include "texture_shadow_lod/esextcTextureShadowLodFunctionsTest.hpp"
-
+#include "disjoint_timer_query/esextcDisjointTimerQueryTests.hpp"
#include "glcViewportArrayTests.hpp"
#include "gluStateReset.hpp"
#include "tcuTestLog.hpp"
glcts::ExtParameters viewportParams(glu::GLSL_VERSION_310_ES, glcts::EXTENSIONTYPE_OES);
addChild(new glcts::ViewportArrayTests(getContext(), viewportParams));
addChild(new deqp::Functional::TextureShadowLodTest(getContext()));
+ glcts::ExtParameters viewportParams2(glu::GLSL_VERSION_100_ES, glcts::EXTENSIONTYPE_OES);
+ addChild(new glcts::DisjointTimerQueryTests(getContext(), viewportParams2));
}
catch (...)
{