1 /*-------------------------------------------------------------------------
2 * drawElements Quality Program OpenGL ES 3.1 Module
3 * -------------------------------------------------
4 *
5 * Copyright 2014 The Android Open Source Project
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 *
19 *//*!
20 * \file
21 * \brief Tests for precision and range of GLSL builtins and types.
22 *//*--------------------------------------------------------------------*/
23
24 #include "es31fBuiltinPrecisionTests.hpp"
25
26 #include "deUniquePtr.hpp"
27 #include "glsBuiltinPrecisionTests.hpp"
28
29 #include <vector>
30
31 namespace deqp
32 {
33 namespace gles31
34 {
35 namespace Functional
36 {
37 namespace bpt = gls::BuiltinPrecisionTests;
38
createBuiltinPrecisionTests(Context & context)39 TestCaseGroup *createBuiltinPrecisionTests(Context &context)
40 {
41 TestCaseGroup *group = new TestCaseGroup(context, "precision", "Builtin precision tests");
42 std::vector<glu::ShaderType> shaderTypes;
43 de::MovePtr<const bpt::CaseFactories> es3Cases = bpt::createES3BuiltinCases();
44 de::MovePtr<const bpt::CaseFactories> es31Cases = bpt::createES31BuiltinCases();
45
46 shaderTypes.push_back(glu::SHADERTYPE_COMPUTE);
47
48 bpt::addBuiltinPrecisionTests(context.getTestContext(), context.getRenderContext(), *es3Cases, shaderTypes, *group);
49
50 shaderTypes.clear();
51 shaderTypes.push_back(glu::SHADERTYPE_VERTEX);
52 shaderTypes.push_back(glu::SHADERTYPE_FRAGMENT);
53 shaderTypes.push_back(glu::SHADERTYPE_COMPUTE);
54
55 bpt::addBuiltinPrecisionTests(context.getTestContext(), context.getRenderContext(), *es31Cases, shaderTypes,
56 *group);
57 return group;
58 }
59
60 } // namespace Functional
61 } // namespace gles31
62 } // namespace deqp
63