Lines Matching refs:ctx
59 static void checkExtensionSupport (NegativeTestContext& ctx, const char* extName)
61 if (!ctx.getContextInfo().isExtensionSupported(extName))
65 static void checkFramebufferFetchSupport (NegativeTestContext& ctx)
67 checkExtensionSupport(ctx, "GL_EXT_shader_framebuffer_fetch");
77 void verifyProgramError (NegativeTestContext& ctx, const glu::ShaderProgram& program, ProgramError error, glu::ShaderType shaderType)
82 ctx.getLog() << program;
113 ctx.getLog() << tcu::TestLog::Message << message << tcu::TestLog::EndMessage;
114 ctx.fail(message);
118 void last_frag_data_not_defined (NegativeTestContext& ctx)
121 if (!glu::isContextTypeES(ctx.getRenderContext().getType()))
124 checkFramebufferFetchSupport(ctx);
126 const bool isES32 = glu::contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2));
139 glu::ShaderProgram program(ctx.getRenderContext(), glu::ProgramSources()
143 ctx.beginSection("A link error is generated if the built-in fragment outputs of ES 2.0 are used in #version 300 es shaders");
144 verifyProgramError(ctx, program, PROGRAM_ERROR_LINK, glu::SHADERTYPE_FRAGMENT);
145 ctx.endSection();
148 void last_frag_data_readonly (NegativeTestContext& ctx)
152 checkFramebufferFetchSupport(ctx);
166 glu::ShaderProgram program(ctx.getRenderContext(), glu::ProgramSources()
170 ctx.beginSection("A compile-time or link error is generated if the built-in fragment outputs of ES 2.0 are written to.");
171 verifyProgramError(ctx, program, PROGRAM_ERROR_COMPILE_OR_LINK, glu::SHADERTYPE_FRAGMENT);
172 ctx.endSection();
175 void invalid_inout_version (NegativeTestContext& ctx)
177 checkFramebufferFetchSupport(ctx);
192 glu::ShaderProgram program(ctx.getRenderContext(), glu::ProgramSources()
196 ctx.beginSection("A compile-time or link error is generated if user-defined inout arrays are used in earlier versions of GLSL before ES 3.0");
197 verifyProgramError(ctx, program, PROGRAM_ERROR_COMPILE_OR_LINK, glu::SHADERTYPE_FRAGMENT);
198 ctx.endSection();
201 void invalid_redeclaration_inout (NegativeTestContext& ctx)
204 if (!glu::isContextTypeES(ctx.getRenderContext().getType()))
207 checkFramebufferFetchSupport(ctx);
209 const bool isES32 = glu::contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2));
224 glu::ShaderProgram program(ctx.getRenderContext(), glu::ProgramSources()
228 ctx.beginSection("A compile-time or link error is generated if re-declaring an existing fragment output such as gl_FragDepth as inout");
229 verifyProgramError(ctx, program, PROGRAM_ERROR_COMPILE_OR_LINK, glu::SHADERTYPE_FRAGMENT);
230 ctx.endSection();
233 void invalid_vertex_inout (NegativeTestContext& ctx)
236 if (!glu::isContextTypeES(ctx.getRenderContext().getType()))
239 checkFramebufferFetchSupport(ctx);
241 const bool isES32 = glu::contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2));
253 glu::ShaderProgram program(ctx.getRenderContext(), glu::ProgramSources()
257 ctx.beginSection("A compile-time error or link error is generated if inout variables are declared in the vertex shader\n");
258 verifyProgramError(ctx, program, PROGRAM_ERROR_COMPILE_OR_LINK, glu::SHADERTYPE_VERTEX);
259 ctx.endSection();