Lines Matching refs:glu

86 void verifyLinkError (NegativeTestContext& ctx, const glu::ShaderProgram& program)
103 void verifyCompileError (NegativeTestContext& ctx, const glu::ShaderProgram& program, glu::ShaderType shaderType)
122 const bool isES32 = glu::contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2));
124 ? getGLSLVersionDeclaration(glu::GLSL_VERSION_320_ES)
125 : getGLSLVersionDeclaration(glu::GLSL_VERSION_310_ES);
140 string genBuiltInSource (glu::ShaderType shaderType)
147 case glu::SHADERTYPE_VERTEX:
148 case glu::SHADERTYPE_FRAGMENT:
151 case glu::SHADERTYPE_COMPUTE:
155 case glu::SHADERTYPE_GEOMETRY:
160 case glu::SHADERTYPE_TESSELLATION_CONTROL:
165 case glu::SHADERTYPE_TESSELLATION_EVALUATION:
194 glu::ShaderProgram program(ctx.getRenderContext(), glu::ProgramSources()
195 << glu::ComputeSource(generateComputeShader(ctx, shaderDecl.str(), shaderBody.str())));
212 glu::ShaderProgram program(ctx.getRenderContext(), glu::ProgramSources()
213 << glu::ComputeSource(generateComputeShader(ctx, shaderDecl.str(), shaderBody.str())));
236 glu::ShaderProgram program(ctx.getRenderContext(), glu::ProgramSources()
237 << glu::ComputeSource(generateComputeShader(ctx, shaderDecl.str(), shaderBody.str())));
272 glu::ShaderProgram program(ctx.getRenderContext(), glu::ProgramSources()
273 << glu::ComputeSource(generateComputeShader(ctx, shaderDecl.str(), shaderBody.str())));
295 glu::ShaderProgram program(ctx.getRenderContext(), glu::ProgramSources()
296 << glu::ComputeSource(generateComputeShader(ctx, shaderDecl.str(), shaderBody.str())));
318 glu::ShaderProgram program(ctx.getRenderContext(), glu::ProgramSources()
319 << glu::ComputeSource(generateComputeShader(ctx, shaderDecl.str(), shaderBody.str())));
350 glu::ShaderProgram program(ctx.getRenderContext(), glu::ProgramSources()
351 << glu::ComputeSource(generateComputeShader(ctx, shaderDecl.str(), shaderBody.str())));
375 glu::ShaderProgram program(ctx.getRenderContext(), glu::ProgramSources()
376 << glu::ComputeSource(generateComputeShader(ctx, shaderDecl.str(), shaderBody.str())));
385 const bool isES32 = glu::contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2));
387 args["GLSL_VERSION_STRING"] = isES32 ? getGLSLVersionDeclaration(glu::GLSL_VERSION_320_ES) : getGLSLVersionDeclaration(glu::GLSL_VERSION_310_ES);
389 const glu::VertexSource vertSource(tcu::StringTemplate(vertexShaderSource).specialize(args));
390 const glu::FragmentSource fragSource(tcu::StringTemplate(fragmentShaderSource).specialize(args));
392 glu::ProgramPipeline pipeline(ctx.getRenderContext());
394 glu::ShaderProgram vertProgram (ctx.getRenderContext(), glu::ProgramSources() << glu::ProgramSeparable(true) << vertSource);
395 glu::ShaderProgram fragProgram (ctx.getRenderContext(), glu::ProgramSources() << glu::ProgramSeparable(true) << fragSource);
446 const bool isES32 = glu::contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2));
448 args["GLSL_VERSION_STRING"] = isES32 ? getGLSLVersionDeclaration(glu::GLSL_VERSION_320_ES) : getGLSLVersionDeclaration(glu::GLSL_VERSION_310_ES);
454 const glu::ComputeSource compSource(tcu::StringTemplate(invalidComputeShaderSource).specialize(args));
455 glu::ShaderProgram invalidComputeProgram (ctx.getRenderContext(), glu::ProgramSources() << compSource);
474 const glu::VertexSource vertSource(tcu::StringTemplate(vertexShaderSource).specialize(args));
475 const glu::FragmentSource fragSource(tcu::StringTemplate(fragmentShaderSource).specialize(args));
476 glu::ShaderProgram graphicsPipelineProgram (ctx.getRenderContext(), glu::ProgramSources() << vertSource << fragSource);
496 const bool isES32 = glu::contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2));
498 args["GLSL_VERSION_STRING"] = isES32 ? getGLSLVersionDeclaration(glu::GLSL_VERSION_320_ES) : getGLSLVersionDeclaration(glu::GLSL_VERSION_310_ES);
500 const glu::ComputeSource compSource(tcu::StringTemplate(computeShaderSource).specialize(args));
501 glu::ShaderProgram program(ctx.getRenderContext(), glu::ProgramSources() << compSource);
587 const bool isES32 = glu::contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2));
589 args["GLSL_VERSION_STRING"] = isES32 ? getGLSLVersionDeclaration(glu::GLSL_VERSION_320_ES) : getGLSLVersionDeclaration(glu::GLSL_VERSION_310_ES);
591 const glu::ComputeSource compSource(tcu::StringTemplate(computeShaderSource).specialize(args));
592 glu::ShaderProgram program(ctx.getRenderContext(), glu::ProgramSources() << compSource);
651 const bool isES32 = glu::contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2));
653 ? getGLSLVersionDeclaration(glu::GLSL_VERSION_320_ES)
654 : getGLSLVersionDeclaration(glu::GLSL_VERSION_310_ES);
679 const glu::ComputeSource compSource(compShaderSource.str());
680 glu::ShaderProgram program(ctx.getRenderContext(), glu::ProgramSources() << compSource);
688 testFailed = (program.getProgramInfo().linkOk) && (program.getShaderInfo(glu::SHADERTYPE_COMPUTE).compileOk);
700 verifyCompileError(ctx, program, glu::SHADERTYPE_COMPUTE);
709 const bool isES32 = glu::contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2));
711 ? getGLSLVersionDeclaration(glu::GLSL_VERSION_320_ES)
712 : getGLSLVersionDeclaration(glu::GLSL_VERSION_310_ES);
721 const glu::ComputeSource compSource(compShaderSource.str());
722 glu::ShaderProgram program(ctx.getRenderContext(), glu::ProgramSources() << compSource);
738 const glu::ComputeSource compSource(compShaderSource.str());
739 glu::ShaderProgram program(ctx.getRenderContext(), glu::ProgramSources() << compSource);
742 verifyCompileError(ctx, program, glu::SHADERTYPE_COMPUTE);
756 const glu::ComputeSource compSource(compShaderSource.str());
757 glu::ShaderProgram program(ctx.getRenderContext(), glu::ProgramSources() << compSource);
760 verifyCompileError(ctx, program, glu::SHADERTYPE_COMPUTE);
764 if (glu::isContextTypeES(ctx.getRenderContext().getType())) // for GL4.5 program will compile and link
780 const glu::ComputeSource compSource(compShaderSource.str());
781 glu::ShaderProgram program(ctx.getRenderContext(), glu::ProgramSources() << compSource);
789 testFailed = (program.getProgramInfo().linkOk) && (program.getShaderInfo(glu::SHADERTYPE_COMPUTE).compileOk);
804 if (glu::isContextTypeES(ctx.getRenderContext().getType()))
811 const bool isES32 = glu::contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2));
814 args["GLSL_VERSION_STRING"] = isES32 ? getGLSLVersionDeclaration(glu::GLSL_VERSION_320_ES) : getGLSLVersionDeclaration(glu::GLSL_VERSION_310_ES);
825 const glu::VertexSource vertSource (tcu::StringTemplate(genBuiltInSource(glu::SHADERTYPE_VERTEX)).specialize(args));
826 const glu::FragmentSource fragSource (tcu::StringTemplate(genBuiltInSource(glu::SHADERTYPE_FRAGMENT)).specialize(args));
827 const glu::TessellationControlSource tessCtrlSource (tcu::StringTemplate(genBuiltInSource(glu::SHADERTYPE_TESSELLATION_CONTROL)).specialize(args));
828 const glu::TessellationEvaluationSource tessEvalSource (tcu::StringTemplate(genBuiltInSource(glu::SHADERTYPE_TESSELLATION_EVALUATION)).specialize(args));
829 const glu::GeometrySource geometrySource (tcu::StringTemplate(genBuiltInSource(glu::SHADERTYPE_GEOMETRY)).specialize(args));
830 const glu::ComputeSource computeSource (tcu::StringTemplate(genBuiltInSource(glu::SHADERTYPE_COMPUTE)).specialize(args));
832 glu::ShaderProgram vertProgram (ctx.getRenderContext(), glu::ProgramSources() << glu::ProgramSeparable(true) << vertSource);
833 glu::ShaderProgram fragProgram (ctx.getRenderContext(), glu::ProgramSources() << glu::ProgramSeparable(true) << fragSource);
834 glu::ShaderProgram tessCtrlProgram (ctx.getRenderContext(), glu::ProgramSources() << glu::ProgramSeparable(true) << tessCtrlSource);
835 glu::ShaderProgram tessEvalProgram (ctx.getRenderContext(), glu::ProgramSources() << glu::ProgramSeparable(true) << tessEvalSource);
836 glu::ShaderProgram geometryProgram (ctx.getRenderContext(), glu::ProgramSources() << glu::ProgramSeparable(true) << geometrySource);
837 glu::ShaderProgram computeProgram (ctx.getRenderContext(), glu::ProgramSources() << glu::ProgramSeparable(true) << computeSource);
840 verifyCompileError(ctx, vertProgram, glu::SHADERTYPE_VERTEX);
841 verifyCompileError(ctx, fragProgram, glu::SHADERTYPE_FRAGMENT);
842 verifyCompileError(ctx, tessCtrlProgram, glu::SHADERTYPE_TESSELLATION_CONTROL);
843 verifyCompileError(ctx, tessEvalProgram, glu::SHADERTYPE_TESSELLATION_EVALUATION);
844 verifyCompileError(ctx, geometryProgram, glu::SHADERTYPE_GEOMETRY);
845 verifyCompileError(ctx, computeProgram, glu::SHADERTYPE_COMPUTE);