1e5c31af7Sopenharmony_ci/*-------------------------------------------------------------------------
2e5c31af7Sopenharmony_ci * OpenGL Conformance Test Suite
3e5c31af7Sopenharmony_ci * -----------------------------
4e5c31af7Sopenharmony_ci *
5e5c31af7Sopenharmony_ci * Copyright (c) 2014-2016 The Khronos Group Inc.
6e5c31af7Sopenharmony_ci *
7e5c31af7Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
8e5c31af7Sopenharmony_ci * you may not use this file except in compliance with the License.
9e5c31af7Sopenharmony_ci * You may obtain a copy of the License at
10e5c31af7Sopenharmony_ci *
11e5c31af7Sopenharmony_ci *      http://www.apache.org/licenses/LICENSE-2.0
12e5c31af7Sopenharmony_ci *
13e5c31af7Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
14e5c31af7Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
15e5c31af7Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16e5c31af7Sopenharmony_ci * See the License for the specific language governing permissions and
17e5c31af7Sopenharmony_ci * limitations under the License.
18e5c31af7Sopenharmony_ci *
19e5c31af7Sopenharmony_ci */ /*!
20e5c31af7Sopenharmony_ci * \file
21e5c31af7Sopenharmony_ci * \brief
22e5c31af7Sopenharmony_ci */ /*-------------------------------------------------------------------*/
23e5c31af7Sopenharmony_ci
24e5c31af7Sopenharmony_ci#include "esextcGPUShader5Tests.hpp"
25e5c31af7Sopenharmony_ci#include "esextcGPUShader5AtomicCountersArrayIndexing.hpp"
26e5c31af7Sopenharmony_ci#include "esextcGPUShader5FmaAccuracy.hpp"
27e5c31af7Sopenharmony_ci#include "esextcGPUShader5FmaPrecision.cpp"
28e5c31af7Sopenharmony_ci#include "esextcGPUShader5ImagesArrayIndexing.hpp"
29e5c31af7Sopenharmony_ci#include "esextcGPUShader5PreciseQualifier.hpp"
30e5c31af7Sopenharmony_ci#include "esextcGPUShader5SSBOArrayIndexing.hpp"
31e5c31af7Sopenharmony_ci#include "esextcGPUShader5SamplerArrayIndexing.hpp"
32e5c31af7Sopenharmony_ci#include "esextcGPUShader5TextureGatherOffset.hpp"
33e5c31af7Sopenharmony_ci#include "esextcGPUShader5UniformBlocksArrayIndexing.hpp"
34e5c31af7Sopenharmony_ci
35e5c31af7Sopenharmony_cinamespace glcts
36e5c31af7Sopenharmony_ci{
37e5c31af7Sopenharmony_ci/** Constructor
38e5c31af7Sopenharmony_ci *
39e5c31af7Sopenharmony_ci * @param context       Test context
40e5c31af7Sopenharmony_ci * @param glslVersion   GLSL version
41e5c31af7Sopenharmony_ci **/
42e5c31af7Sopenharmony_ciGPUShader5Tests::GPUShader5Tests(glcts::Context& context, const ExtParameters& extParams)
43e5c31af7Sopenharmony_ci	: TestCaseGroupBase(context, extParams, "gpu_shader5", "GPU Shader5 tests")
44e5c31af7Sopenharmony_ci{
45e5c31af7Sopenharmony_ci	m_glslVersion = extParams.glslVersion;
46e5c31af7Sopenharmony_ci}
47e5c31af7Sopenharmony_ci
48e5c31af7Sopenharmony_ci/**
49e5c31af7Sopenharmony_ci * Initializes test groups for geometry shader tests
50e5c31af7Sopenharmony_ci **/
51e5c31af7Sopenharmony_civoid GPUShader5Tests::init(void)
52e5c31af7Sopenharmony_ci{
53e5c31af7Sopenharmony_ci	/* Base class init */
54e5c31af7Sopenharmony_ci	TestCaseGroupBase::init();
55e5c31af7Sopenharmony_ci
56e5c31af7Sopenharmony_ci	/* Sampler Array Indexing (Test 1) */
57e5c31af7Sopenharmony_ci	addChild(new GPUShader5SamplerArrayIndexing(m_context, m_extParams, "sampler_array_indexing", "Test 1"));
58e5c31af7Sopenharmony_ci
59e5c31af7Sopenharmony_ci	/* Images Array Indexing (Test 2) */
60e5c31af7Sopenharmony_ci	addChild(new GPUShader5ImagesArrayIndexing(m_context, m_extParams, "images_array_indexing", "Test 2"));
61e5c31af7Sopenharmony_ci
62e5c31af7Sopenharmony_ci	/* Atomic Counters Array Indexing (Test 3) */
63e5c31af7Sopenharmony_ci	addChild(
64e5c31af7Sopenharmony_ci		new GPUShader5AtomicCountersArrayIndexing(m_context, m_extParams, "atomic_counters_array_indexing", "Test 3"));
65e5c31af7Sopenharmony_ci
66e5c31af7Sopenharmony_ci	/* Uniform Blocks Array Indexing (Test 4) */
67e5c31af7Sopenharmony_ci	addChild(
68e5c31af7Sopenharmony_ci		new GPUShader5UniformBlocksArrayIndexing(m_context, m_extParams, "uniform_blocks_array_indexing", "Test 4"));
69e5c31af7Sopenharmony_ci
70e5c31af7Sopenharmony_ci	if (m_glslVersion >= glu::GLSL_VERSION_430)
71e5c31af7Sopenharmony_ci	{
72e5c31af7Sopenharmony_ci		/* SSBO Array Indexing (Test 5) applicable only to OpenGL 4.x*/
73e5c31af7Sopenharmony_ci		addChild(new GPUShader5SSBOArrayIndexing(m_context, m_extParams, "ssbo_array_indexing", "Test 5"));
74e5c31af7Sopenharmony_ci	}
75e5c31af7Sopenharmony_ci
76e5c31af7Sopenharmony_ci	/* GPUShader5 Precise Qualifier (Test 6) */
77e5c31af7Sopenharmony_ci	addChild(new GPUShader5PreciseQualifier(m_context, m_extParams, "precise_qualifier", "Test 6"));
78e5c31af7Sopenharmony_ci
79e5c31af7Sopenharmony_ci	/* Accuracy of the fma function (Test 7) */
80e5c31af7Sopenharmony_ci	addChild(new GPUShader5FmaAccuracyTest(m_context, m_extParams, "fma_accuracy", "Test 7"));
81e5c31af7Sopenharmony_ci
82e5c31af7Sopenharmony_ci	/* Uniform Blocks Array Indexing (Test 8) */
83e5c31af7Sopenharmony_ci	addChild(new GPUShader5FmaPrecision<IDT_FLOAT>(m_context, m_extParams, "fma_precision_float", "Test 8 float"));
84e5c31af7Sopenharmony_ci	addChild(new GPUShader5FmaPrecision<IDT_VEC2>(m_context, m_extParams, "fma_precision_vec2", "Test 8 vec2"));
85e5c31af7Sopenharmony_ci	addChild(new GPUShader5FmaPrecision<IDT_VEC3>(m_context, m_extParams, "fma_precision_vec3", "Test 8 vec3"));
86e5c31af7Sopenharmony_ci	addChild(new GPUShader5FmaPrecision<IDT_VEC4>(m_context, m_extParams, "fma_precision_vec4", "Test 8 vec4"));
87e5c31af7Sopenharmony_ci
88e5c31af7Sopenharmony_ci	/* Texture gather offset (Tests 9, 10 and 11) */
89e5c31af7Sopenharmony_ci	addChild(new GPUShader5TextureGatherOffsetColor2DRepeatCaseTest(
90e5c31af7Sopenharmony_ci		m_context, m_extParams, "texture_gather_offset_color_repeat", "Test 9 - Color repeat case"));
91e5c31af7Sopenharmony_ci	addChild(new GPUShader5TextureGatherOffsetColor2DArrayCaseTest(
92e5c31af7Sopenharmony_ci		m_context, m_extParams, "texture_gather_offset_color_array", "Test 9 - Color texture array case"));
93e5c31af7Sopenharmony_ci	addChild(new GPUShader5TextureGatherOffsetColor2DOffsetsCaseTest(
94e5c31af7Sopenharmony_ci		m_context, m_extParams, "texture_gather_offsets_color", "Test 9 - Color offsets case"));
95e5c31af7Sopenharmony_ci	addChild(new GPUShader5TextureGatherOffsetDepth2DRepeatCaseTest(
96e5c31af7Sopenharmony_ci		m_context, m_extParams, "texture_gather_offset_depth_repeat", "Test 10 - Depth repeat case"));
97e5c31af7Sopenharmony_ci	addChild(new GPUShader5TextureGatherOffsetDepth2DRepeatYCaseTest(
98e5c31af7Sopenharmony_ci		m_context, m_extParams, "texture_gather_offset_depth_repeat_y", "Test 10 - Depth repeat, vertical case"));
99e5c31af7Sopenharmony_ci	addChild(new GPUShader5TextureGatherOffsetDepth2DArrayCaseTest(
100e5c31af7Sopenharmony_ci		m_context, m_extParams, "texture_gather_offset_depth_array", "Test 10 - Depth array case"));
101e5c31af7Sopenharmony_ci	addChild(new GPUShader5TextureGatherOffsetDepth2DOffsetsCaseTest(
102e5c31af7Sopenharmony_ci		m_context, m_extParams, "texture_gather_offsets_depth", "Test 10 - Depth offsets case"));
103e5c31af7Sopenharmony_ci	addChild(new GPUShader5TextureGatherOffsetColor2DClampToBorderCaseTest(
104e5c31af7Sopenharmony_ci		m_context, m_extParams, "texture_gather_offset_color_clamp_to_border", "Test 11 - Color clamp to border case"));
105e5c31af7Sopenharmony_ci	addChild(new GPUShader5TextureGatherOffsetColor2DClampToEdgeCaseTest(
106e5c31af7Sopenharmony_ci		m_context, m_extParams, "texture_gather_offset_color_clamp_to_edge", "Test 11 - Color clamp to edge case"));
107e5c31af7Sopenharmony_ci	addChild(new GPUShader5TextureGatherOffsetDepth2DClampToBorderCaseTest(
108e5c31af7Sopenharmony_ci		m_context, m_extParams, "texture_gather_offset_depth_clamp_border", "Test 11 - Depth clamp to border case"));
109e5c31af7Sopenharmony_ci	addChild(new GPUShader5TextureGatherOffsetDepth2DClampToEdgeCaseTest(
110e5c31af7Sopenharmony_ci		m_context, m_extParams, "texture_gather_offset_depth_clamp_edge", "Test 11 - Depth clamp to edge case"));
111e5c31af7Sopenharmony_ci}
112e5c31af7Sopenharmony_ci
113e5c31af7Sopenharmony_ci} // namespace glcts
114