• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 "esextcTextureCubeMapArrayTests.hpp"
25 #include "esextcTextureCubeMapArrayColorDepthAttachments.hpp"
26 #include "esextcTextureCubeMapArrayETC2Support.hpp"
27 #include "esextcTextureCubeMapArrayFBOIncompleteness.hpp"
28 #include "esextcTextureCubeMapArrayGenerateMipMap.hpp"
29 #include "esextcTextureCubeMapArrayGetterCalls.hpp"
30 #include "esextcTextureCubeMapArrayImageOperations.hpp"
31 #include "esextcTextureCubeMapArrayImageTextureSize.hpp"
32 #include "esextcTextureCubeMapArraySampling.hpp"
33 #include "esextcTextureCubeMapArrayStencilAttachments.hpp"
34 #include "esextcTextureCubeMapArraySubImage3D.hpp"
35 #include "esextcTextureCubeMapArrayTex3DValidation.hpp"
36 
37 namespace glcts
38 {
39 /** Constructor
40  *
41  * @param context       Test context
42  * @param glslVersion   GLSL version
43  **/
TextureCubeMapArrayTests(glcts::Context & context,const ExtParameters & extParams)44 TextureCubeMapArrayTests::TextureCubeMapArrayTests(glcts::Context& context, const ExtParameters& extParams)
45 	: TestCaseGroupBase(context, extParams, "texture_cube_map_array", "Texture Cube Map Array Tests")
46 {
47 	/* No implementation needed */
48 }
49 
50 /** Initializes test cases for texture cube map array tests
51  **/
init(void)52 void TextureCubeMapArrayTests::init(void)
53 {
54 	/* Initialize base class */
55 	TestCaseGroupBase::init();
56 
57 	/* Texture Cube Map Array Sampling (Test 1) */
58 	addChild(new TextureCubeMapArraySamplingTest(m_context, m_extParams, "sampling", "Test 1"));
59 
60 	/* Texture Cube Map Array Attachment (Test 2) */
61 	addChild(
62 		new TextureCubeMapArrayColorDepthAttachmentsTest(m_context, m_extParams, "color_depth_attachments", "Test 2"));
63 
64 	/* Texture Cube Map Array Stencil Attachments (Test 3) */
65 	addChild(new TextureCubeMapArrayStencilAttachments(m_context, m_extParams, "stencil_attachments_mutable_nonlayered",
66 													   "Test 3", false, false));
67 	addChild(new TextureCubeMapArrayStencilAttachments(m_context, m_extParams, "stencil_attachments_mutable_layered",
68 													   "Test 3", false, true));
69 	addChild(new TextureCubeMapArrayStencilAttachments(
70 		m_context, m_extParams, "stencil_attachments_immutable_nonlayered", "Test 3", true, false));
71 	addChild(new TextureCubeMapArrayStencilAttachments(m_context, m_extParams, "stencil_attachments_immutable_layered",
72 													   "Test 3", true, true));
73 
74 	/* Texture Cube Map Array glTexImage3D() and glTexStorage3D() Validation (Test 4) */
75 	addChild(new TextureCubeMapArrayTex3DValidation(m_context, m_extParams, "tex3D_validation", "Test 4"));
76 
77 	/* Texture Cube Map Array SubImage3D() (Test 5) */
78 	addChild(new TextureCubeMapArraySubImage3D(m_context, m_extParams, "subimage3D", "Test 5"));
79 
80 	/* Texture Cube Map Array Getter Calls (Test 6) */
81 	addChild(new TextureCubeMapArrayGetterCalls(m_context, m_extParams, "getter_calls", "Test 6"));
82 
83 	/* Texture Cube Map Array glGenerateMipmap() Validation (Test 7) */
84 	addChild(new TextureCubeMapArrayGenerateMipMapFilterable(
85 		m_context, m_extParams, "generate_mip_map_filterable_internalformat_mutable",
86 		"Test 7.1 filterable internalformat - mutable storage", ST_MUTABLE));
87 
88 	addChild(new TextureCubeMapArrayGenerateMipMapFilterable(
89 		m_context, m_extParams, "generate_mip_map_filterable_internalformat_immutable",
90 		"Test 7.1 filterable internalformat - immutable storage", ST_IMMUTABLE));
91 
92 	/* The following tests, as written, are only applicable to ES. */
93 	addChild(new TextureCubeMapArrayGenerateMipMapNonFilterable(
94 		m_context, m_extParams, "generate_mip_map_non_filterable_mutable_storage",
95 		"Test 7.2 non-filterable format - mutable storage", ST_MUTABLE));
96 
97 	addChild(new TextureCubeMapArrayGenerateMipMapNonFilterable(
98 		m_context, m_extParams, "generate_mip_map_non_filterable_immutable_storage",
99 		"Test 7.2 non-filterable format - immutable storage", ST_IMMUTABLE));
100 
101 	/* Texture Cube Map Array Image Operations (Test 8) */
102 	addChild(new TextureCubeMapArrayImageOpCompute(m_context, m_extParams, "image_op_compute_sh",
103 												   "Test 8 compute shader", STC_COMPUTE_SHADER));
104 	addChild(new TextureCubeMapArrayImageOpCompute(m_context, m_extParams, "image_op_vertex_sh", "Test 8 vertex shader",
105 												   STC_VERTEX_SHADER));
106 	addChild(new TextureCubeMapArrayImageOpCompute(m_context, m_extParams, "image_op_fragment_sh",
107 												   "Test 8 fragment shader", STC_FRAGMENT_SHADER));
108 	addChild(new TextureCubeMapArrayImageOpCompute(m_context, m_extParams, "image_op_geometry_sh",
109 												   "Test 8 geometry shader", STC_GEOMETRY_SHADER));
110 
111 	addChild(new TextureCubeMapArrayImageOpCompute(m_context, m_extParams, "image_op_tessellation_control_sh",
112 												   "Test 8 tessellation control shader ",
113 												   STC_TESSELLATION_CONTROL_SHADER));
114 
115 	addChild(new TextureCubeMapArrayImageOpCompute(m_context, m_extParams, "image_op_tessellation_evaluation_sh",
116 												   "Test 8 tessellation evaluation sahder",
117 												   STC_TESSELLATION_EVALUATION_SHADER));
118 
119 	/* Texture Cube Map Array FBO incompleteness (Test 9) */
120 	addChild(new TextureCubeMapArrayFBOIncompleteness(m_context, m_extParams, "fbo_incompleteness", "Test 9"));
121 
122 	/* textureSize and imageSize validation (Test 10) */
123 	addChild(new TextureCubeMapArrayTextureSizeTFVertexShader(m_context, m_extParams, "texture_size_vertex_sh",
124 															  "test 10.1"));
125 	addChild(new TextureCubeMapArrayTextureSizeTFGeometryShader(m_context, m_extParams, "texture_size_geometry_sh",
126 																"test 10.2"));
127 	addChild(new TextureCubeMapArrayTextureSizeTFTessControlShader(m_context, m_extParams,
128 																   "texture_size_tesselation_con_sh", "test 10.3"));
129 	addChild(new TextureCubeMapArrayTextureSizeTFTessEvaluationShader(m_context, m_extParams,
130 																	  "texture_size_tesselation_ev_sh", "test 10.4"));
131 	addChild(new TextureCubeMapArrayTextureSizeRTFragmentShader(m_context, m_extParams, "texture_size_fragment_sh",
132 																"test 10.5"));
133 	addChild(new TextureCubeMapArrayTextureSizeRTComputeShader(m_context, m_extParams, "texture_size_compute_sh",
134 															   "test 10.6"));
135 
136 	/* Cube Map Array support for ETC2 textures (Test 11) */
137 	glu::ContextType contextType = m_context.getRenderContext().getType();
138 	if (glu::isContextTypeGLCore(contextType) || glu::contextSupports(contextType, glu::ApiType::es(3, 2)))
139 		addChild(new TextureCubeMapArrayETC2Support(m_context, m_extParams, "etc2_texture", "test 11"));
140 }
141 
142 } // namespace glcts
143