Lines Matching defs:ctx
47 void verifyProgram(NegativeTestContext& ctx, glu::ProgramSources sources, ExpectResult expect)
51 tcu::TestLog& log = ctx.getLog();
52 const glu::ShaderProgram program (ctx.getRenderContext(), sources);
72 ctx.fail(message);
76 void verifyShader(NegativeTestContext& ctx, glu::ShaderType shaderType, std::string shaderSource, ExpectResult expect)
80 tcu::TestLog& log = ctx.getLog();
84 glu::Shader shader (ctx.getRenderContext(), shaderType);
106 ctx.fail(message);
110 void primitive_bounding_box (NegativeTestContext& ctx)
112 if (ctx.isShaderSupported(glu::SHADERTYPE_TESSELLATION_CONTROL))
114 ctx.beginSection("GL_EXT_primitive_bounding_box features require enabling the extension in 310 es shaders.");
122 verifyShader(ctx, glu::SHADERTYPE_TESSELLATION_CONTROL, source.str(), EXPECT_RESULT_FAIL);
123 ctx.endSection();
126 if (contextSupports(ctx.getRenderContext().getType() , glu::ApiType::es(3, 2)))
128 ctx.beginSection("gl_BoundingBox does not require the OES/EXT suffix in a 320 es shader.");
137 verifyShader(ctx, glu::SHADERTYPE_TESSELLATION_CONTROL, source, EXPECT_RESULT_PASS);
139 ctx.endSection();
141 ctx.beginSection("Invalid index used when assigning to gl_BoundingBox in 320 es shader.");
150 verifyShader(ctx, glu::SHADERTYPE_TESSELLATION_CONTROL, source, EXPECT_RESULT_FAIL);
152 ctx.endSection();
154 ctx.beginSection("Invalid type assignment to per-patch output array in 320 es shader.");
163 verifyShader(ctx, glu::SHADERTYPE_TESSELLATION_CONTROL, source, EXPECT_RESULT_FAIL);
165 ctx.endSection();
169 void blend_equation_advanced (NegativeTestContext& ctx)
190 ctx.beginSection("GL_KHR_blend_equation_advanced features require enabling the extension in 310 es shaders.");
199 verifyShader(ctx, glu::SHADERTYPE_FRAGMENT, source.str(), EXPECT_RESULT_FAIL);
201 ctx.endSection();
204 void sample_variables (NegativeTestContext& ctx)
207 contextSupports(ctx.getRenderContext().getType() , glu::ApiType::es(3, 2)) || contextSupports(ctx.getRenderContext().getType() , glu::ApiType::core(4, 5)),
219 ctx.beginSection("GL_OES_sample_variables features require enabling the extension in 310 es shaders.");
229 verifyShader(ctx, glu::SHADERTYPE_FRAGMENT, source.str(), EXPECT_RESULT_FAIL);
231 ctx.endSection();
234 void shader_image_atomic (NegativeTestContext& ctx)
248 ctx.beginSection("GL_OES_shader_image_atomic features require enabling the extension in 310 es shaders.");
259 verifyShader(ctx, glu::SHADERTYPE_FRAGMENT, source.str(), EXPECT_RESULT_FAIL);
261 ctx.endSection();
264 void shader_multisample_interpolation (NegativeTestContext& ctx)
279 ctx.beginSection("GL_OES_shader_multisample_interpolation features require enabling the extension in 310 es shaders.");
280 ctx.beginSection("Test sample in/out qualifiers.");
290 verifyShader(ctx, glu::SHADERTYPE_FRAGMENT, source.str(), EXPECT_RESULT_FAIL);
292 ctx.endSection();
294 ctx.beginSection("Test interpolateAt* functions.");
305 verifyShader(ctx, glu::SHADERTYPE_FRAGMENT, source.str(), EXPECT_RESULT_FAIL);
307 ctx.endSection();
308 ctx.endSection();
311 void texture_storage_multisample_2d_array (NegativeTestContext& ctx)
320 ctx.beginSection("GL_OES_texture_storage_multisample_2d_array features require enabling the extension in 310 es shaders.");
330 verifyShader(ctx, glu::SHADERTYPE_FRAGMENT, source.str(), EXPECT_RESULT_FAIL);
332 ctx.endSection();
335 void geometry_shader (NegativeTestContext& ctx)
337 if (ctx.isShaderSupported(glu::SHADERTYPE_GEOMETRY))
352 ctx.beginSection("GL_EXT_geometry_shader features require enabling the extension in 310 es shaders.");
353 verifyProgram(ctx, glu::ProgramSources() << glu::VertexSource(simpleVtxFrag) << glu::GeometrySource(geometry) << glu::FragmentSource(simpleVtxFrag), EXPECT_RESULT_FAIL);
354 ctx.endSection();
358 void gpu_shader_5 (NegativeTestContext& ctx)
360 ctx.beginSection("GL_EXT_gpu_shader5 features require enabling the extension in 310 es shaders.");
361 ctx.beginSection("Testing the precise qualifier.");
371 verifyShader(ctx, glu::SHADERTYPE_FRAGMENT, source.str(), EXPECT_RESULT_FAIL);
373 ctx.endSection();
375 ctx.beginSection("Testing fused multiply-add.");
384 verifyShader(ctx, glu::SHADERTYPE_FRAGMENT, source.str(), EXPECT_RESULT_FAIL);
386 ctx.endSection();
388 ctx.beginSection("Testing textureGatherOffsets.");
399 verifyShader(ctx, glu::SHADERTYPE_FRAGMENT, source.str(), EXPECT_RESULT_FAIL);
401 ctx.endSection();
403 ctx.endSection();
406 void shader_io_blocks (NegativeTestContext& ctx)
408 ctx.beginSection("GL_EXT_shader_io_blocks features require enabling the extension in 310 es shaders.");
419 verifyShader(ctx, glu::SHADERTYPE_FRAGMENT, source.str(), EXPECT_RESULT_FAIL);
421 ctx.endSection();
424 void tessellation_shader (NegativeTestContext& ctx)
426 if (ctx.isShaderSupported(glu::SHADERTYPE_TESSELLATION_CONTROL))
442 ctx.beginSection("GL_EXT_tessellation_shader features require enabling the extension in 310 es shaders.");
448 verifyProgram(ctx, sources, EXPECT_RESULT_FAIL);
449 ctx.endSection();
453 void texture_buffer (NegativeTestContext& ctx)
465 ctx.beginSection("GL_EXT_texture_buffer features require enabling the extension in 310 es shaders.");
474 verifyShader(ctx, glu::SHADERTYPE_FRAGMENT, source.str(), EXPECT_RESULT_FAIL);
476 ctx.endSection();
480 void texture_cube_map_array (NegativeTestContext& ctx)
493 ctx.beginSection("GL_EXT_texture_cube_map_array features require enabling the extension in 310 es shaders.");
502 verifyShader(ctx, glu::SHADERTYPE_FRAGMENT, source.str(), EXPECT_RESULT_FAIL);
504 ctx.endSection();
507 void executeAccessingBoundingBoxType (NegativeTestContext& ctx, const std::string builtInTypeName, glu::GLSLVersion glslVersion)
531 ctx.beginSection("cannot access built-in type " + builtInTypeName + "[]" + " in vertex shader");
539 verifyShader(ctx, glu::SHADERTYPE_VERTEX, sourceStream.str(), EXPECT_RESULT_FAIL);
540 ctx.endSection();
544 if (ctx.isShaderSupported(glu::SHADERTYPE_TESSELLATION_EVALUATION))
546 ctx.beginSection("cannot access built-in type " + builtInTypeName + "[]" + " in tessellation evaluation shader");
558 verifyShader(ctx, glu::SHADERTYPE_TESSELLATION_EVALUATION, sourceStream.str(), EXPECT_RESULT_FAIL);
559 ctx.endSection();
564 if (ctx.isShaderSupported(glu::SHADERTYPE_GEOMETRY))
566 ctx.beginSection("cannot access built-in type " + builtInTypeName + "[]" + " in geometry shader");
581 verifyShader(ctx, glu::SHADERTYPE_GEOMETRY, sourceStream.str(), EXPECT_RESULT_FAIL);
582 ctx.endSection();
587 ctx.beginSection("cannot access built-in type " + builtInTypeName + "[]" + " in fragment shader");
596 verifyShader(ctx, glu::SHADERTYPE_FRAGMENT, sourceStream.str(), EXPECT_RESULT_FAIL);
597 ctx.endSection();
600 void accessing_bounding_box_type (NegativeTestContext& ctx)
603 if ((ctx.getRenderContext().getType().getMajorVersion() == 3) && (ctx.getRenderContext().getType().getMinorVersion() == 1))
605 executeAccessingBoundingBoxType(ctx, "gl_BoundingBoxEXT", glu::GLSL_VERSION_310_ES);
609 executeAccessingBoundingBoxType(ctx, "gl_BoundingBox", glu::GLSL_VERSION_320_ES);