Lines Matching refs:ctx

45 void verifyShader (NegativeTestContext& ctx, glu::ShaderType shaderType, std::string shaderSource, ExpectResult expect)
49 tcu::TestLog& log = ctx.getLog();
53 glu::Shader shader (ctx.getRenderContext(), shaderType);
75 ctx.fail(message);
79 std::string getVersionAndExtension (NegativeTestContext& ctx)
81 const bool isES32 = contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2));
93 void checkSupported (NegativeTestContext& ctx)
95 const bool isES32orGL45 = contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2)) ||
96 contextSupports(ctx.getRenderContext().getType(), glu::ApiType::core(4, 5));
98 if (!isES32orGL45 && !ctx.isExtensionSupported("GL_OES_sample_variables"))
102 void write_to_read_only_types (NegativeTestContext& ctx)
104 checkSupported(ctx);
123 << getVersionAndExtension(ctx)
131 ctx.beginSection("OES_sample_variables: trying to write to built-in read-only variable" + testConfigs[idx].builtInType);
132 verifyShader(ctx, glu::SHADERTYPE_FRAGMENT, shader.str(), EXPECT_RESULT_FAIL);
133 ctx.endSection();
137 void access_built_in_types_inside_other_shaders (NegativeTestContext& ctx)
139 checkSupported(ctx);
141 if (glu::isContextTypeES(ctx.getRenderContext().getType()))
143 if ((!ctx.isExtensionSupported("GL_EXT_tessellation_shader") && !ctx.isExtensionSupported("GL_OES_tessellation_shader")) ||
144 (!ctx.isExtensionSupported("GL_EXT_geometry_shader") && !ctx.isExtensionSupported("GL_OES_geometry_shader")))
166 << getVersionAndExtension(ctx)
173 ctx.beginSection("OES_sample_variables: trying to use fragment shader built-in sampler variable " + testConfigs[idx].builtInType + " inside vertex shader");
174 verifyShader(ctx, glu::SHADERTYPE_VERTEX, shader.str(), EXPECT_RESULT_FAIL);
175 ctx.endSection();
182 << getVersionAndExtension(ctx)
189 ctx.beginSection("OES_sample_variables: trying to use fragment shader built-in sampler variable " + testConfigs[idx].builtInType + " inside tessellation control shader");
190 verifyShader(ctx, glu::SHADERTYPE_TESSELLATION_CONTROL, shader.str(), EXPECT_RESULT_FAIL);
191 ctx.endSection();
198 << getVersionAndExtension(ctx)
205 ctx.beginSection("OES_sample_variables: trying to use fragment shader built-in sampler variable " + testConfigs[idx].builtInType + " inside tessellation evaluation shader");
206 verifyShader(ctx, glu::SHADERTYPE_TESSELLATION_EVALUATION, shader.str(), EXPECT_RESULT_FAIL);
207 ctx.endSection();
214 << getVersionAndExtension(ctx)
222 ctx.beginSection("OES_sample_variables: trying to use fragment shader built-in sampler variable " + testConfigs[idx].builtInType + " inside geometry shader");
223 verifyShader(ctx, glu::SHADERTYPE_GEOMETRY, shader.str(), EXPECT_RESULT_FAIL);
224 ctx.endSection();
228 void index_outside_sample_mask_range (NegativeTestContext& ctx)
231 if (!glu::isContextTypeES(ctx.getRenderContext().getType()))
234 checkSupported(ctx);
262 << getVersionAndExtension(ctx)
271 ctx.beginSection("OES_sample_variables: using constant integral expression outside of " + testConfigs.builtInType[typeIdx] + " bounds");
272 verifyShader(ctx, glu::SHADERTYPE_FRAGMENT, shader.str(), EXPECT_RESULT_FAIL);
273 ctx.endSection();
278 void access_built_in_types_without_extension (NegativeTestContext& ctx)
280 checkSupported(ctx);
308 ctx.beginSection("OES_sample_variables: accessing built-in type " + testConfigs[idx].builtInType + " in shader version 310 ES without required extension");
309 verifyShader(ctx, glu::SHADERTYPE_FRAGMENT, shader.str(), EXPECT_RESULT_FAIL);
310 ctx.endSection();
314 void redeclare_built_in_types (NegativeTestContext& ctx)
317 if (glu::isContextTypeGLCore(ctx.getRenderContext().getType()))
320 checkSupported(ctx);
337 << getVersionAndExtension(ctx)
350 ctx.beginSection(testName.str());
351 verifyShader(ctx, glu::SHADERTYPE_FRAGMENT, shader.str(), EXPECT_RESULT_FAIL);
352 ctx.endSection();