Lines Matching refs: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)
206 TCU_CHECK_AND_THROW(NotSupportedError, contextSupports(ctx.getRenderContext().getType() , glu::ApiType::es(3, 2)), "Test requires a context version 3.2 or higher.");
217 ctx.beginSection("GL_OES_sample_variables features require enabling the extension in 310 es shaders.");
227 verifyShader(ctx, glu::SHADERTYPE_FRAGMENT, source.str(), EXPECT_RESULT_FAIL);
229 ctx.endSection();
232 void shader_image_atomic (NegativeTestContext& ctx)
246 ctx.beginSection("GL_OES_shader_image_atomic features require enabling the extension in 310 es shaders.");
257 verifyShader(ctx, glu::SHADERTYPE_FRAGMENT, source.str(), EXPECT_RESULT_FAIL);
259 ctx.endSection();
262 void shader_multisample_interpolation (NegativeTestContext& ctx)
277 ctx.beginSection("GL_OES_shader_multisample_interpolation features require enabling the extension in 310 es shaders.");
278 ctx.beginSection("Test sample in/out qualifiers.");
288 verifyShader(ctx, glu::SHADERTYPE_FRAGMENT, source.str(), EXPECT_RESULT_FAIL);
290 ctx.endSection();
292 ctx.beginSection("Test interpolateAt* functions.");
303 verifyShader(ctx, glu::SHADERTYPE_FRAGMENT, source.str(), EXPECT_RESULT_FAIL);
305 ctx.endSection();
306 ctx.endSection();
309 void texture_storage_multisample_2d_array (NegativeTestContext& ctx)
318 ctx.beginSection("GL_OES_texture_storage_multisample_2d_array features require enabling the extension in 310 es shaders.");
328 verifyShader(ctx, glu::SHADERTYPE_FRAGMENT, source.str(), EXPECT_RESULT_FAIL);
330 ctx.endSection();
333 void geometry_shader (NegativeTestContext& ctx)
335 if (ctx.isShaderSupported(glu::SHADERTYPE_GEOMETRY))
350 ctx.beginSection("GL_EXT_geometry_shader features require enabling the extension in 310 es shaders.");
351 verifyProgram(ctx, glu::ProgramSources() << glu::VertexSource(simpleVtxFrag) << glu::GeometrySource(geometry) << glu::FragmentSource(simpleVtxFrag), EXPECT_RESULT_FAIL);
352 ctx.endSection();
356 void gpu_shader_5 (NegativeTestContext& ctx)
358 ctx.beginSection("GL_EXT_gpu_shader5 features require enabling the extension in 310 es shaders.");
359 ctx.beginSection("Testing the precise qualifier.");
369 verifyShader(ctx, glu::SHADERTYPE_FRAGMENT, source.str(), EXPECT_RESULT_FAIL);
371 ctx.endSection();
373 ctx.beginSection("Testing fused multiply-add.");
382 verifyShader(ctx, glu::SHADERTYPE_FRAGMENT, source.str(), EXPECT_RESULT_FAIL);
384 ctx.endSection();
386 ctx.beginSection("Testing textureGatherOffsets.");
397 verifyShader(ctx, glu::SHADERTYPE_FRAGMENT, source.str(), EXPECT_RESULT_FAIL);
399 ctx.endSection();
401 ctx.endSection();
404 void shader_io_blocks (NegativeTestContext& ctx)
406 ctx.beginSection("GL_EXT_shader_io_blocks features require enabling the extension in 310 es shaders.");
417 verifyShader(ctx, glu::SHADERTYPE_FRAGMENT, source.str(), EXPECT_RESULT_FAIL);
419 ctx.endSection();
422 void tessellation_shader (NegativeTestContext& ctx)
424 if (ctx.isShaderSupported(glu::SHADERTYPE_TESSELLATION_CONTROL))
440 ctx.beginSection("GL_EXT_tessellation_shader features require enabling the extension in 310 es shaders.");
446 verifyProgram(ctx, sources, EXPECT_RESULT_FAIL);
447 ctx.endSection();
451 void texture_buffer (NegativeTestContext& ctx)
463 ctx.beginSection("GL_EXT_texture_buffer features require enabling the extension in 310 es shaders.");
472 verifyShader(ctx, glu::SHADERTYPE_FRAGMENT, source.str(), EXPECT_RESULT_FAIL);
474 ctx.endSection();
478 void texture_cube_map_array (NegativeTestContext& ctx)
491 ctx.beginSection("GL_EXT_texture_cube_map_array features require enabling the extension in 310 es shaders.");
500 verifyShader(ctx, glu::SHADERTYPE_FRAGMENT, source.str(), EXPECT_RESULT_FAIL);
502 ctx.endSection();
505 void executeAccessingBoundingBoxType (NegativeTestContext& ctx, const std::string builtInTypeName, glu::GLSLVersion glslVersion)
529 ctx.beginSection("cannot access built-in type " + builtInTypeName + "[]" + " in vertex shader");
537 verifyShader(ctx, glu::SHADERTYPE_VERTEX, sourceStream.str(), EXPECT_RESULT_FAIL);
538 ctx.endSection();
542 if (ctx.isShaderSupported(glu::SHADERTYPE_TESSELLATION_EVALUATION))
544 ctx.beginSection("cannot access built-in type " + builtInTypeName + "[]" + " in tessellation evaluation shader");
556 verifyShader(ctx, glu::SHADERTYPE_TESSELLATION_EVALUATION, sourceStream.str(), EXPECT_RESULT_FAIL);
557 ctx.endSection();
562 if (ctx.isShaderSupported(glu::SHADERTYPE_GEOMETRY))
564 ctx.beginSection("cannot access built-in type " + builtInTypeName + "[]" + " in geometry shader");
579 verifyShader(ctx, glu::SHADERTYPE_GEOMETRY, sourceStream.str(), EXPECT_RESULT_FAIL);
580 ctx.endSection();
585 ctx.beginSection("cannot access built-in type " + builtInTypeName + "[]" + " in fragment shader");
594 verifyShader(ctx, glu::SHADERTYPE_FRAGMENT, sourceStream.str(), EXPECT_RESULT_FAIL);
595 ctx.endSection();
598 void accessing_bounding_box_type (NegativeTestContext& ctx)
601 if ((ctx.getRenderContext().getType().getMajorVersion() == 3) && (ctx.getRenderContext().getType().getMinorVersion() == 1))
603 executeAccessingBoundingBoxType(ctx, "gl_BoundingBoxEXT", glu::GLSL_VERSION_310_ES);
607 executeAccessingBoundingBoxType(ctx, "gl_BoundingBox", glu::GLSL_VERSION_320_ES);