Lines Matching refs:sh
17 static sh::GLenum types[] = {
62 static sh::GLenum nonSqMatTypes[] = {GL_FLOAT_MAT2x3, GL_FLOAT_MAT2x4, GL_FLOAT_MAT3x2,
66 sh::ShaderVariable CreateShaderVariable(sh::GLenum type, int numVars) in CreateShaderVariable()
71 return sh::ShaderVariable(type); in CreateShaderVariable()
73 return sh::ShaderVariable(type, numVars); in CreateShaderVariable()
80 std::vector<sh::ShaderVariable> vars; in TEST()
87 sh::GLenum type = types[tt]; in TEST()
88 int num_rows = sh::GetTypePackingRows(type); in TEST()
89 int num_components_per_row = sh::GetTypePackingComponentsPerRow(type); in TEST()
92 vars.push_back(sh::ShaderVariable(type)); in TEST()
112 vars.push_back(sh::ShaderVariable(type)); in TEST()
117 vars.push_back(sh::ShaderVariable(type)); in TEST()
123 vars.push_back(sh::ShaderVariable(GL_FLOAT_VEC4)); in TEST()
124 vars.push_back(sh::ShaderVariable(GL_FLOAT_MAT3)); in TEST()
125 vars.push_back(sh::ShaderVariable(GL_FLOAT_MAT3)); in TEST()
126 vars.push_back(sh::ShaderVariable(GL_FLOAT_VEC2, 6)); in TEST()
127 vars.push_back(sh::ShaderVariable(GL_FLOAT_VEC2, 4)); in TEST()
128 vars.push_back(sh::ShaderVariable(GL_FLOAT_VEC2)); in TEST()
129 vars.push_back(sh::ShaderVariable(GL_FLOAT, 3)); in TEST()
130 vars.push_back(sh::ShaderVariable(GL_FLOAT, 2)); in TEST()
131 vars.push_back(sh::ShaderVariable(GL_FLOAT)); in TEST()
139 sh::GLenum type = types[tt]; in TEST()
155 EXPECT_EQ(expectedComponents, sh::GetTypePackingComponentsPerRow(type)); in TEST()
156 EXPECT_EQ(expectedRows, sh::GetTypePackingRows(type)); in TEST()
167 sh::GLenum type = nonSqMatTypes[mt]; in TEST()
173 std::vector<sh::ShaderVariable> vars; in TEST()
174 vars.push_back(sh::ShaderVariable(type)); in TEST()
181 vars.push_back(sh::ShaderVariable(GL_FLOAT)); in TEST()
188 vars.push_back(sh::ShaderVariable(GL_FLOAT)); in TEST()
196 std::vector<sh::ShaderVariable> vars; in TEST()
208 vars.push_back(sh::ShaderVariable(GL_BOOL, num_elements_per_array)); in TEST()
219 vars.push_back(sh::ShaderVariable(GL_FLOAT_VEC2, num_elements_per_array)); in TEST()
220 vars.push_back(sh::ShaderVariable(GL_FLOAT, num_elements_per_array)); in TEST()
221 vars.push_back(sh::ShaderVariable(GL_INT, num_elements_per_array)); in TEST()
229 std::vector<sh::ShaderVariable> fields; in TEST()
233 std::vector<sh::ShaderVariable> vars; in TEST()
234 vars.push_back(sh::ShaderVariable(GL_NONE)); in TEST()
236 sh::ShaderVariable &parentStruct = vars[0]; in TEST()
237 parentStruct.fields.push_back(sh::ShaderVariable(GL_FLOAT_VEC4)); in TEST()
238 parentStruct.fields.push_back(sh::ShaderVariable(GL_FLOAT_MAT3)); in TEST()
240 parentStruct.fields.push_back(sh::ShaderVariable(GL_NONE)); in TEST()
241 sh::ShaderVariable &innerStruct = parentStruct.fields.back(); in TEST()
242 innerStruct.fields.push_back(sh::ShaderVariable(GL_FLOAT_MAT3)); in TEST()
243 innerStruct.fields.push_back(sh::ShaderVariable(GL_FLOAT_VEC2, 6)); in TEST()
244 innerStruct.fields.push_back(sh::ShaderVariable(GL_FLOAT_VEC2, 4)); in TEST()
246 parentStruct.fields.push_back(sh::ShaderVariable(GL_FLOAT_VEC2)); in TEST()
247 parentStruct.fields.push_back(sh::ShaderVariable(GL_FLOAT, 3)); in TEST()
248 parentStruct.fields.push_back(sh::ShaderVariable(GL_FLOAT, 2)); in TEST()
249 parentStruct.fields.push_back(sh::ShaderVariable(GL_FLOAT)); in TEST()