1 #ifndef _GLCLIMITTEST_HPP
2 #define _GLCLIMITTEST_HPP
3 /*-------------------------------------------------------------------------
4 * OpenGL Conformance Test Suite
5 * -----------------------------
7 * Copyright (c) 2017 The Khronos Group Inc.
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
23 * \brief Limits tests.
24 */ /*-------------------------------------------------------------------*/
26 #include "glcTestCase.hpp"
27 #include "gluDefs.hpp"
28 #include "glwDefs.hpp"
29 #include "glwEnums.hpp"
30 #include "glwFunctions.hpp"
31 #include "tcuCommandLine.hpp"
32 #include "tcuTestLog.hpp"
33 #include "tcuVector.hpp"
34 #include "tcuVectorUtil.hpp"
41 template <typename DataType>
42 class LimitCase : public deqp::TestCase
45 LimitCase(deqp::Context& context, const char* caseName, deUint32 limitToken, DataType limitBoundry,
46 bool isBoundryMaximum, const char* glslVersion = "", const char* glslBuiltin = "",
47 const char* glslExtension = "");
48 virtual ~LimitCase(void);
50 tcu::TestNode::IterateResult iterate(void);
53 bool isWithinBoundry(DataType value, bool isBuiltin = false) const;
54 std::string createShader() const;
56 // those functions require specialization for some data types
57 DataType getLimitValue(const glw::Functions& gl) const;
58 std::string getGLSLDataType() const;
59 bool isEqual(DataType a, DataType b) const;
60 bool isGreater(DataType a, DataType b) const;
61 bool isSmaller(DataType a, DataType b) const;
64 LimitCase(const LimitCase&); // not allowed!
65 LimitCase& operator=(const LimitCase&); // not allowed!
67 deUint32 m_limitToken;
68 DataType m_limitBoundry; // min/max value
69 bool m_isBoundryMaximum;
70 const std::string m_glslVersion;
71 const std::string m_glslBuiltin;
72 const std::string m_glslExtension;
75 #include "glcLimitTest.inl"
79 #endif // _GLCLIMITTEST_HPP