• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef _GLSTEXTURESTATEQUERYTESTS_HPP
2 #define _GLSTEXTURESTATEQUERYTESTS_HPP
3 /*-------------------------------------------------------------------------
4  * drawElements Quality Program OpenGL (ES) Module
5  * -----------------------------------------------
6  *
7  * Copyright 2015 The Android Open Source Project
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  *      http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  *
21  *//*!
22  * \file
23  * \brief Texture State Query tests.
24  *//*--------------------------------------------------------------------*/
25 
26 #include "tcuDefs.hpp"
27 #include "tcuTestCase.hpp"
28 #include "gluRenderContext.hpp"
29 #include "glsStateQueryUtil.hpp"
30 #include "glwDefs.hpp"
31 
32 namespace deqp
33 {
34 namespace gls
35 {
36 namespace TextureStateQueryTests
37 {
38 
39 #define GEN_PURE_SETTERS(X) X, X ## _SET_PURE_INT, X ## _SET_PURE_UINT
40 
41 enum TesterType
42 {
43 	GEN_PURE_SETTERS(TESTER_TEXTURE_SWIZZLE_R),
44 	GEN_PURE_SETTERS(TESTER_TEXTURE_SWIZZLE_G),
45 	GEN_PURE_SETTERS(TESTER_TEXTURE_SWIZZLE_B),
46 	GEN_PURE_SETTERS(TESTER_TEXTURE_SWIZZLE_A),
47 	GEN_PURE_SETTERS(TESTER_TEXTURE_WRAP_S),
48 	GEN_PURE_SETTERS(TESTER_TEXTURE_WRAP_T),
49 	GEN_PURE_SETTERS(TESTER_TEXTURE_WRAP_R),
50 	GEN_PURE_SETTERS(TESTER_TEXTURE_MAG_FILTER),
51 	GEN_PURE_SETTERS(TESTER_TEXTURE_MIN_FILTER),
52 	GEN_PURE_SETTERS(TESTER_TEXTURE_MIN_LOD),
53 	GEN_PURE_SETTERS(TESTER_TEXTURE_MAX_LOD),
54 	GEN_PURE_SETTERS(TESTER_TEXTURE_BASE_LEVEL),
55 	GEN_PURE_SETTERS(TESTER_TEXTURE_MAX_LEVEL),
56 	GEN_PURE_SETTERS(TESTER_TEXTURE_COMPARE_MODE),
57 	GEN_PURE_SETTERS(TESTER_TEXTURE_COMPARE_FUNC),
58 	TESTER_TEXTURE_IMMUTABLE_LEVELS,
59 	TESTER_TEXTURE_IMMUTABLE_FORMAT,
60 
61 	GEN_PURE_SETTERS(TESTER_DEPTH_STENCIL_TEXTURE_MODE),
62 	GEN_PURE_SETTERS(TESTER_TEXTURE_SRGB_DECODE_EXT),
63 	TESTER_TEXTURE_BORDER_COLOR,
64 	TESTER_TEXTURE_WRAP_S_CLAMP_TO_BORDER,
65 	TESTER_TEXTURE_WRAP_T_CLAMP_TO_BORDER,
66 	TESTER_TEXTURE_WRAP_R_CLAMP_TO_BORDER,
67 
68 	TESTER_LAST
69 };
70 
71 #undef GEN_PURE_SETTERS
72 
73 bool			isLegalTesterForTarget	(glw::GLenum target, TesterType tester);
74 bool			isMultisampleTarget		(glw::GLenum target);
75 bool			isSamplerStateTester	(TesterType tester);
76 
77 tcu::TestCase*	createIsTextureTest		(tcu::TestContext& testCtx, const glu::RenderContext& renderCtx, const std::string& name, const std::string& description, glw::GLenum target);
78 tcu::TestCase*	createTexParamTest		(tcu::TestContext& testCtx, const glu::RenderContext& renderCtx, const std::string& name, const std::string& description, StateQueryUtil::QueryType queryType, glw::GLenum target, TesterType tester);
79 tcu::TestCase*	createSamplerParamTest	(tcu::TestContext& testCtx, const glu::RenderContext& renderCtx, const std::string& name, const std::string& description, StateQueryUtil::QueryType queryType, TesterType tester);
80 
81 } // TextureStateQueryTests
82 } // gls
83 } // deqp
84 
85 #endif // _GLSTEXTURESTATEQUERYTESTS_HPP
86