1e5c31af7Sopenharmony_ci#ifndef _ESEXTCTESSELLATIONSHADERPROPERTIES_HPP 2e5c31af7Sopenharmony_ci#define _ESEXTCTESSELLATIONSHADERPROPERTIES_HPP 3e5c31af7Sopenharmony_ci/*------------------------------------------------------------------------- 4e5c31af7Sopenharmony_ci * OpenGL Conformance Test Suite 5e5c31af7Sopenharmony_ci * ----------------------------- 6e5c31af7Sopenharmony_ci * 7e5c31af7Sopenharmony_ci * Copyright (c) 2014-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#include "../esextcTestCaseBase.hpp" 27e5c31af7Sopenharmony_ci#include "glwEnums.hpp" 28e5c31af7Sopenharmony_ci 29e5c31af7Sopenharmony_cinamespace glcts 30e5c31af7Sopenharmony_ci{ 31e5c31af7Sopenharmony_ci 32e5c31af7Sopenharmony_ci/** Implementation for Test Case 5 33e5c31af7Sopenharmony_ci * 34e5c31af7Sopenharmony_ci * Make sure that the following tessellation stage properties (some of which 35e5c31af7Sopenharmony_ci * are context-wide, some associated with active program object) have correct 36e5c31af7Sopenharmony_ci * default values reported by relevant getters: 37e5c31af7Sopenharmony_ci * 38e5c31af7Sopenharmony_ci * * GL_PATCH_VERTICES_EXT (default value: 3); 39e5c31af7Sopenharmony_ci * * GL_PATCH_DEFAULT_OUTER_LEVEL (*) (default value: 4 x 1.0); 40e5c31af7Sopenharmony_ci * * GL_PATCH_DEFAULT_INNER_LEVEL (*) (default value: 2 x 1.0); 41e5c31af7Sopenharmony_ci * 42e5c31af7Sopenharmony_ci * (*) Only checked on Desktop 43e5c31af7Sopenharmony_ci * 44e5c31af7Sopenharmony_ci **/ 45e5c31af7Sopenharmony_ciclass TessellationShaderPropertiesDefaultContextWideValues : public TestCaseBase 46e5c31af7Sopenharmony_ci{ 47e5c31af7Sopenharmony_cipublic: 48e5c31af7Sopenharmony_ci /* Public methods */ 49e5c31af7Sopenharmony_ci TessellationShaderPropertiesDefaultContextWideValues(Context& context, const ExtParameters& extParams); 50e5c31af7Sopenharmony_ci 51e5c31af7Sopenharmony_ci virtual ~TessellationShaderPropertiesDefaultContextWideValues(void) 52e5c31af7Sopenharmony_ci { 53e5c31af7Sopenharmony_ci } 54e5c31af7Sopenharmony_ci 55e5c31af7Sopenharmony_ci virtual IterateResult iterate(void); 56e5c31af7Sopenharmony_ci}; 57e5c31af7Sopenharmony_ci 58e5c31af7Sopenharmony_ci/* Make sure that the following tessellation stage properties (some of which 59e5c31af7Sopenharmony_ci * are context-wide, some associated with active program object) have correct 60e5c31af7Sopenharmony_ci * default values reported by relevant getters: 61e5c31af7Sopenharmony_ci * 62e5c31af7Sopenharmony_ci * * GL_TESS_CONTROL_OUTPUT_VERTICES_EXT (default value: 0); 63e5c31af7Sopenharmony_ci * * GL_TESS_GEN_MODE_EXT (default value: GL_QUADS_EXT); 64e5c31af7Sopenharmony_ci * * GL_TESS_GEN_SPACING_EXT (default value: GL_EQUAL); 65e5c31af7Sopenharmony_ci * * GL_TESS_GEN_VERTEX_ORDER_EXT (default value: GL_CCW); 66e5c31af7Sopenharmony_ci * * GL_TESS_GEN_POINT_MODE_EXT (default value: GL_FALSE); 67e5c31af7Sopenharmony_ci * 68e5c31af7Sopenharmony_ci * The test should also iterate through a number of program objects, for which 69e5c31af7Sopenharmony_ci * different tessellation control and evaluation shaders were defined, and verify 70e5c31af7Sopenharmony_ci * the GL_TESS_* values returned are as defined in input layout qualifiers for 71e5c31af7Sopenharmony_ci * relevant shaders. 72e5c31af7Sopenharmony_ci * 73e5c31af7Sopenharmony_ci */ 74e5c31af7Sopenharmony_ciclass TessellationShaderPropertiesProgramObject : public TestCaseBase 75e5c31af7Sopenharmony_ci{ 76e5c31af7Sopenharmony_cipublic: 77e5c31af7Sopenharmony_ci /* Public methods */ 78e5c31af7Sopenharmony_ci TessellationShaderPropertiesProgramObject(Context& context, const ExtParameters& extParams); 79e5c31af7Sopenharmony_ci 80e5c31af7Sopenharmony_ci virtual ~TessellationShaderPropertiesProgramObject(void) 81e5c31af7Sopenharmony_ci { 82e5c31af7Sopenharmony_ci } 83e5c31af7Sopenharmony_ci 84e5c31af7Sopenharmony_ci virtual void deinit(void); 85e5c31af7Sopenharmony_ci void initTest(void); 86e5c31af7Sopenharmony_ci virtual IterateResult iterate(void); 87e5c31af7Sopenharmony_ci 88e5c31af7Sopenharmony_ciprivate: 89e5c31af7Sopenharmony_ci /* Private type definitions */ 90e5c31af7Sopenharmony_ci /* Define a few different tc/te/tc+te shaders we'll attach to a program object, 91e5c31af7Sopenharmony_ci * which will then be queried for tessellation-specific properties 92e5c31af7Sopenharmony_ci */ 93e5c31af7Sopenharmony_ci typedef struct _test_descriptor 94e5c31af7Sopenharmony_ci { 95e5c31af7Sopenharmony_ci glw::GLint expected_control_output_vertices_value; 96e5c31af7Sopenharmony_ci glw::GLenum expected_gen_mode_value; 97e5c31af7Sopenharmony_ci glw::GLenum expected_gen_point_mode_value; 98e5c31af7Sopenharmony_ci glw::GLenum expected_gen_spacing_value; 99e5c31af7Sopenharmony_ci glw::GLenum expected_gen_vertex_order_value; 100e5c31af7Sopenharmony_ci const char* tc_body; 101e5c31af7Sopenharmony_ci const char* te_body; 102e5c31af7Sopenharmony_ci 103e5c31af7Sopenharmony_ci _test_descriptor() 104e5c31af7Sopenharmony_ci { 105e5c31af7Sopenharmony_ci expected_control_output_vertices_value = 0; 106e5c31af7Sopenharmony_ci expected_gen_mode_value = 0; 107e5c31af7Sopenharmony_ci expected_gen_point_mode_value = 0; 108e5c31af7Sopenharmony_ci expected_gen_spacing_value = 0; 109e5c31af7Sopenharmony_ci expected_gen_vertex_order_value = 0; 110e5c31af7Sopenharmony_ci tc_body = DE_NULL; 111e5c31af7Sopenharmony_ci te_body = DE_NULL; 112e5c31af7Sopenharmony_ci } 113e5c31af7Sopenharmony_ci } _test_descriptor; 114e5c31af7Sopenharmony_ci 115e5c31af7Sopenharmony_ci typedef std::vector<_test_descriptor> _tests; 116e5c31af7Sopenharmony_ci typedef _tests::const_iterator _tests_const_iterator; 117e5c31af7Sopenharmony_ci 118e5c31af7Sopenharmony_ci /* Private variables */ 119e5c31af7Sopenharmony_ci glw::GLuint m_fs_id; 120e5c31af7Sopenharmony_ci glw::GLuint m_po_id; 121e5c31af7Sopenharmony_ci glw::GLuint m_tc_id; 122e5c31af7Sopenharmony_ci glw::GLuint m_te_id; 123e5c31af7Sopenharmony_ci glw::GLuint m_vs_id; 124e5c31af7Sopenharmony_ci}; 125e5c31af7Sopenharmony_ci 126e5c31af7Sopenharmony_ci} // namespace glcts 127e5c31af7Sopenharmony_ci 128e5c31af7Sopenharmony_ci#endif // _ESEXTCTESSELLATIONSHADERPROPERTIES_HPP 129