1 #ifndef _RSGPARAMETERS_HPP
2 #define _RSGPARAMETERS_HPP
3 /*-------------------------------------------------------------------------
4 * drawElements Quality Program Random Shader Generator
5 * ----------------------------------------------------
7 * Copyright 2014 The Android Open Source Project
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
13 * http://www.apache.org/licenses/LICENSE-2.0
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.
23 * \brief Shader generator parameters.
24 *//*--------------------------------------------------------------------*/
26 #include "rsgDefs.hpp"
37 NUM_RESERVED_SHADER_INPUTS = 1 // Taken by dEQP_Position
42 VERSION_100, //!< GLSL ES 1.0
43 VERSION_300, //!< GLSL ES 3.0
48 class ShaderParameters
51 ShaderParameters (void)
53 , maxStatementDepth (2)
54 , maxStatementsPerBlock (10)
55 , maxExpressionDepth (5)
56 , maxCombinedVariableScalars (32)
57 , maxUniformScalars (512)
58 , maxInputVariables (8)
59 , texLookupBaseWeight (0.0f)
61 , useTexture2D (false)
62 , useTextureCube (false)
66 bool randomize; //!< If not enabled, only simple passthrough will be generated
67 int maxStatementDepth;
68 int maxStatementsPerBlock;
69 int maxExpressionDepth;
70 int maxCombinedVariableScalars;
71 int maxUniformScalars;
72 int maxInputVariables;
74 float texLookupBaseWeight;
80 class ProgramParameters
83 ProgramParameters (void)
85 , version (VERSION_100)
86 , declarationStatementBaseWeight (1.0f)
87 , useScalarConversions (false)
89 , useComparisonOps (false)
90 , useConditionals (false)
91 , trigonometricBaseWeight (0.0f)
92 , exponentialBaseWeight (0.0f)
98 ShaderParameters vertexParameters;
99 ShaderParameters fragmentParameters;
101 bool declarationStatementBaseWeight;
102 bool useScalarConversions;
104 bool useComparisonOps;
105 bool useConditionals;
107 float trigonometricBaseWeight;
108 float exponentialBaseWeight;
113 #endif // _RSGPARAMETERS_HPP