Home | History | Annotate | Download | only in functional
      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 
     39 TestCaseGroup* createBuiltinPrecisionTests (Context& context)
     40 {
     41 	TestCaseGroup*							group		= new TestCaseGroup(
     42 		context, "precision", "Builtin precision tests");
     43 	std::vector<glu::ShaderType>			shaderTypes;
     44 	de::MovePtr<const bpt::CaseFactories>	es3Cases		= bpt::createES3BuiltinCases();
     45 	de::MovePtr<const bpt::CaseFactories>	es31Cases		= bpt::createES31BuiltinCases();
     46 
     47 	shaderTypes.push_back(glu::SHADERTYPE_COMPUTE);
     48 
     49 	bpt::addBuiltinPrecisionTests(context.getTestContext(),
     50 								  context.getRenderContext(),
     51 								  *es3Cases,
     52 								  shaderTypes,
     53 								  *group);
     54 
     55 	shaderTypes.clear();
     56 	shaderTypes.push_back(glu::SHADERTYPE_VERTEX);
     57 	shaderTypes.push_back(glu::SHADERTYPE_FRAGMENT);
     58 	shaderTypes.push_back(glu::SHADERTYPE_COMPUTE);
     59 
     60 	bpt::addBuiltinPrecisionTests(context.getTestContext(),
     61 								  context.getRenderContext(),
     62 								  *es31Cases,
     63 								  shaderTypes,
     64 								  *group);
     65 	return group;
     66 }
     67 
     68 } // Functional
     69 } // gles31
     70 } // deqp
     71