1 /*-------------------------------------------------------------------------
2  * OpenGL Conformance Test Suite
3  * -----------------------------
4  *
5  * Copyright (c) 2014-2016 The Khronos Group Inc.
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
22  */ /*-------------------------------------------------------------------*/
23 
24 /*!
25  * \file  glcTextureBufferTests.cpp
26  * \brief Base test group for texture buffer tests
27  */ /*-------------------------------------------------------------------*/
28 
29 #include "esextcTextureBufferTests.hpp"
30 #include "esextcTextureBufferActiveUniformValidation.hpp"
31 #include "esextcTextureBufferAtomicFunctions.hpp"
32 #include "esextcTextureBufferBufferParameters.hpp"
33 #include "esextcTextureBufferErrors.hpp"
34 #include "esextcTextureBufferMAXSizeValidation.hpp"
35 #include "esextcTextureBufferOperations.hpp"
36 #include "esextcTextureBufferParamValueIntToFloatConversion.hpp"
37 #include "esextcTextureBufferParameters.hpp"
38 #include "esextcTextureBufferPrecision.hpp"
39 #include "esextcTextureBufferTextureBufferRange.hpp"
40 
41 namespace glcts
42 {
43 
44 /** Constructor
45  *
46  * @param context       Test context
47  * @param glslVersion   GLSL version
48  **/
TextureBufferTests(glcts::Context & context,const ExtParameters & extParams)49 TextureBufferTests::TextureBufferTests(glcts::Context &context, const ExtParameters &extParams)
50     : TestCaseGroupBase(context, extParams, "texture_buffer", "Texture Buffer Tests")
51 {
52     /* No implementation needed */
53 }
54 
55 /** Initializes test cases for texture buffer tests
56  **/
init(void)57 void TextureBufferTests::init(void)
58 {
59     /* Initialize base class */
60     TestCaseGroupBase::init();
61 
62     /* Texture Buffer Operations (Test 1) */
63 
64     /* Case 1 - via buffer object loads*/
65     addChild(new TextureBufferOperationsViaBufferObjectLoad(m_context, m_extParams,
66                                                             "texture_buffer_operations_buffer_load", "Test 1.1"));
67     /* Case 2 - via direct CPU writes*/
68     addChild(new TextureBufferOperationsViaCPUWrites(m_context, m_extParams, "texture_buffer_operations_cpu_writes",
69                                                      "Test 1.2"));
70     /* Case 3 - via framebuffer readbacks to pixel buffer objects*/
71     addChild(new TextureBufferOperationsViaFrambufferReadBack(
72         m_context, m_extParams, "texture_buffer_operations_framebuffer_readback", "Test 1.3"));
73     /* Case 4 - via transform feedback*/
74     addChild(new TextureBufferOperationsViaTransformFeedback(
75         m_context, m_extParams, "texture_buffer_operations_transform_feedback", "Test 1.4"));
76     /* Case 5 - via image store*/
77     addChild(new TextureBufferOperationsViaImageStore(m_context, m_extParams, "texture_buffer_operations_image_store",
78                                                       "Test 1.5"));
79     /* Case 6 - via ssbo writes*/
80     addChild(new TextureBufferOperationsViaSSBOWrites(m_context, m_extParams, "texture_buffer_operations_ssbo_writes",
81                                                       "Test 1.6"));
82 
83     /* Texture Buffer Max Size (Test 2)*/
84     addChild(new TextureBufferMAXSizeValidation(m_context, m_extParams, "texture_buffer_max_size", "Test 2"));
85 
86     /* Texture Buffer Range (Test 3)*/
87     addChild(
88         new TextureBufferTextureBufferRange(m_context, m_extParams, "texture_buffer_texture_buffer_range", "Test 3"));
89 
90     /* Texture Buffer - Parameter Value from Integer To Float Conversion (Test 4)*/
91     addChild(new TextureBufferParamValueIntToFloatConversion(m_context, m_extParams, "texture_buffer_conv_int_to_float",
92                                                              "Test 4"));
93 
94     /* Texture Buffer Atomic Functions (Test 5) */
95     addChild(new TextureBufferAtomicFunctions(m_context, m_extParams, "texture_buffer_atomic_functions", "Test 5"));
96 
97     /* Texture Buffer Parameters (Test 6) */
98     addChild(new TextureBufferParameters(m_context, m_extParams, "texture_buffer_parameters", "Test 6"));
99 
100     /* Texture Buffer Errors (Test 7) */
101     addChild(new TextureBufferErrors(m_context, m_extParams, "texture_buffer_errors", "Test 7"));
102 
103     /* Texture Buffer - Active Uniform Information Validation (Test 8)*/
104     /* Vertex/Fragment Shader  */
105     addChild(new TextureBufferActiveUniformValidationVSFS(
106         m_context, m_extParams, "texture_buffer_active_uniform_validation_fragment_shader", "Test 8.1"));
107     /* Compute Shader */
108     addChild(new TextureBufferActiveUniformValidationCS(
109         m_context, m_extParams, "texture_buffer_active_uniform_validation_compute_shader", "Test 8.2"));
110 
111     /* Texture Buffer Buffer Parameters (Test 9) */
112     addChild(new TextureBufferBufferParameters(m_context, m_extParams, "texture_buffer_buffer_parameters", "Test 9"));
113 
114     /* Texture Buffer Precision (Test 10) */
115     addChild(new TextureBufferPrecision(m_context, m_extParams, "texture_buffer_precision", "Test 10"));
116 }
117 
118 } // namespace glcts
119