1e5c31af7Sopenharmony_ci#ifndef _GL3CGLSLNOPERSPECTIVETESTS_HPP
2e5c31af7Sopenharmony_ci#define _GL3CGLSLNOPERSPECTIVETESTS_HPP
3e5c31af7Sopenharmony_ci/*-------------------------------------------------------------------------
4e5c31af7Sopenharmony_ci * OpenGL Conformance Test Suite
5e5c31af7Sopenharmony_ci * -----------------------------
6e5c31af7Sopenharmony_ci *
7e5c31af7Sopenharmony_ci * Copyright (c) 2015-2016 The Khronos Group Inc.
8e5c31af7Sopenharmony_ci *
9e5c31af7Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
10e5c31af7Sopenharmony_ci * you may not use this file except in compliance with the License.
11e5c31af7Sopenharmony_ci * You may obtain a copy of the License at
12e5c31af7Sopenharmony_ci *
13e5c31af7Sopenharmony_ci *      http://www.apache.org/licenses/LICENSE-2.0
14e5c31af7Sopenharmony_ci *
15e5c31af7Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
16e5c31af7Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
17e5c31af7Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18e5c31af7Sopenharmony_ci * See the License for the specific language governing permissions and
19e5c31af7Sopenharmony_ci * limitations under the License.
20e5c31af7Sopenharmony_ci *
21e5c31af7Sopenharmony_ci */ /*!
22e5c31af7Sopenharmony_ci * \file
23e5c31af7Sopenharmony_ci * \brief
24e5c31af7Sopenharmony_ci */ /*-------------------------------------------------------------------*/
25e5c31af7Sopenharmony_ci
26e5c31af7Sopenharmony_ci/**
27e5c31af7Sopenharmony_ci * \file  gl3cGLSLnoperspectiveTests.hpp
28e5c31af7Sopenharmony_ci * \brief Declares test classes for "GLSL no perspective" functionality.
29e5c31af7Sopenharmony_ci */ /*-------------------------------------------------------------------*/
30e5c31af7Sopenharmony_ci
31e5c31af7Sopenharmony_ci#include "glcTestCase.hpp"
32e5c31af7Sopenharmony_ci#include "glwDefs.hpp"
33e5c31af7Sopenharmony_ci#include "glwEnums.hpp"
34e5c31af7Sopenharmony_ci#include "tcuDefs.hpp"
35e5c31af7Sopenharmony_ci
36e5c31af7Sopenharmony_cinamespace gl3cts
37e5c31af7Sopenharmony_ci{
38e5c31af7Sopenharmony_ci/** Implements FunctionalTest, description follows:
39e5c31af7Sopenharmony_ci *
40e5c31af7Sopenharmony_ci * Steps:
41e5c31af7Sopenharmony_ci * - prepare a vertex shader which passes position and color from input to
42e5c31af7Sopenharmony_ci * output;
43e5c31af7Sopenharmony_ci * - prepare four fragment shaders that passes color from input to output;
44e5c31af7Sopenharmony_ci * Each of shaders should qualify input with different interpolation:
45e5c31af7Sopenharmony_ci *   * default - no qualifier
46e5c31af7Sopenharmony_ci *   * smooth
47e5c31af7Sopenharmony_ci *   * flat
48e5c31af7Sopenharmony_ci *   * noperspective
49e5c31af7Sopenharmony_ci * - prepare a vertex array buffer that contains following vertices:
50e5c31af7Sopenharmony_ci *     IDX | position       | color
51e5c31af7Sopenharmony_ci *   * 1   | -1,  1, -1,  1 | red
52e5c31af7Sopenharmony_ci *   * 2   |  3,  3,  3,  3 | green
53e5c31af7Sopenharmony_ci *   * 3   | -1, -1, -1,  1 | blue
54e5c31af7Sopenharmony_ci *   * 4   |  3, -3,  3,  3 | white
55e5c31af7Sopenharmony_ci * - for each fragment shader:
56e5c31af7Sopenharmony_ci *   * prepare framebuffer with 2D 64x64 RGBA8 textures attached as color 0;
57e5c31af7Sopenharmony_ci *   * prepare a program consisting of vertex and tested fragment shader;
58e5c31af7Sopenharmony_ci *   * execute DrawArrays to draw triangle strip made of four vertices;
59e5c31af7Sopenharmony_ci * - it is expected that contents of framebuffer corresponding with
60e5c31af7Sopenharmony_ci * noperspective qualifier will differ from the others.
61e5c31af7Sopenharmony_ci **/
62e5c31af7Sopenharmony_ciclass FunctionalTest : public deqp::TestCase
63e5c31af7Sopenharmony_ci{
64e5c31af7Sopenharmony_cipublic:
65e5c31af7Sopenharmony_ci	/* Public methods */
66e5c31af7Sopenharmony_ci	FunctionalTest(deqp::Context& context);
67e5c31af7Sopenharmony_ci
68e5c31af7Sopenharmony_ci	virtual tcu::TestNode::IterateResult iterate();
69e5c31af7Sopenharmony_ci};
70e5c31af7Sopenharmony_ci
71e5c31af7Sopenharmony_ci/** Group class for GPU Shader FP64 conformance tests */
72e5c31af7Sopenharmony_ciclass GLSLnoperspectiveTests : public deqp::TestCaseGroup
73e5c31af7Sopenharmony_ci{
74e5c31af7Sopenharmony_cipublic:
75e5c31af7Sopenharmony_ci	/* Public methods */
76e5c31af7Sopenharmony_ci	GLSLnoperspectiveTests(deqp::Context& context);
77e5c31af7Sopenharmony_ci
78e5c31af7Sopenharmony_ci	virtual ~GLSLnoperspectiveTests()
79e5c31af7Sopenharmony_ci	{
80e5c31af7Sopenharmony_ci	}
81e5c31af7Sopenharmony_ci
82e5c31af7Sopenharmony_ci	virtual void init(void);
83e5c31af7Sopenharmony_ci
84e5c31af7Sopenharmony_ciprivate:
85e5c31af7Sopenharmony_ci	/* Private methods */
86e5c31af7Sopenharmony_ci	GLSLnoperspectiveTests(const GLSLnoperspectiveTests&);
87e5c31af7Sopenharmony_ci	GLSLnoperspectiveTests& operator=(const GLSLnoperspectiveTests&);
88e5c31af7Sopenharmony_ci};
89e5c31af7Sopenharmony_ci} /* gl3cts namespace */
90e5c31af7Sopenharmony_ci
91e5c31af7Sopenharmony_ci#endif // _GL3CGLSLNOPERSPECTIVETESTS_HPP
92