• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef _GL3CGLSLNOPERSPECTIVETESTS_HPP
2 #define _GL3CGLSLNOPERSPECTIVETESTS_HPP
3 /*-------------------------------------------------------------------------
4  * OpenGL Conformance Test Suite
5  * -----------------------------
6  *
7  * Copyright (c) 2015-2016 The Khronos Group Inc.
8  *
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
12  *
13  *      http://www.apache.org/licenses/LICENSE-2.0
14  *
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.
20  *
21  */ /*!
22  * \file
23  * \brief
24  */ /*-------------------------------------------------------------------*/
25 
26 /**
27  * \file  gl3cGLSLnoperspectiveTests.hpp
28  * \brief Declares test classes for "GLSL no perspective" functionality.
29  */ /*-------------------------------------------------------------------*/
30 
31 #include "glcTestCase.hpp"
32 #include "glwDefs.hpp"
33 #include "glwEnums.hpp"
34 #include "tcuDefs.hpp"
35 
36 namespace gl3cts
37 {
38 /** Implements FunctionalTest, description follows:
39  *
40  * Steps:
41  * - prepare a vertex shader which passes position and color from input to
42  * output;
43  * - prepare four fragment shaders that passes color from input to output;
44  * Each of shaders should qualify input with different interpolation:
45  *   * default - no qualifier
46  *   * smooth
47  *   * flat
48  *   * noperspective
49  * - prepare a vertex array buffer that contains following vertices:
50  *     IDX | position       | color
51  *   * 1   | -1,  1, -1,  1 | red
52  *   * 2   |  3,  3,  3,  3 | green
53  *   * 3   | -1, -1, -1,  1 | blue
54  *   * 4   |  3, -3,  3,  3 | white
55  * - for each fragment shader:
56  *   * prepare framebuffer with 2D 64x64 RGBA8 textures attached as color 0;
57  *   * prepare a program consisting of vertex and tested fragment shader;
58  *   * execute DrawArrays to draw triangle strip made of four vertices;
59  * - it is expected that contents of framebuffer corresponding with
60  * noperspective qualifier will differ from the others.
61  **/
62 class FunctionalTest : public deqp::TestCase
63 {
64 public:
65 	/* Public methods */
66 	FunctionalTest(deqp::Context& context);
67 
68 	virtual tcu::TestNode::IterateResult iterate();
69 };
70 
71 /** Group class for GPU Shader FP64 conformance tests */
72 class GLSLnoperspectiveTests : public deqp::TestCaseGroup
73 {
74 public:
75 	/* Public methods */
76 	GLSLnoperspectiveTests(deqp::Context& context);
77 
~GLSLnoperspectiveTests()78 	virtual ~GLSLnoperspectiveTests()
79 	{
80 	}
81 
82 	virtual void init(void);
83 
84 private:
85 	/* Private methods */
86 	GLSLnoperspectiveTests(const GLSLnoperspectiveTests&);
87 	GLSLnoperspectiveTests& operator=(const GLSLnoperspectiveTests&);
88 };
89 } /* gl3cts namespace */
90 
91 #endif // _GL3CGLSLNOPERSPECTIVETESTS_HPP
92