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 #include "esextcGPUShader5Tests.hpp"
25 #include "esextcGPUShader5AtomicCountersArrayIndexing.hpp"
26 #include "esextcGPUShader5FmaAccuracy.hpp"
27 #include "esextcGPUShader5FmaPrecision.cpp"
28 #include "esextcGPUShader5ImagesArrayIndexing.hpp"
29 #include "esextcGPUShader5PreciseQualifier.hpp"
30 #include "esextcGPUShader5SSBOArrayIndexing.hpp"
31 #include "esextcGPUShader5SamplerArrayIndexing.hpp"
32 #include "esextcGPUShader5TextureGatherOffset.hpp"
33 #include "esextcGPUShader5UniformBlocksArrayIndexing.hpp"
34
35 namespace glcts
36 {
37 /** Constructor
38 *
39 * @param context Test context
40 * @param glslVersion GLSL version
41 **/
GPUShader5Tests(glcts::Context & context,const ExtParameters & extParams)42 GPUShader5Tests::GPUShader5Tests(glcts::Context& context, const ExtParameters& extParams)
43 : TestCaseGroupBase(context, extParams, "gpu_shader5", "GPU Shader5 tests")
44 {
45 m_glslVersion = extParams.glslVersion;
46 }
47
48 /**
49 * Initializes test groups for geometry shader tests
50 **/
init(void)51 void GPUShader5Tests::init(void)
52 {
53 /* Base class init */
54 TestCaseGroupBase::init();
55
56 /* Sampler Array Indexing (Test 1) */
57 addChild(new GPUShader5SamplerArrayIndexing(m_context, m_extParams, "sampler_array_indexing", "Test 1"));
58
59 /* Images Array Indexing (Test 2) */
60 addChild(new GPUShader5ImagesArrayIndexing(m_context, m_extParams, "images_array_indexing", "Test 2"));
61
62 /* Atomic Counters Array Indexing (Test 3) */
63 addChild(
64 new GPUShader5AtomicCountersArrayIndexing(m_context, m_extParams, "atomic_counters_array_indexing", "Test 3"));
65
66 /* Uniform Blocks Array Indexing (Test 4) */
67 addChild(
68 new GPUShader5UniformBlocksArrayIndexing(m_context, m_extParams, "uniform_blocks_array_indexing", "Test 4"));
69
70 if (m_glslVersion >= glu::GLSL_VERSION_430)
71 {
72 /* SSBO Array Indexing (Test 5) applicable only to OpenGL 4.x*/
73 addChild(new GPUShader5SSBOArrayIndexing(m_context, m_extParams, "ssbo_array_indexing", "Test 5"));
74 }
75
76 /* GPUShader5 Precise Qualifier (Test 6) */
77 addChild(new GPUShader5PreciseQualifier(m_context, m_extParams, "precise_qualifier", "Test 6"));
78
79 /* Accuracy of the fma function (Test 7) */
80 addChild(new GPUShader5FmaAccuracyTest(m_context, m_extParams, "fma_accuracy", "Test 7"));
81
82 /* Uniform Blocks Array Indexing (Test 8) */
83 addChild(new GPUShader5FmaPrecision<IDT_FLOAT>(m_context, m_extParams, "fma_precision_float", "Test 8 float"));
84 addChild(new GPUShader5FmaPrecision<IDT_VEC2>(m_context, m_extParams, "fma_precision_vec2", "Test 8 vec2"));
85 addChild(new GPUShader5FmaPrecision<IDT_VEC3>(m_context, m_extParams, "fma_precision_vec3", "Test 8 vec3"));
86 addChild(new GPUShader5FmaPrecision<IDT_VEC4>(m_context, m_extParams, "fma_precision_vec4", "Test 8 vec4"));
87
88 /* Texture gather offset (Tests 9, 10 and 11) */
89 addChild(new GPUShader5TextureGatherOffsetColor2DRepeatCaseTest(
90 m_context, m_extParams, "texture_gather_offset_color_repeat", "Test 9 - Color repeat case"));
91 addChild(new GPUShader5TextureGatherOffsetColor2DArrayCaseTest(
92 m_context, m_extParams, "texture_gather_offset_color_array", "Test 9 - Color texture array case"));
93 addChild(new GPUShader5TextureGatherOffsetColor2DOffsetsCaseTest(
94 m_context, m_extParams, "texture_gather_offsets_color", "Test 9 - Color offsets case"));
95 addChild(new GPUShader5TextureGatherOffsetDepth2DRepeatCaseTest(
96 m_context, m_extParams, "texture_gather_offset_depth_repeat", "Test 10 - Depth repeat case"));
97 addChild(new GPUShader5TextureGatherOffsetDepth2DRepeatYCaseTest(
98 m_context, m_extParams, "texture_gather_offset_depth_repeat_y", "Test 10 - Depth repeat, vertical case"));
99 addChild(new GPUShader5TextureGatherOffsetDepth2DArrayCaseTest(
100 m_context, m_extParams, "texture_gather_offset_depth_array", "Test 10 - Depth array case"));
101 addChild(new GPUShader5TextureGatherOffsetDepth2DOffsetsCaseTest(
102 m_context, m_extParams, "texture_gather_offsets_depth", "Test 10 - Depth offsets case"));
103 addChild(new GPUShader5TextureGatherOffsetColor2DClampToBorderCaseTest(
104 m_context, m_extParams, "texture_gather_offset_color_clamp_to_border", "Test 11 - Color clamp to border case"));
105 addChild(new GPUShader5TextureGatherOffsetColor2DClampToEdgeCaseTest(
106 m_context, m_extParams, "texture_gather_offset_color_clamp_to_edge", "Test 11 - Color clamp to edge case"));
107 addChild(new GPUShader5TextureGatherOffsetDepth2DClampToBorderCaseTest(
108 m_context, m_extParams, "texture_gather_offset_depth_clamp_border", "Test 11 - Depth clamp to border case"));
109 addChild(new GPUShader5TextureGatherOffsetDepth2DClampToEdgeCaseTest(
110 m_context, m_extParams, "texture_gather_offset_depth_clamp_edge", "Test 11 - Depth clamp to edge case"));
111 }
112
113 } // namespace glcts
114